Skip to content

Units & Training

Units are the armies of Restfall. Browse the realm’s unit catalog, queue training in a building that can train soldiers (such as the Barracks), and watch your garrisons grow. Garrisoned units can then be sent on attacks or as support for an ally.

The Unit Roster

The default world ships Evony Age One’s twelve unit types with their canonical stats (worker, warrior, scout, pikeman, swordsman, archer, cavalry, transporter, cataphract, ballista, ram, catapult). Numbers below are from the shipped fast/free realms — always confirm against GET /api/v1/units/types for your own realm, since a custom world can define its own roster entirely.

UnitClassHPDefenseAttackRangeSpeedCarryPopUpkeep/hTrain (s)Cost (food / wood / stone / iron)Role
workerinfantry1005050 (melee)1200125050 / 150 / – / 10Cheap hauler and settler labour; “barely has any fighting ability” — a non-combatant (see below).
warriorinfantry20050500 (melee)120132580 / 100 / – / 50The fastest, cheapest body in the game — fodder, trap-clearer, cheap garrison filler.
scoutinfantry10050200 (melee)15515100120 / 200 / – / 150Spies on other towns (see The Scout Unit below) — by far the fastest unit in the game and the fastest hauler per march.
pikemaninfantry300150150 (270 vs cavalry)0 (melee)24016150150 / 500 / – / 100The anti-cavalry specialist and the roster’s best damage per population point.
swordsmaninfantry3502501000 (melee)13017225200 / 150 / – / 400The strongest melee body — the usual backbone of a garrison (600 damage to kill).
archerinfantry25050120612529350300 / 350 / – / 300Ranged skirmisher: fires six paces out and buys free volleys against anything walking in, but fragile once reached.
cavalrycavalry5001802500 (melee)51003185001000 / 600 / – / 500Fast raider — the fastest combat unit, closes on archers in three turns, and a solid hauler.
transportermachine70060100 (melee)150004101000600 / 1500 / – / 350The loot wagon: 5,000 carry per unit (10,000 at Logistics 10). A non-combatant — it walks to the front like any melee group, so escort it.
cataphractcavalry10003503500 (melee)48063515002000 / 500 / – / 2500Heavy cavalry — the toughest and hardest-hitting mounted unit, expensive to feed.
ballistamachine320160450713555030002500 / 3000 / – / 1800Long-range engine that out-ranges archers (and an Archer’s Tower) by one pace: shells the Wall from pace 12, untouched by a range-6 garrison.
rammachine500016025031451010045004000 / 6000 / – / 1500The wall-breaker: 5,160 damage to kill, grinds the Wall from three paces out. Not an army on its own.
catapultmachine4802006008175825060005000 / 5000 / 8000 / 1200Highest attack and longest range of any unit — nothing out-ranges it at any Archery level. The only unit that costs stone, and by far the hungriest.

Every unit’s four attack values are equal except the pikeman’s attack_vs_cavalry (270). unit_class (infantry, cavalry, or machine) decides which of a unit’s four attack values applies when something else targets it, not what it does with its own attacks — see the combat reference for how the four values are read.

Two units are flagged non_combatant (worker and transporter). The flag changes nothing in battle — both are real bodies in a garrison or a march and die like anything else — and nothing about training; it only tells computer-led NPC players not to raise or escort with them.

Training gates

The Barracks lists every unit type, but each one also has to be unlocked. A unit carries two gates, both of them Evony’s:

  • min_training_building_level — the level the training building listing the unit must have reached. In the shipped realms that is the Barracks; a realm may spread its roster over several training buildings, and then the gate is the level of whichever one you place the order at.
  • requires_technologies — leveled research prerequisites, checked against that town’s own research levels (research is per town).
UnitBarracks levelResearch
worker1—
warrior1—
scout2Informatics 1
pikeman2Military Tradition 1
swordsman3Iron Working 1
archer4Archery 1
cavalry5Horseback Riding 1
transporter6Logistics 1, Metal Casting 3
cataphract7Iron Working 5, Horseback Riding 5
ballista9Metal Casting 5, Archery 6
ram9Iron Working 8, Metal Casting 7
catapult10Metal Casting 10, Archery 10

Both gates are published on GET /api/v1/units/types, so a client can show the whole ladder — including the units you cannot build yet — without guessing. An order for a locked unit is rejected with a message naming the first requirement you do not meet: the building level is reported before any research, since that is the one you can read off the building in front of you.

