Combat

Combat is Openfront’s main mechanic, allowing players, Bots, and Nations to spend Troops and time in order to gain territory. Additionally, players and nations may use Nukes fired from Missile Silos to destroy territory and infrastructure.

Ground combat

Ground combat is the main form of attacking that a player may do. It is performed by left clicking on any territory your territory borders. This will send an attack towards all territory with the same owner you have borders with.

Players may decide how many troops they will send into combat with the Attack Ratio slider at the bottom left of the UI. Once an attack is launched, the number of attacking troops is immediately removed from the player’s total troop count, usually changing the troop gain rate. By clicking on a territory you are already attacking, you may add more troops into the same attack. In almost all situations, it is ill advised to send 100% of your troops into any attack, as this will significantly decrease your troop gain rate, and a 3rd party attacker may take over your land while you are attacking the first defender.

When defending, all of your troops which are a part of your max troop count act as defenders. You may send troops from defending to counterattacking, resulting in an equal decrease of your troops as your attacker’s. This is sometimes wanted, and sometimes unwanted.

if you conquer all tiles of an enemy, you will gain all of their gold as a reward.

The attack speed and attack efficiency (how many troops are lost on each side) depends on many factors, namely:

  • Type of attacker and defender (player, bot, nation)
  • Amount of Tiles owned by attacker and defender
  • Difficulty of game (for nations)
  • Terrain
  • Presence of Defense Posts
  • Presence of Fallout
  • Ratio of attacking and defending troops
  • Size of borders between attacker and defender (implicit)
  • Defender’s connection status (for players)
  • Attacker’s and defender’s Traitor debuff
  • AFK status of defender

The fastest and most efficient attack would be one by an extremely large player towards a traitor bot, with a 2x the amount of attackers over defenders, on the easiest terrain, without defense posts with extremely tiny borders.

Calculation

Update 34.0 attack model

Update 34.0 rebuilt the per-tile attack formula around two ratios. The detailed formulas in the sections further below describe the pre-v34 model and are kept for reference; the current model works as follows.

Each terrain type gives two base values: a magnitude mag (how bloody the tile is — Plains 80, Highland 100, Mountain 120) and a tileCost (how slow the tile is to take — Plains 16.5, Highland 20, Mountain 25). Both are multiplied by the defense post bonus and the fallout modifier where they apply. A human or nation attacking a bot pays 0.7× mag, and attacking a disconnected teammate costs no troops at all.

Attacker and defender losses per tile:

troopRatio   = defenderTroops / attackTroops
attackerLoss = mag × traitorDebuff × clamp(troopRatio, 0.6, 2)
               × (0.463 × largeAttackerBonus × largeDefenderBonus + 0.0039 × defenderTroopsPerTile)
defenderLoss = defenderTroops / defenderTiles

How outnumbered the attack is (clamped, so bigger pushes pay less per tile) scales a cost made of a base plus the defender’s troop density — packed land is expensive to take, spread-thin land is cheap. A stack of about ¾ of the defender’s army pays the same as before v34; bigger stacks pay less and smaller stacks pay more, so overwhelming attacks no longer pay the full “turtle tax”.

The large-territory bonus is now a smooth logistic curve in log(tiles): about 1 for small territories, halfway at 300,000 tiles, and floored at 0.3× for a huge attacker (0.7× for a huge defender). Nothing under 100,000 tiles is affected.

Attack speed, as the fraction of a tick each tile consumes:

speedCost    = clamp(troopRatio, 0.82, 7.5) × clamp(troopRatio / 20, 1, 50) / 8.55
tickFraction = speedCost × tileCost × largeAttackerSpeedBonus × largeDefenderBonus × traitorSpeedDebuff / borderSize

Overwhelming stacks land about 18% faster (the 0.82 floor), and every player-vs-player attack is roughly 10% faster than in v33. The giant-empire speed bonus is smoothed and capped at roughly 3.3× a small player’s rate instead of running away at 9×, so players can no longer be captured extremely fast. Unclaimed land costs clamp(2000 × tileCost / attackTroops, 5, 100) per tile against a budget of twice the border size, and the attacker loses mag / 5 troops per tile there (mag / 10 for bots).

Attack efficiency

The formula below is the pre-v34 model — see Update 34.0 attack model for the current one.

The amount of attacking troops lost for each Tile is calculated by the following function.

