Nations are the other type of bots in an OpenFront match. They can be considered more "complex" or more "human-like". The main difference is that Nations are named after a real-life nation, such as Bulgaria or Estonia. They will use the flag of their nation and spawn near their nation's territory.
Information
Nations are commonly encountered adversaries in Openfront. Often considered as the intelligent relatives of the widespread cannon-fodder Bots, they possess characteristics closer to a human player, including the following: Requesting alliances, Constructing Buildings and trading. Another capability in the naval space is sending transports (also known as ships). Nations can also send emojis on special occasions. For example: if you attack a nation, they have a chance to send out clown or angry emojis. Nations can have inaccurate territory in the game. This is either because it is too small to be more than a pixel, or because the borders are too hard to draw. There is a very small chance it gets accurate borders, with high chances of the territory being bigger or smaller on the map.
Combatting Nations
Nations are quite a peculiar entity in OpenFront. Nations are placed second in the purview of intelligence, with bots being last at third and human players placed at first. Nations are quite hard to beat if you aren't sufficiently prepared for them, due to their ability to act closer to humans than bots. It can be very hard to get rid of a nation bot when they commence an attack, but they ineffectively throw their troops at you and significantly reduce their ability to launch a second wave. Use these weaknesses to your advantage and start a noticeable invasion to call other nations around you to help eliminate them. You can also attack when they launch on a player or a fellow nation. If you are prepared, attack a nation after they build infrastructure like ports.
Actions performed by nations
Nations can:
- Send ships
- Build (cities, ports, missile silos)
- Launch nukes
- Send emojis (mostly angry emojis when you attack them or clown emojis. This means they will fullsend or almost fullsend you (clown) or attack you continuously (angry). You can attempt to ally them to get them off you, and sometimes they accept.)
Trivia
- Nations can nuke each other, but in multiplayer games, they rarely get the chance since they are often wiped out by the midgame phase.
Alliances
Relations
Numeric relations range from -100 to +100 and map to four named tiers visible on the info screen:
| Relationship Value Range | Tier |
|---|---|
| Less than -50 | Hostile |
| -50 to less than 0 | Distrustful |
| 0 to less than 50 | Neutral |
| 50 or greater | Friendly |
Any value below Neutral is a hard rejection signal and a value at or above Friendly is a strong accept signal. Relations shift through gameplay events: targeting a nation applies -40, requesting assistance from an ally costs -20 with that ally, nuking applies -100, and various emoji interactions adjust relations in smaller increments.
Sending alliance requests
When a nation's attack logic runs and bordering enemies are present (not when the nation is only expanding into unclaimed territory), the nation considers sending an alliance request to each bordering enemy. The process is a 1/30 roll per enemy per attack pulse, combined with a check that the player type is acceptable (bots only qualify on Easy difficulty), a check that no cooldown or duplicate-request condition blocks the attempt, and a successful evaluation of the alliance decision tree.
The requirements on whether a request can be sent at all requires that alliances are enabled, the target is not the nation itself, the target is connected and alive, the two are not already friendly, no outgoing pending request to the same player exists, and either an incoming request from that player exists (allowing the nation to respond) or the last outgoing request to that player was at least 300 ticks ago.
If a request is sent while the player already has an outgoing request to the nation, the two requests automatically resolve as accepted, both relations are set to +100, temporary embargoes are cleared, and any in-flight nukes that would otherwise break the new alliance are cancelled.
Alliance decision tree
The core decision routine evaluates ten steps in strict order, with the first matching step determining the outcome. The same routine is used both when considering whether to send a request and when responding to an incoming one.
Confusion
A small chance per evaluation that the nation acts erratically. The probability depends on difficulty: 10% on Easy, 5% on Medium, 2.5% on Hard, and never on Impossible. When confused, the nation makes a 50% random accept/reject decision and everything else is skipped.
Traitor partner
If the other player carries the traitor flag, the nation rejects roughly 90% of the time.
Partner has too many alliances
Applies only on Hard and Impossible difficulties. The nation counts non-bot players in the game and rejects if the other player's current alliance count exceeds a threshold: 50% of non-bot players on Hard, or 25% on Impossible.
Threat partner
If the other player is significantly stronger, the nation accepts the alliance as protection if:
- In Medium difficulty, if the other has more than 2.5 times the nation's troops.
- In Hard difficulty, if both current troops and maximum troop capacity exceed twice the nation's own.
- In Impossible difficulty: if any of three conditions hold: troops greater than 1.5x the nation's, or more troops combined with maximum capacity 1.5x higher, or more troops combined with 1.5x the territory.
On Easy difficulty, nations do not recognize threats.
Team games
In team game modes, nations are increasingly unwilling to ally with non-teammates. Rejection probabilities are 25% on Easy, 50% on Medium, 75% on Hard, and 100% on Impossible.
Bad relation
A numeric relation below zero (Hostile or Distrustful) triggers immediate rejection.
Friendly partner
A Friendly relation (value of 50 or higher) triggers acceptance. Harder difficulties introduce a random rejection chance even when the relation is Friendly: Hard accepts 83% of the time when friendly, Impossible accepts 67% of the time.
Nation has too many alliances
The nation checks its own alliance count against difficulty-dependent caps. Easy nations have no cap. Medium nations reject once their alliance count reaches a random value between 4 and 5 (inclusive). On Hard and Impossible, two checks apply: if the nation has at least two bordering non-bot neighbors and the other player is one of them, the nation rejects if accepting would mean nearly all border neighbors become allies. Additionally, Hard caps total alliances at a random 3 or 4, and Impossible caps at a random 2 or 3.
Early game
If still undecided, the nation may accept based on game age. The window and acceptance probability both narrow with difficulty:
| Difficulty | Window (ticks past spawn) | Accept Probability |
|---|---|---|
| Easy | < 3,000 (~5 minutes) | 90% |
| Medium | < 1,800 (~3 minutes) | 70% |
| Hard | < 1,800 | 50% |
| Impossible | < 600 (~1 minute) | 30% |
Similarly strong
The final fallback compares effective troop pools (current troops plus any troops in outgoing attacks) and tile counts against difficulty-dependent randomized thresholds. The nation accepts if either condition holds:
- Comparable troops: the other player's total troops exceed the nation's total troops multiplied by a random percentage. The range is 60-70% on Easy, 70-80% on Medium, 75-85% on Hard, and 80-90% on Impossible.
- Comparable tiles: the other player's tile count exceeds the nation's by a random percentage (70-80% on Easy, 80-90% on Medium, 85-95% on Hard, 90-100% on Impossible) and the other player's total troops exceed 50% of the nation's
If neither condition holds, the request is rejected.
Betrayal
Before the normal attack target search runs, nations consider whether to betray any of their current allies. The following factors are considered in this exact order, and the first match results in immediate alliance break followed by a forced attack on the former ally.
- Weak Ally (Hard and Impossible mode only): The ally's combined current and outgoing troops fall below 20% of their maximum troop capacity, and the ally has strictly fewer current troops than the nation. This is sometimes called the "MIRVed ally" trigger, since heavy nuke damage often produces these conditions.
- Overwhelming Strength: The nation has at least 10 times the ally's troops. Easy nations skip this check against human players, only checking against other nations; Medium nations apply it to humans.
- Traitor Ally (Hard and Impossible mode only): The ally currently holds the traitor flag and the ally's troops are below 1.2 times the nation's troops.
- Sole Neighbor (Hard and Impossible mode only): The nation has exactly one bordering player, that player is the ally, and the ally's troops multiplied by 3 are still less than the nation's troops.
Embargoes and Emojis
On Hard and Impossible difficulty in team games, nations apply embargoes against all non-teammate non-bot players. Outside team mode, embargoes are placed in response to the relationship status Hostile. Embargoes are lifted when relationships reach 0 or higher (Neutral) on Easy/Medium, 50 or higher (Friendly) on Hard, and embargoes will never auto-lift in Impossible.
When a neighbor places an embargo on the nation, the nation applies a one-time -20 relation penalty. Removing the embargo reverses this penalty.
Insult emojis received from a player apply -100 relation and trigger a response emoji. Peace emojis on Easy difficulty grant +15 relation and may produce a love reply.
Construction
The construction system runs on every nation's main AI tick and twice more between main ticks (at one-third and two-thirds of the attack rate interval). Each call attempts at most one meaningful action (either placing or upgrading a single structure) with defense posts handled on a separate fast path that does not count against normal pacing limits.
Decision branches
When a construction call begins, the AI first checks whether a defense post is needed in response to a land invasion. If the nation has already placed at least one normal structure and is under sufficient attack, this branch fires; if it determines a post is needed but cannot place one, the entire economy build for that call is skipped. Otherwise, the AI checks two pacing gates: a cooldown specific to nations that began the game with high gold, and an off-phase window used in team games to let nuke spending proceed without interference. If neither gate blocks, the AI proceeds to the main structure logic.
The main structure logic considers a few special-case openers, then iterates through ports, factories, SAM launchers, and missile silos in that order, building the first one whose quota is unmet. If no structure was built during this loop, a city attempt follows.
Defense posts
When a nation is under land attack and has already placed at least one structure, the system may change to building defense posts before considering any economic construction. The threshold that triggers this is an attacking troop count of at least 35% of the nation's own troops. Defense posts are an emergency response separate from the economic build order. They are never the first structure a nation places, and boat invasions do not trigger them, only land attacks.
| Nation Difficulty | Action in Land Attack |
| Easy | Will never construct a defense post when under attack. |
| Medium | 50% chance per call, 1 post maximum near the front. |
| Hard/Impossible | Number of posts scales with attack, up to (ie. 80% incoming troops leads to 2 maximum posts) |
The front is defined as tiles on the nation's border that touch an attacker's territory. Candidate placement tiles are sampled from up to 25 tiles in a depth ring between 0.75 and 1.5 times the standard border spacing, where border spacing equals the outer blast radius of an atom bomb. If the nation's territory is too small for this ring, the requirement is relaxed and falls back to random territory samples.
If the defense threshold is met but placement fails such as no valid tiles or insufficient gold, the system blocks all other structure-building for that tick.
Pacing Events
High starting gold
The following only applies to nations with at least 3 million starting gold. On Hard and Impossible difficulty, if nukes, silos, and SAM launchers are all enabled in the lobby, the first structure such a nation builds is a SAM launcher rather than economic infrastructure. This is intended to spread SAM coverage before structures cluster within a single nuclear blast radius.
After the opener, these nations apply a cooldown between successive placements. The first two structures incur no wait; the third requires 250 ticks (about 25 seconds) after the previous placement; the fourth requires 150 ticks; and the fifth and beyond require 100 ticks each.
Post save-up
In team games with missile silos enabled, once a nation's gold reaches its save-up target, construction enters an oscillating pattern of 15 seconds on and 15 seconds off (150 ticks each). The oscillation is synchronized with the nuke AI.
City scaling and quotas
Nation construction quotas are mainly derived from city count. When cities are enabled in the lobby, the AI uses the actual number of cities owned. When cities are disabled, it substitutes a rough estimate based on territory, computed as
The target count for each structure type is , where r is a type-specific ratio:
| Structure | Ratio per city | Notes |
|---|---|---|
| Port | 0.75 | Requires costal access. |
| Factory | 0.75 | Multiplies by 0.33 if costal and ports are enabled. |
| SAM Launcher | 0.15 to 0.30 | Scales with difficulty. |
| Missile Silo | 0.20 | First silo has a 0.40 ratio. Hard cap of 3 silos. |
| City | No quota; always attempted as a fallback once other quotas are fulfilled. |
The SAM ratio increases with difficulty: 0.15 on Easy, 0.20 on Medium, 0.25 on Hard, and 0.30 on Impossible. Cities are handled specially. They are not part of the quota-driven loop and have no upper limit other than gold availability and the perceived-cost mechanism. After the loop runs, if no other structure was built, the AI always attempts a city placement, provided cities are enabled.
Any structure type disabled in the lobby is skipped.
Perceived cost
Construction is linked to nuclear weapon saving through a perceived-cost mechanism that inflates the apparent price of structures until the nation has banked enough gold for its preferred nuclear load out.
| Lobby Setup | Target Gold |
|---|---|
| Missile Silos Disabled | The cost of 1x SAM |
| Team Mode | The cost of 1x Hydrogen Bomb |
| MIRV-enabled (FFA style) | The cost of 1x MIRV + 1x Hydrogen |
| Hydrogen Bombs Only | The cost of 5x Hydrogen Bombs |
| Atom Bombs Only | The cost of 20x Atom Bombs |
| No Nukes | The cost of 1x SAM |
While the nation's gold is below their target, the perceived cost of a structure is where is the number of that structure type already owned and is a type-specific inflation rate:
- Most structures use meaning each existing city effectively doubles the marginal cost of building another.
- SAM launchers use .
Once gold reaches the save-up target, perceived cost equals real cost, and the nation can build at normal prices. After a large purchase depletes the bank, inflation returns.
Building and upgrading
When a nation's total structure count divided by tiles owned exceeds approximately one per 1,500 tiles the AI considers upgrading an existing structure of the target type rather than building a new one, provided the type supports upgrades. If at least one upgradable structure of that type exists, the AI selects an upgrade target.
On Easy, a random eligible structure is chosen 70% of the time, versus on Hard and Impossible, the AI scores candidates by SAM coverage weighted by SAM level and picks the best, with a 50% chance of selecting the second or third best instead. Upgrade percentages vary with difficulty: roughly 70%/40%/25%/10% from Easy to Impossible reflect how often randomness overrides scoring.
If structures of the target type exist but all are currently upgrading, the AI waits rather than building new ones, except when zero of that type exist.
Tile selection
The AI samples up to 25 candidate tiles, evaluates each against type-specific scoring criteria, and selects the highest-scoring tile that passes the standard build validity check.
For ports, candidates are random shore tiles on water that shares an ocean or lake component with at least one other player; isolated water bodies do not qualify, since ports there cannot generate trade. As of Update 33.0, the AI also avoids placing ports on small lakes. For all other structures, candidates are random owned tiles within the territory's bounding box, with up to 100 attempts per sample to find a valid owned tile.
Scoring uses two distance constants derived from nuclear configuration: the border spacing equals the outer atom bomb blast radius, and the structure spacing is twice that value. These caps prevent scoring from continuing to reward distance indefinitely.
| Structure Type | Scoring Summary |
|---|---|
| Missile Silo + City |
|
| Ports |
|
| Factory |
|
| SAM Launcher |
|
Rail Connectivity
On harder difficulties, factory and city placement also considers the rail network. The chance that connectivity scoring applies on a given call depends on difficulty: never on Easy, roughly 60% on Medium, roughly 75% on Hard, and always on Impossible.
When active, the AI builds a list of reachable train stations once per call. Each station is weighted by its source: the nation's own city, port, or factory stations receive a weight equivalent to the ratio of self-trade gold to ally-trade gold, approximately 0.29. Stations belonging to teammates weigh 1.0; stations belonging to allies or other tradeable players weigh 0.71. Bot stations and embargoed players are excluded.
For a candidate tile, the AI looks at stations within the train range, which is between 15 and 100 tiles by squared distance, groups them by cluster, and takes the maximum weight in range from each cluster. Isolated stations contribute their weight individually. The sum is multiplied by the structure spacing constant and added to the tile's existing score.
The effect is that nations on harder difficulties place factories and cities to connect into profitable rail networks, particularly favoring proximity to ally infrastructure, rather than placing them on terrain considerations alone.