Frontlines
Play free
← Back to the blogblog / strategy / frontlines-alliances-how-they-work
● Strategy

How Alliances Work in Frontlines, and What Betrayal Costs

A solo alliance lasts 10 minutes. Leaving gives a 5-minute truce, betraying makes you 35% easier to conquer for good. Every number from the game code.

AH
Arthur HofDeveloper · Frontlines & CONQUEST
publishedOct 13, 2026
reading time5 min
How Alliances Work in Frontlines, and What Betrayal Costs

In a solo game an alliance with an AI nation lasts 10 minutes and then ends on its own. That is also the one exit with no penalty: once it has expired, you can attack the ex-ally the same second.

Leave early and you get a 5-minute truce. Betray and you can attack immediately, but your defense is 35% worse for the rest of the match.

Online it is different again. A pact between two players has no clock and no cost to break. This page lays out both rule sets, with the numbers read from the game code and replayed in a script.

10 minterm of a solo alliance, extendable in the last 90 s
5 + 5 mintruce, then surprise window, after you leave
-35%defense for a betrayer, permanent
0 sdelay or penalty for leaving an online pact

In a solo game the AI asks, you cannot

There is no propose button for an AI nation. The only alliance offers you will see come from the bots, and they come with conditions.

A nation (the aggressive AI type) only courts a neighbor that holds at least 1.1 times its tiles. A settler (the peaceful type) only asks a neighbor whose available troops are at least 1.25 times its own. Pirates and the Outbreak horde never ask. Nobody asks a traitor, in team modes, or online.

Each bot decides every 1.5 times its think interval on average. A nation rolls a 4% chance per decision and a settler 8%, so once you qualify the wait is short. We computed the expected seconds from the think intervals in config.js:

DifficultyNation, expected waitSettler, expected wait
Easy98 s73 s
Normal68 s51 s
Hard45 s34 s

Read these as a best case. A settler's pact check sits after its building decisions, and a build ends that decision early. After any offer the same bot stays quiet for 15 minutes (nation) or 10 minutes (settler).

You have 20 seconds to answer an offer. Ignoring it counts as a no.

An alliance blocks more than land attacks

While a pact stands, four things stop between you and the ally.

  • Land attacks, both directions. launchAttack refuses and returns false.
  • Amphibious landings. A transport cannot put troops ashore on an ally's coast.
  • Naval fire. Warships and carriers skip allied ships, so their patrols leave each other alone.
  • Missiles. In a solo game, aim a rocket, nuke or H-bomb at a tile an ally owns and the game first marks you a betrayer, then fires. A 4,500-gold rocket is an expensive way to find that out. The SAM post has the missile prices.

What a pact does not do is share a win. Outside team modes the 70% check counts only your own tiles, so an ally is still a rival for the last 20% of the map.

Frontlines on the Eurasia map four minutes into a free-for-all, with large nations in green, purple and cyan meeting along long borders
Eurasia, four minutes in. Long shared borders are where a pact saves you the most troops.

Letting it expire is the only exit with no penalty

When the term runs out, the game deletes the alliance and writes one log line. It sets no truce and no debuff. You are simply free to attack.

Here is every way out, and how long until you can attack with no penalty at all. The times come from the alliance rules in game.js and config.js.

ExitFirst attackPenalty
Let it expire600 s minus the pact's ageNone
Leave, then wait600 s from nowNone
Leave, then attack after the truce300 s from now35% worse defense for 5 minutes
Betray and attackNow35% worse defense, permanent, and no more offers

Leaving early is never faster than waiting for a clean attack, because the leave clock (5 minutes of truce plus a 5-minute surprise window) is always longer than what remains of the term. Its one edge is the middle row: if the pact is younger than 5 minutes, leaving gets you a debuffed attack sooner than expiry would.

The truce also protects you. It works in both directions, so the ex-ally cannot attack you during those 5 minutes either.

In the last 90 seconds the ally offers an extension. Accept and the term resets to 10 minutes from that moment. Decline or ignore it and the pact ends at its original time.

A betrayer is cheaper to conquer for the whole match

The game stores one flag for a betrayer and applies it to every attack aimed at you, not just the ex-ally's. The note next to the number in the game code states the intent:

betrayers defend 35% worse (permanent)

— frontlines-io/src/config.js, next to traitorDefenseMult

The 0.65 factor multiplies the two terms that make enemy land expensive: how densely it is held and how badly the attack is outnumbered. We replayed the real formula at minute 10, plains only, with the defender holding a compact blob. Our troops-needed post explains the method.

DefenderStateFirst tile costsTroops to take the whole nation
500 tiles, 5,000 troopsNormal9.628,550
500 tiles, 5,000 troopsBetrayer6.757,450 (13% fewer)
500 tiles, 5,000 troopsBetrayer, capital just lost5.686,850 (20% fewer)
200 tiles, 2,000 troopsNormal8.673,350
200 tiles, 2,000 troopsBetrayer6.133,000 (10% fewer)

The first tile gets 30% cheaper, but the whole nation only gets 10 to 13% cheaper, because a garrison that is being ground down makes the late tiles cheap anyway. That is still a permanent discount for every neighbor you have.

Two more costs sit outside the formula:

  • A nation picks the softest bordering rival by the lowest score, and your score is multiplied by 0.55 as a human. For a traitor that multiplier drops to 0.4, so the AI prefers you more.
  • A traitor gets no alliance offers and no extension offers for the rest of the match, so any other pact you hold runs out at its normal time.

Online, a pact has no clock and no price

The online rules are a separate system in server.js. Players propose to each other from the leaderboard or a nation's menu. A request stays open for 60 seconds, the other player accepts or declines, and the pact exists until someone ends it.

There is no term, no extension prompt, no truce and no traitor flag. Leaving is instant, the table sees one line saying who left, and you can attack on the next tick. The "Betray and attack" button in the menu does exactly that: leave, then attack.

Two protections do hold while the pact lasts. Allies cannot attack each other and cannot fire missiles at each other, and warships hold fire. AI nations never take part in online pacts, in either direction.

That makes an online alliance as strong as the other player's patience and no stronger. If you want a duration that holds, the lobby's team modes are permanent for the whole match. Our room setup guide covers how to start one.

OpenFront runs a shorter pact with a lighter penalty

If you play OpenFront as well, do not carry these numbers over. In its Config.ts the default alliance lasts 5 minutes, the host can set anything from 1 to 15 minutes or turn alliances off, and a traitor's status lasts 30 seconds. Its EngineConfig.ts adds a speed debuff of 0.8 for traitors.

Frontlines' betrayal mark never wears off, and OpenFront's does within half a minute. We make Frontlines and CONQUEST, not OpenFront, so read its own rules before relying on this paragraph.

Picking an exit

Our recommendation is to treat the 10-minute term as a loan and plan the repayment. If you need that border quiet to finish a war elsewhere, take the pact, and watch the clock: you know the exact second it ends. Decline the extension when you are ready to move, and the attack costs you nothing extra.

Betrayal pays only when a head start of several minutes is worth more than a permanent 35% on every attack aimed at you. The discount is the same whether the match lasts 20 more minutes or 60, so it is a poor trade at minute 10 and a better one when the match is nearly decided. Against a healthy neighbor, the clean wait is cheaper.

You can try both in a free match at playfrontlines.com, and the controls are on the FAQ page.

— share
x in
— keep reading

More from the blog.