The test realm carries the same Barracks levels but only the research prerequisite whose technology it ships (pikeman → Military Tradition 1); a custom realm sets its own.

How Evony’s numbers were converted

The stats are transcribed from Evony Age One’s unit table and converted onto this engine with one fixed set of rules, so the roster’s internal ordering is Evony’s:

  • hp is Evony’s Life and defense its Defense, verbatim. The worker and the scout use Evony’s effective defense of 50 rather than the 10 / 20 their in-game descriptions showed. Because this engine’s toughness is additive (hp + defense) rather than Evony’s capped multiplicative reduction, effective toughness ordering is the same except that the catapult and the cavalry tie at 680.
  • The four attack values are Evony’s single Attack, verbatim. The only situational bonus this engine can express by class is the pikeman’s 270 against horsemen (the cavalry class is exactly cavalry + cataphract). Evony’s per-unit bonuses — cavalry 300 and cataphract 420 versus archers, swordsman 110 versus pikemen — are not modelled: they target one unit, not a class.
  • range is Evony’s yards divided by 200, rounded down (archer 1,200 → 6, ballista 1,400 → 7, ram 600 → 3); melee is anything under 200 yards. The catapult’s 1,500 yards would floor to 7, and is raised to 8 so that “nothing out-ranges catapults” stays true against the ballista at every Archery level.
  • speed is Evony’s speed divided by the same 200-yard pace, rounded half up with a floor of 1 (swordsman 275 → 1, pikeman 300 → 2, cataphract 750 → 4, cavalry 1,000 → 5, scout 3,000 → 15). Map march times keep their old anchors (swordsman 1, cavalry 5).
  • carry_capacity, population_cost and food_upkeep_per_hour are Evony’s Load, Population Cost and Age I Food Cost, verbatim; training_cost is the wiki’s per-unit cost table (lumber → wood; the catapult is the only stone cost).
  • training_time is Evony’s base recruit seconds (warrior 25 … catapult 6,000). Each realm scales every training order by one pacing knob, training_time_scale (0.1333 on the shipped free and fast realms — the pre-roster swordsman’s 30 s over Evony’s 225 s, so training feels as it did — and 1.0 on the test realm); see Train Units.
  • The scout is infantry, not cavalry: in Evony scouts are foot, boosted by Compass. That is the research that speeds scout marches here too (see Scouting).
  • The transporter is a plain melee machine. Evony’s “stays at the rear and only dies if the army loses” is not modelled — a transporter walks to the front like any range-0 group, so send an escort.
  • The Wall has 10,000 hit points per level (Evony’s level-1 durability), linear per level.

Unit Catalog

GET /api/v1/units/types

Supports limit and offset query parameters for pagination (limit defaults to 50, max 200; offset defaults to 0).

import httpx
response = httpx.get(
"http://localhost:8731/api/v1/units/types",
headers={
"Authorization": "Bearer your-token-here",
},
)
print(response.json())

Returns every unit type available in your realm, with full stats and costs, in the standard pagination envelope { "count", "limit", "offset", "results" }:

{
"count": 1,
"limit": 50,
"offset": 0,
"results": [
{
"id": "swordsman",
"unit_class": "infantry",
"hp": 350,
"range": 0,
"attack_vs_infantry": 100,
"attack_vs_cavalry": 100,
"attack_vs_machines": 100,
"attack_vs_buildings": 100,
"defense": 250,
"speed": 1,
"carry_capacity": 30,
"population_cost": 1,
"training_time": 225,
"is_scout": false,
"training_cost": [
{"resource_id": "food", "amount": 200},
{"resource_id": "wood", "amount": 150},
{"resource_id": "iron", "amount": 400}
]
}
]
}
FieldTypeDescription
idstringThe unit type identifier. Use it when training units and when dispatching attacks, scouts, and support.
unit_classstringinfantry, cavalry or machine. What a unit is decides which of an attacker’s four attack values is used against it — see the combat reference.
hpintHit points. A unit dies when the damage pooled against its group reaches hp + defense.
rangeintPaces this unit can strike from. 0 is melee: it must close to the enemy’s own pace. A ranged unit fires from a distance and is only reachable by units that can close on it. In battle the reach is floor(range × (1 + 0.05 × Archery level)) — its own side’s town’s Archery research, rounded down to whole paces (see Range).
attack_vs_infantryintDamage per unit against an infantry target. This is the headline attack number — most garrisons are infantry.
attack_vs_cavalryintDamage per unit against a cavalry target.
attack_vs_machinesintDamage per unit against a machine target.
attack_vs_buildingsintDamage per unit against the defender’s Wall — for every unit except the pikeman (see the note below the roster table) this is the same value as its attack against any other target class, no building-specific bonus. Siege units bring a wall down far faster only because their overall attack is higher across the board and they can shell it from outside the defenders’ return range, not because of any edge in this field specifically. Melee units batter the wall too, but slowly and while standing in the defenders’ fire.
defenseintAdded to hp to decide how much damage this unit soaks before it dies, on attack and defense alike.
speedintMovement speed. The slowest unit in a force determines its travel time — after the origin town’s march research (Compass, Horseback Riding) multiplies each unit’s speed by its class bonus; see Travel Time.
carry_capacityintHow many resources one unit can carry home as loot, before the origin town’s Logistics research scales the army’s total — see Raiding.
population_costintPopulation this unit drafts from your town’s idle population when trained — see Idle Population below.
training_timeintEvony’s base seconds to train one unit. An order for count units takes training_time × count × training_time_scale seconds — the realm’s training pacing knob (0.1333 on the shipped free/fast realms) — divided by the realm’s time_scale.
training_costarrayResources to train one unit, as {resource_id, amount} items. The full order costs amount × count of each resource.
min_training_building_levelintThe level the training building listing this unit must have reached before it can be ordered — see Training gates. 1 means no building gate.
requires_technologiesarrayLeveled research prerequisites, as {technology_id, min_level} items, checked against the training town’s own research levels. Empty means no research gate.

The Scout Unit

A realm may declare one unit type with is_scout: true in its unit catalog — by convention, scout. It is the only unit type that can be dispatched on a scouting mission: every other unit type is rejected with 400 Only scouts can scout., and a realm with no scout unit type configured rejects every scouting mission outright.

The shipped scout is built for exactly one job: reaching a target and getting a look at it. It is an infantry unit (Evony’s scouts are foot, so Compass — not Horseback Riding — speeds its marches) with speed 15, by a wide margin the fastest unit in the game, and a population_cost of 1 (120 food, 200 wood, 150 iron to train), so a Barracks can turn out scouts in bulk. It is not toothless: every attack value is 20, so a scout-only attack fights rather than deals nothing, and a garrisoned scout is a real body on the defending side with hp 100 and defense 50 — 150 damage to kill, a quarter of a swordsman’s 600 at the same population_cost — that shows up in the battle report as a defender loss like anything else.

Garrisoned scouts are not purely offensive, either: a town that keeps some at home contests any scouting mission sent against it (screening, see Scouting — Screening) — the target’s own scout garrison can grind down or outright destroy an incoming scouting party, and having any scouts home at all is the only way you learn you were scouted (town_scouted). Scout deaths, on either side of a screen, cost the town population like any other troop death.

Because they are part of the garrison, a scout screen is also collateral damage in an ordinary attack: an attacker who wipes the defending garrison wipes the scouts standing in it, and the town is left both undefended and blind. Raid first, scout second, and the second march walks in unopposed.

Train Units

POST /api/v1/units/train

import httpx
response = httpx.post(
"http://localhost:8731/api/v1/units/train",
headers={
"Authorization": "Bearer your-token-here",
},
json={
"building_id": "your-barracks-uuid",
"unit_type_id": "swordsman",
"count": 5,
},
)
print(response.json())

Returns 201 Created with the new training order. The acting player is identified by your realm token — there is no separate player header.

Resources are deducted immediately when the order is placed. The units themselves join the town garrison only when training finishes, after training_time × count seconds multiplied by the realm’s training pacing knob training_time_scale (Evony’s canonical base seconds are the training_time; the shipped free and fast realms scale them by 0.1333, so a swordsman is 30 s of training rather than 225) and divided by the realm’s time_scale. The town’s researched training technologies then reduce that duration — Military Science multiplies it by 0.9 ^ level (compounding, any unit), and Metal Casting divides it by 1 + 0.1 × level for siege engines (machine-class units) — and a Mayor idle in the town further multiplies the result by 0.995 ^ attack. The finish time is locked in when the order is placed.

{
"id": 42,
"building_id": "your-barracks-uuid",
"town_id": "your-town-uuid",
"unit_type_id": "swordsman",
"count": 5,
"started_at": "2026-03-12T12:00:00Z",
"finished_at": "2026-03-12T12:02:30Z"
}