attackerTroopLoss(tileOwner) = { 0.8 ∗ terrainDef ∗ defensePost ∗ botDebuff ∗ largeAttackerBuff ∗ largeDefenderDebuff ∗ traitorDebuff ∗ clampedTroopRatio if player or nation or bot terrainDef ∗ falloutDef attackerTypeBuff if wilderness {\displaystyle {\displaystyle {\text{attackerTroopLoss(tileOwner)}}={\begin{cases}0.8*{\text{terrainDef}}{\text{defensePost}}{\text{botDebuff}}{\text{largeAttackerBuff}}{\text{largeDefenderDebuff}}{\text{traitorDebuff}}{\text{clampedTroopRatio}}&{\text{if player or nation or bot}}&\{\frac {{\text{terrainDef}}*{\text{falloutDef}}}{\text{attackerTypeBuff}}}&{\text{if wilderness}}\end{cases}}}}

Where:

terrainDef(tileTerrainType) = { 0.8 if plains 5 if highlands 1.2 if mountains {\displaystyle {\displaystyle {\text{terrainDef(tileTerrainType)}}={\begin{cases}0.8&{\text{if plains}}&\5&{\text{if highlands}}&\1.2&{\text{if mountains}}\end{cases}}}}

defensePost(isDefensePostInRangeOfAttackedTile) = { 5 if yes 1 if no {\displaystyle {\displaystyle {\text{defensePost(isDefensePostInRangeOfAttackedTile)}}={\begin{cases}5&{\text{if yes}}&\1&{\text{if no}}\end{cases}}}}

botDebuff(isDefenderBot) = { 0.8 if yes 1 if no {\displaystyle {\displaystyle {\text{botDebuff(isDefenderBot)}}={\begin{cases}0.8&{\text{if yes}}&\1&{\text{if no}}\end{cases}}}}

largeAttackerBuff(attackerNumTilesOwned) = { 1 if  numTilesOwned < 100000 ( 100000 attackerNumTilesOwned ) 0.7 if  attackerNumTilesOwned ≥ 100000 {\displaystyle {\displaystyle {\text{largeAttackerBuff(attackerNumTilesOwned)}}={\begin{cases}1&{\text{if }}{\text{numTilesOwned}}<100000\[4pt]\left({\frac {100000}{\text{attackerNumTilesOwned}}}\right)^{0.7}&{\text{if }}{\text{attackerNumTilesOwned}}\geq 100000\end{cases}}}}

largeDefenderDebuff(numTilesOwned) = 0.7 + 0.3 ∗ ( 1 − 1 1 + e ( − ln ⁡ ( 2 ) 50000 ∗ ( defenderNumTilesOwned − 150000 ) ) ) {\displaystyle {\displaystyle {\text{largeDefenderDebuff(numTilesOwned)}}=0.7+0.3*\left(1-{\frac {1}{1+e^{\left(-{\frac {\ln(2)}{50000}}*({\text{defenderNumTilesOwned}}-150000)\right)}}}\right)}}

traitorDebuff(isDefenderTraitor) = { 0.8 if yes 1 if no {\displaystyle {\displaystyle {\text{traitorDebuff(isDefenderTraitor)}}={\begin{cases}0.8&{\text{if yes}}&\1&{\text{if no}}\end{cases}}}}

ratio(defenderTroops, attackerTroops) = defenderTroops attackerTroops , clampedTroopRatio(ratio) = { 0.6 if  ratio ≤ 0.6 2 if  ratio ≥ 2 ratio if  0.6 < ratio < 2 {\displaystyle {\displaystyle {\text{ratio(defenderTroops, attackerTroops)}}={\frac {\text{defenderTroops}}{\text{attackerTroops}}},{\text{clampedTroopRatio(ratio)}}={\begin{cases}0.6&{\text{if }}{\text{ratio}}\leq 0.6&\2&{\text{if }}{\text{ratio}}\geq 2&\{\text{ratio}}&{\text{if }}0.6<{\text{ratio}}<2\end{cases}}}}

attackerTypeBuff(attackerType) = { 10 if bot 5 if player or nation {\displaystyle {\displaystyle {\text{attackerTypeBuff(attackerType)}}={\begin{cases}10&{\text{if bot}}&\5&{\text{if player or nation}}\end{cases}}}}

fallutRatio = numAllFalloutTiles numAllTiles , falloutDef(isTileFallout) = { 5 − falloutRatio ∗ 2 if yes 1 if no {\displaystyle {\displaystyle {\text{fallutRatio}}={\frac {\text{numAllFalloutTiles}}{\text{numAllTiles}}},{\text{falloutDef(isTileFallout)}}={\begin{cases}5-{\text{falloutRatio}}*2&{\text{if yes}}&\1&{\text{if no}}\end{cases}}}}

The amount of defending troops lost for each tile is calculated by the following function.

defenderTroopLoss(tileOwner) = { defenderTroops defnderNumTilesOwned if player or bot or nation 0 if wilderness {\displaystyle {\displaystyle {\text{defenderTroopLoss(tileOwner)}}={\begin{cases}{\frac {\text{defenderTroops}}{\text{defnderNumTilesOwned}}}&{\text{if player or bot or nation}}&\0&{\text{if wilderness}}\end{cases}}}}

If a player has left the game (is AFK) and is on the same team as the attacker, no troops are lost by the attacker when attacking them.

Attack speed

The formula below is the pre-v34 model — see Update 34.0 attack model for the current one.

Attack speed is expressed as Ticks per tile used, meaning that the lower the number, the faster the attack goes.

Generally, players want their attacks to be as fast as possible, however, in certain situations, it can be useful to have a very slow attack, as this allows you to put in more troops into an attack than your maximum population.

speed(tileOwner) = { terrainSpeed ∗ largeDefenderSpeedDebuff ∗ largeAttackerSpeedBuff ∗ defensePostSpeedDebuff ∗ traitorSpeedBuff ∗ clampedSpeedAttackRatio if player or nation or bot clampedWildernessSpeed if wilderness {\displaystyle {\displaystyle {\text{speed(tileOwner)}}={\begin{cases}{\text{terrainSpeed}}{\text{largeDefenderSpeedDebuff}}{\text{largeAttackerSpeedBuff}}{\text{defensePostSpeedDebuff}}{\text{traitorSpeedBuff}}*{\text{clampedSpeedAttackRatio}}&{\text{if player or nation or bot}}&\{\text{clampedWildernessSpeed}}&{\text{if wilderness}}\end{cases}}}}

Where:

terrainSpeed(tileTerrainType) = { 16.5 if plains 20 if highlands 25 if mountains {\displaystyle {\displaystyle {\text{terrainSpeed(tileTerrainType)}}={\begin{cases}16.5&{\text{if plains}}&\20&{\text{if highlands}}&\25&{\text{if mountains}}\end{cases}}}}

largeDefenderSpeedDebuff(numTilesOwned) = 0.7 + 0.3 ∗ ( 1 − 1 1 + e ( − ln ⁡ ( 2 ) 50000 ∗ ( defenderNumTilesOwned − 150000 ) ) ) {\displaystyle {\displaystyle {\text{largeDefenderSpeedDebuff(numTilesOwned)}}=0.7+0.3*\left(1-{\frac {1}{1+e^{\left(-{\frac {\ln(2)}{50000}}*({\text{defenderNumTilesOwned}}-150000)\right)}}}\right)}}

largeAttackerSpeedBuff(attackerNumTilesOwned) = { 1 if  numTilesOwned < 100000 ( 100000 attackerNumTilesOwned ) 0.6 if  attackerNumTilesOwned ≥ 100000 {\displaystyle {\displaystyle {\text{largeAttackerSpeedBuff(attackerNumTilesOwned)}}={\begin{cases}1&{\text{if }}{\text{numTilesOwned}}<100000\[4pt]\left({\frac {100000}{\text{attackerNumTilesOwned}}}\right)^{0.6}&{\text{if }}{\text{attackerNumTilesOwned}}\geq 100000\end{cases}}}}

traitorSpeedBuff(isDefenderTraitor) = { 0.8 if yes 1 if no {\displaystyle {\displaystyle {\text{traitorSpeedBuff(isDefenderTraitor)}}={\begin{cases}0.8&{\text{if yes}}&\1&{\text{if no}}\end{cases}}}}

ratio(defenderTroops, attackerTroops) = defenderTroops 5 ∗ attackerTroops , clampedTroopRatio(ratio) = { 0.2 if  ratio ≤ 0.2 1.5 if  ratio ≥ 1.5 ratio if  0.2 < ratio < 1.5 {\displaystyle {\displaystyle {\text{ratio(defenderTroops, attackerTroops)}}={\frac {\text{defenderTroops}}{5*{\text{attackerTroops}}}},{\text{clampedTroopRatio(ratio)}}={\begin{cases}0.2&{\text{if }}{\text{ratio}}\leq 0.2&\1.5&{\text{if }}{\text{ratio}}\geq 1.5&\{\text{ratio}}&{\text{if }}0.2<{\text{ratio}}<1.5\end{cases}}}}

wildSpeed = 2000 ∗ max ( terrainSpeed ∗ defensePostSpeedDebuff ∗ falloutSpeedDebuff , 10 ) attackerTroops , clampedWildernessSpeed(wildSpeed) = { 5 if  wildSpeed ≤ 5 100 if  wildSpeed ≥ 100 wildSpeed if  5 < wildSpeed < 100 {\displaystyle {\displaystyle {\text{wildSpeed}}={\frac {2000*\max({\text{terrainSpeed}}{\text{defensePostSpeedDebuff}}{\text{falloutSpeedDebuff}},10)}{\text{attackerTroops}}},{\text{clampedWildernessSpeed(wildSpeed)}}={\begin{cases}5&{\text{if }}{\text{wildSpeed}}\leq 5&\100&{\text{if }}{\text{wildSpeed}}\geq 100&\{\text{wildSpeed}}&{\text{if }}5<{\text{wildSpeed}}<100\end{cases}}}}

fallutRatio = numAllFalloutTiles numAllTiles , falloutSpeedDebuff(isTileFallout) = { 5 − falloutRatio ∗ 2 if yes 1 if no {\displaystyle {\displaystyle {\text{fallutRatio}}={\frac {\text{numAllFalloutTiles}}{\text{numAllTiles}}},{\text{falloutSpeedDebuff(isTileFallout)}}={\begin{cases}5-{\text{falloutRatio}}*2&{\text{if yes}}&\1&{\text{if no}}\end{cases}}}}

Retreat

A retreat is ordered immediately when requested by clicking the X next to the attack. The attack enters a retreating state and stops conquering further tiles, but the actual return of troops only executes after 20 ticks (about 2 seconds at the standard rate). Survivors are returned to the attacker’s main troop pool.

A retreat from an attack against another player applies a 25% retreat penalty to the surviving troops.

Annexation

If you fully surround a territory, or if you split a territory into two disconnected parts where at least one doesn’t have coastal borders, you get all of the surrounded territory instantly and with 0 defender troop loss.

Player may send up to 3 Transport Ships to any territory. It is usually advised to send as few troops as possible per ship, as if a transport ship is sunk by a Warship, all troops on board are lost.

Naval attacks may be sent against territories you have borders with, which can help speed up attacks by focusing on important parts of the territory (such as easy territory with easy terrain, or many buildings), or by making Annexation possible for territories with coastal borders.

If a boat was headed for a territory, which then changes owners (even to an ally), you do not attack with all of your troops, however a single Tile gets conquered, which allows you to launch surprise attacks, as these small territories may be quite difficult to spot.

As of v26.16 there is a strategy colloquially named “boat stacking”, which abuses the fact that troops in boats do not count towards your maximum population, allowing you to send with many troops a boat to a far-off land land, and then retreat it, to effectively increase your troop count way above your maximum.

Retreat

You may retreat a transport ship by clicking “X” next to the attack in the events panel. The ship will return to the tile it started at. There is no troop loss.

Nuclear combat

Players may launch Nukes using Missile Silos, and the may defend against nukes using SAM Launchers. If a nuke lands, it will turn land in an area around the impact site into Fallout.

Nukes can destroy Trade Ships, Transport Ships, and Warships, and all land Buildings, and units.

Alliances

Players in alliances may not conquer each other’s land. If an ally launches a nuke into their ally’s territory, they will automatically get the Traitor debuff, as long as they destroy 100 or more tiles of the ally’s territory. As of v26.16 this grace amount of 100 tiles can be abused to destroy an ally’s buildings on the coast (without becoming a traitor), particularly ports, by aiming an Atom Bomb in a way as to just barely graze the ally’s port.

Nukes can destroy any units, including warships, without breaking alliances, as long as they do not destroy enough ally land.

You may conquer a single ally pixel without becoming a traitor by sending a transport ship into territory, which gets conquered by an ally while your ship is on its way.

Teams

In a team game, teammates cannot conquer each other’s land, unless the defender is AFK.

Players cannot launch nukes directly into teammates’ territories, however, if a nuke’s impact site is outside of teammates’ territories, it may destroy the surrounding territory. This can be used to get borders with an opposing team, if you are blocked by your teammates, though it should be used with caution.

Content from the OpenFront community wiki, available under CC BY-SA 4.0.