Skip to content

NPC Players

Realms aren’t empty outside of human players. Each realm’s YAML config can declare an npc_players population — a set of computer-led lords who found towns, grow their economy, raise armies, and expand across the season just like anyone else. They play through the exact same game rules and the exact same API-driven mechanics as a human player: no hidden bonuses, no free resources, no skipped travel time.

They follow every rule you do

An NPC player is a real Player row occupying a real town, with its own resource pool, buildings, and army, resolved by the same background resolver that handles everyone else’s marches, training, and research. Nothing about them is special-cased in combat or economy math.

Two things an NPC lord deliberately never does, so that you can always look at them: it trains no scouts, and it never researches Informatics. NPC towns keep their city gates closed, and behind closed gates it is Informatics that turns enemy scouts away — a defender whose level is higher than the scout’s bounces the party home with nothing. An NPC town sits at Informatics 0 forever, so a party at any level, even 0, always reads it (at the depth its own intel earns; see Closed gates). NPC lords also never camp an attack and are exempt from the realm’s hero rule: they hold no heroes, and their raids simply go unled.

That cuts both ways. NPC players are not friendly — a warlord-flavored NPC will raid nearby targets it judges it can beat, and it is not obligated to leave you alone. The only thing standing between you and an NPC raid is the same beginner protection window that shields you from any other player; once that expires, an NPC lord is a threat like any other.

One thing they do not do yet: found colonies. NPC expansion escorts a founding march with its own garrison — up to 10 of its most numerous combat-capable unit (the scout is never drafted for it, and neither is the transporter — one of the roster’s two non-combatants) — to found cities only, and their expansion is capped by the same city cap yours is. The escort is drafted straight from whatever the town already has on hand. The realm’s settlers are the exception: an NPC lord must carry the same founding_required_workers Workers you do, and since nothing else in its repertoire ever trains a non-combatant, an NPC short of Workers spends its expansion day training them instead of marching — so a bot’s first expansion in a canonical realm takes a while to arrive, by design. An NPC with neither the Workers nor anywhere to train them skips the day. An NPC settles near home: it looks for a legal free tile within a dozen or so tiles of the town the expedition leaves from, and if its neighborhood is full it simply waits for the next day rather than marching across the world. Colony strategy for NPC players is a follow-up.

The four archetypes

Every NPC player is assigned one archetype at spawn, which shapes what it prioritizes each time it acts:

ArchetypeFavors
WarlordTraining troops and raiding nearby targets — the aggressive end of the spectrum.
StewardBuilding up its town’s economy and infrastructure — production buildings, housing, defenses.
MerchantTrading on the market, keeping stock balanced by buying what it’s short on and selling its surplus.
OpportunistStriking opportunistically at whatever is in reach it can plausibly defeat.

A realm’s config sets both how many NPC players populate it and the mix of archetypes among them (for example: 30% warlord, 40% steward, 20% merchant, 10% opportunist).

Valleys

NPC lords hold valleys under the same Town Hall cap you do, and two of the archetypes go after them. On its hourly army turn a Warlord (occasionally) or a Steward (a little more often — valleys are economy, and it is the economist’s one offensive act) checks whether its Town Hall has room for another valley and no capture of its own is already marching, then looks at every unowned valley within its usual raiding radius, keeps the ones its raid-sized party can plausibly beat (the same crude estimate it raids with, minus the wall a valley never has), and marches a capture at the most valuable of them — the largest production bonus at the valley’s current level, so a level-10 lake outranks a level-10 forest. The march is an ordinary capture: the cap is re-checked when it lands, the winners go home, and the valley’s level freezes for the NPC’s city.

What an NPC does not do yet: contest a valley you or another lord holds, abandon a weak valley to chase a better one, or reinforce the ones it has. An NPC’s valley is exactly as safe as an empty valley — one unit takes it back. Those behaviors belong to the NPC fidelity work that follows.

How often they act

NPC players don’t act continuously — they’re driven by a small set of scheduled ticks, each covering a different concern:

  • Building — roughly every 5 minutes, an NPC evaluates and queues construction or upgrades.
  • Army — roughly every hour, an NPC reviews its garrison and, if its archetype favors it, trains troops, launches a raid, or marches on a valley.
  • Market — roughly every hour, an NPC checks its trade posture and buys or sells surplus resources. NPC lords play by your order-slot rules, so one whose Market is full of unsold offers first cancels its oldest offer once that offer has sat unsold for about six hours (paying the trade fee, like anyone else) and then re-posts at its current prices. An NPC offer you leave alone will not sit on the board forever.
  • Expansion — roughly once a day, an NPC that has the means considers founding an additional town, somewhere in the neighborhood of one it already holds.

Because these run on fixed cadences rather than reacting instantly to events, an NPC’s behavior has a natural, human-like lag rather than reacting to everything the instant it happens.

Each tick also processes a bounded batch of NPC players, and the batch rotates through the population. In a realm with more NPC lords than one batch holds, an individual NPC’s turn comes around every few ticks rather than on every one — so the cadences above are the floor for how often a given NPC acts, not a guarantee. Every NPC still gets its turn; none is left out.

Dead NPCs are replaced

An NPC player that loses its last town is not resurrected — but the realm doesn’t stay permanently short a player either. Once a day, a reconciliation pass compares the realm’s live NPC-player count against its configured target and spawns fresh NPC players (with towns placed on the map like any new player) to fill the gap. Over a season, the NPC population trends back toward the configured count even as individual NPCs are eliminated.