Requirements

  • count must be greater than zero.
  • The building must exist in a town you own.
  • The building must be fully constructed (level 1 or higher) — buildings still under construction cannot train units.
  • The building must be able to train units, and the requested unit type must be on its trainable list (in the default world, the Barracks trains all 12 shipped unit types — worker, warrior, scout, pikeman, swordsman, archer, cavalry, transporter, cataphract, ballista, ram and catapult).
  • The building must have reached the unit’s min_training_building_level, and the town must have researched every technology in the unit’s requires_technologies to at least its min_level — see Training gates.
  • Each building’s training queue holds at most 5 pending orders — 10 on an account with a premium entitlement.
  • You must be able to afford the full cost (training_cost × count), paid from the building’s town.
  • The order must fit your town’s idle population — see Idle Population below.
  • The season must be active.

Sequential Queue

Orders in the same building train one after another. If the building already has pending orders, a new order starts when the last pending order finishes; otherwise it starts immediately. The whole order completes at once at finished_at — units do not trickle in one by one.

Idle Population

Training drafts from your town’s idle population — residents neither farming a field nor already committed to the army — instead of a per-building housing cap. An order is rejected with 400 when it would overdraw idle population:

{
"detail": "Not enough idle population. Idle: 12, requested: 15."
}

Idle population is population - field_labour - troop_population (see Population, Loyalty & Tax for field_labour), where troop_population sums population_cost over your garrison, every training order (across all your buildings, not just the one you’re training in; an order whose time is up but has not yet been applied to your garrison still counts), your wounded units, every unit in the healing queue, every unit currently on an outbound march from this town (attacking, supporting an ally, scouting or escorting a founding expedition — still away, not yet home; an attack on its way back and a scouting party count only the units that survived, since the battle already took the dead off your population), and this order itself. Marching units count because they were already drafted from this town’s population and haven’t returned; without this, training to the cap, sending the army out on a march, and training again would let one town’s population fund an unbounded army. Allied Support garrisoned in this town by someone else is excluded from troop_population instead — those units fight for you but were never drafted from your own population, so they don’t eat your idle budget. Wounded and healing units count because they are still your population: losing a defence does not free room to train a replacement army that the healed survivors would then push back over the cap. Training does not change population — those residents were already counted, they just change category from civilian to soldier. There is no escape hatch: a town with no Cottages (so population never grows past 0) can train nothing, regardless of which building or level you train from — the training building’s own level has no bearing on the cap.

Setting a field’s production rate to 0% excuses that field’s labour demand entirely, freeing those workers for training — the classic move before a big training order.

Training Queue

GET /api/v1/units/training

Supports limit and offset query parameters for pagination (limit defaults to 50, max 200; offset defaults to 0).

import httpx
response = httpx.get(
"http://localhost:8731/api/v1/units/training",
headers={
"Authorization": "Bearer your-token-here",
},
)
print(response.json())

Returns all pending training orders across your towns, ordered by start time, in the standard pagination envelope { "count", "limit", "offset", "results" }. Each entry in results has the same shape as the training response above (id, building_id, town_id, unit_type_id, count, started_at, finished_at).

Finished orders disappear from this list — the units then appear in the town garrison instead.

Town Garrisons

GET /api/v1/units/

Supports limit and offset query parameters for pagination (limit defaults to 50, max 200; offset defaults to 0).

import httpx
response = httpx.get(
"http://localhost:8731/api/v1/units/",
headers={
"Authorization": "Bearer your-token-here",
},
)
print(response.json())

Returns the unit garrison of each of your towns, in the standard pagination envelope { "count", "limit", "offset", "results" }:

{
"count": 1,
"limit": 50,
"offset": 0,
"results": [
{
"town_id": "your-town-uuid",
"units": {"swordsman": 15, "archer": 5}
}
]
}

Finished training orders are applied automatically by the server within a few seconds of completion — you don’t need to do anything for trained units to arrive. Calling this endpoint also applies any just-finished orders on the spot, so the garrison you see always includes everything that has finished training. Either way the new units start eating at their order’s finished_at exactly: the town is settled up to that instant at the garrison it had until then, so the hours before the order finished are never charged their upkeep.

Garrisoned units defend the town against incoming attacks, alongside any allied support stationed there. Units sent away on an attack or as support are deducted from the garrison while they are gone.