Population, Loyalty & Tax
Restfall’s population economy is a faithful copy of classic Evony Age One’s cottage/loyalty system. Every town has three interconnected stats — population, loyalty, and tax rate — plus a fourth, grievance, that only ever moves through events (never on its own). Together they decide how fast your town fills toward capacity and how much gold your tax rate actually earns.
The tick
Loyalty, population, and tax-derived gold advance in discrete ticks, not
continuously. A tick is 360 real seconds, divided by the realm’s
time_scale — a fast realm at 3.0 ticks
every 120 seconds. Ticks are settled lazily, the same watermark discipline
as resources: whenever a town is touched (a GET, a build, a tax change, …)
the server advances as many whole ticks as have elapsed since the last
settle, and a fractional tick waits for the next one.
This is a separate watermark from resource production. Building revenue (Farm, Lumber Mill, Quarry, Mine) still accrues continuously, exactly as before — only loyalty, population, and the tax-derived gold trickle are tick-stepped. Gold has no continuous building revenue of its own any more — the Market trades resources but does not mint gold — so every bit of gold income comes from the tick-stepped tax trickle below.
Each tick, in order:
- Loyalty drift. The target is
clamp(100 − tax_rate − grievance, 0, 100). Loyalty moves 1 point toward that target — up, down, or not at all if already there. It takes 5 ticks (30 real-world minutes attime_scale1.0) for loyalty to close a 5-point gap. - Population.
capacityis the sum of your Cottages’ capacity (see Cottage capacity below), and the target occupancy iscapacity × loyalty ÷ 100:- Below target, population grows by
floor(capacity × 5% × (100 − tax_rate) ÷ 100), cut off at the target — it never overshoots on the way up. - Above target, population shrinks by
floor(capacity × 5% × tax_rate ÷ 100), without a cutoff — an overshoot (population above target) corrects itself gradually across several ticks rather than snapping down in one, matching the wiki’s recorded behavior. - Population never drops below 0.
- Below target, population grows by
- Gold. Each tick adds
population × tax_rate% × gold_per_capita ÷ 10(gold_per_capitadefaults to1.0; the tick economy runs 10 ticks/hour, so this is the hourlypopulation × tax_rate% × gold_per_capitasplit across them). The gold of every tick in the batch is added up exactly; the whole gold lands in the town’s treasury and the part of a gold still in progress is carried to the next settle, never dropped. So a town touched every tick and one left alone for a day collect the identical total: 37 people taxed at 10% pay0.37gold a tick, and the town collects a gold roughly every third tick however often it is read.
A settle that has fallen far behind (a town nobody has touched in a while) does not replay every individual tick forever: once a tick changes neither loyalty nor population, every further tick in the batch is identical, so the remainder collapses to pure gold arithmetic against the now-steady population instead of looping tick by tick.
Cottage capacity
max_population is the sum of your Cottages’ capacity at their current
level — Cottage is the only building that grants it, and multiple Cottage
instances stack. Capacity does not grow smoothly; it jumps per level:
| Cottage level | Capacity | Requires |
|---|---|---|
| 1 | 100 | — |
| 2 | 300 | — |
| 3 | 600 | Town Hall 2 |
| 4 | 1,000 | Town Hall 3 |
| 5 | 1,500 | Town Hall 4 |
| 6 | 2,100 | Town Hall 5 |
| 7 | 2,800 | Town Hall 6 |
| 8 | 3,600 | Town Hall 7 |
| 9 | 4,500 | Town Hall 8 |
| 10 | 5,500 | Town Hall 9 + Michelangelo’s Script |
A town with no completed Cottage has max_population 0, and population
sits at 0 — there is nowhere for anyone to live.
Population Increase: the growth quests
The population quest line has nine quests, met
while any one of your towns reaches 100, 200, 500, 1,000, 2,000, 5,000,
10,000, 20,000 or 50,000 population. Each pays modest gold plus population
credited straight to your oldest town — always exactly 10% of that rung’s
target (reach 10,000, the claim adds 1,000 more), capped at that town’s own
capacity like any other population reward. Completion follows the ordinary
quest rule: the first time your quest list or a claim observes a town at or
above the target, it is recorded, even if that town’s population later
drops back down (desertion, a lost battle).
A battalion can outgrow its Cottages
Population normally cannot exceed max_population. Troops are the one
exception: population never falls below the size of the army standing in the
town (“soldiers don’t desert”), so a
battalion chest — which drops several hundred troops into
a town in one action — can push that town’s population above its Cottage
capacity, and the extra heads are taxed like any other.
That is deliberate, and it is not free money. On the free realm a Senior Battalion at the midpoint of its ranges is 975 population, which at the maximum 100% tax rate mints 975 gold an hour — while eating 5,375 food an hour, forever, whether or not it ever fights. Food is the brake, and it is more than five times the best case on the gold. Disband or march the troops and the population falls back to what the Cottages support on the next tick.
Civil Code: filling the gap instantly
Population normally grows a little each tick. The Civil Code
item (population_boost) skips the wait: used on one of
your towns it adds 20% of that town’s capacity, or 100 people, whichever is
greater — never past the capacity itself. A town already at capacity refuses
it with a 400 rather than consuming it for nothing, which is Evony’s “no
effect at pop cap” made explicit.
It settles the town first, so the new residents land on top of a caught-up population rather than being overwritten by the next tick, and they are immediately available as idle population for fields and training.
Town Hall gates Cottage, Wall gates Town Hall
Every town is founded with a Town Hall already built at level 1 (both a fresh town and a founded colony start this way — it costs nothing and needs no construction order). Cottage levels 3 and up each require the Town Hall one level lower, and Town Hall levels 3 and up each require the Wall two levels lower:
| Town Hall level | Requires |
|---|---|
| 1 | — (seeded automatically) |
| 2 | — |
| 3 | Wall 1 |
| 4 | Wall 2 |
| 5 | Wall 3 |
| 6 | Wall 4 |
| 7 | Wall 5 |
| 8 | Wall 6 |
| 9 | Wall 7 |
| 10 | Wall 8 + Michelangelo’s Script |
So the growth chain runs: build a Wall to raise the Town Hall, raise the
Town Hall to unlock the next Cottage level, build or upgrade Cottages to
raise max_population. A colony has no Wall (see
Colonies) and so is permanently capped at Town Hall 2 —
but Cottage level 3 only needs Town Hall 2, so a colony can still reach
Cottage 3 — 600 population per Cottage instance (Cottage 4 needs Town
Hall 3, which a colony can never reach).
Loyalty and grievance
Loyalty (0–100, starts at 100 for a new town) is the town’s
contentment. It never jumps — it only ever drifts, one point per tick,
toward 100 − tax_rate − grievance. Push tax up and the target drops;
loyalty chases it down over the following ticks, and population’s own target
(capacity × loyalty ÷ 100) drops with it, throttling how much a high tax
rate can actually earn.
Grievance (0–100, starts at 0) is unrest from events — a lost
battle, a levy, a captured town — and it never drifts on its own the way
loyalty does. Grievance has no passive decay at all: it only ever moves
when something explicitly changes it — comfort actions
(which lower it), levies (which always raise it), and losing an
attack (which raises it). That is deliberate and faithful: in the original,
grievance was lowered only by Disaster Relief and Praying, which is why a
badly ground-down town needs your attention rather than time.
Conquest
Every attack the attacker wins grinds the defender down, whatever the target: a player town, a colony, or a barbarian settlement. A losing attack grinds neither stat — though it still settles a player’s town, so the loyalty drift since its last settle lands then.
Loyalty damage is a two-step band, not a percentage: 3 points per
winning attack while loyalty is above 50, and 2 per winning attack at
50 or below. It is never more than the loyalty actually left, so the last
win before 0 takes only what remains.
Grievance rises point-for-point with the loyalty that win actually took —
3 while above the threshold, 2 below — capped at 100. A win against a
town already at 0 loyalty takes nothing and therefore adds nothing.
| Realm knob | Shipped value | Meaning |
|---|---|---|
conquest_loyalty_damage_high | 3 | Loyalty lost per winning attack above the threshold |
conquest_loyalty_damage_low | 2 | Loyalty lost per winning attack at or below it |
conquest_loyalty_damage_threshold | 50 | Where the band steps down |
attack_grievance_per_loyalty_point | 1.0 | Grievance gained per point of loyalty taken |
conquest_captured_loyalty | 0 | Loyalty a freshly captured town starts at |
conquest_captured_grievance | 100 | Grievance a freshly captured town starts at |
These are per-realm configuration, so a realm can run a harsher or gentler conquest loop without a different engine.
That band means a town at full loyalty takes 42 winning attacks to grind
to 0 (17 at 3, then 25 at 2), and a barbarian settlement,
which starts at 92, takes 39 (14, then 25). Both are deterministic:
Restfall never rolls dice for this, unlike the original’s random 2–4 per
attack — the same reason every other combat outcome here is reproducible.
Loyalty recovery is the counter-pressure. A player town’s loyalty drifts one
point per tick back toward 100 − tax_rate − grievance (see
The tick), so the grind sticks only while grievance stays high —
which is exactly what the point-for-point grievance gain guarantees. Run
comfort actions and it climbs back; ignore it and it does not.
Grinding a target’s loyalty to 0 is what makes capture possible at all,
and this is a universal rule with no carve-out either way: a
capture-intent attack that wins only transfers ownership once the
defender’s loyalty was already 0 going into that attack — the win’s
own grind (above) never counts toward it, so completing a capture always
takes the attack that finishes the grind plus one more. This applies
identically to a barbarian settlement and to an ordinary player-owned town —
see Combat & Raiding
for the full mechanic and what changes hands on a successful capture.
Speech Text and Michelangelo’s Script
Two items tie directly into this economy:
- Speech Text (
loyalty_reset) instantly resets a town you choose toloyalty: 100, grievance: 0— the fastest way to recover from a bad conquest grind or a string of comfort-starved ticks, without waiting out the one-point-per-tick drift. It settles the tick economy at the town’s current state first, same as every other town mutation, then applies the reset. Use it viaPOST /api/v1/items/{item_id}/usewith{"quantity": 1, "target": {"town_id": "..."}}— see Items. - Michelangelo’s Script (
building_permit) is what a Cottage or Town Hall’s final upgrade — level 9 to 10 — consumes, on top of the ordinary resource cost. It is never used through the items endpoint (that 400s); instead,POST /api/v1/buildings/{building_id}/upgradechecks your inventory for one when the upgrade would reach level 10, 400s naming the item if you don’t have it, and consumes exactly one from your stack the moment the upgrade starts.
Both are earned only, never bought: the fortune wheel pays both, and barbarian settlements of level 5 and above can drop a Script (see Where items come from). No quest pays a Script — in Evony the Script is part of a level-10 upgrade’s cost, not a quest award.
Tax income
tax_rate (0–100) is the only lever a player controls directly — see
Adjusting the tax rate below. There is no
ceiling: every town, at every rank, may set any rate from 0 to 100.
The title ladder still raises your city cap, but it no
longer touches tax — the loyalty/grievance economy itself is what prices a
high tax rate, by shrinking the population it’s collected from.
Gold from tax is the per-tick formula in The tick above, which nets out to the same hourly rate as the classic Evony formula:
gold/hr = population × (tax_rate / 100) × gold_per_capitagold_per_capita is a realm config knob (default 1.0). This tax trickle
is the only source of gold income — the Market has no continuous
revenue of its own (it trades resources, it does not mint gold) — and it’s
added straight into the gold resource by the tick engine, on top of
whatever the town’s fields (Farm, Lumber Mill, Quarry, Mine) are producing
continuously.
Hero salaries come out of this same income. Each hero stationed in the
town costs hero level × 20 gold per hour (see
Heroes), deducted on the same ticks that
pay the tax gold — the Evony “decrease in Net Income”. A town whose gold
can’t cover the payroll floors at 0 gold; heroes don’t (yet) leave over
unpaid wages. The rate is surfaced per town as hero_salary_gold_per_hour.
Tax Policy: doubling a window’s take
A Tax Policy (24 hours) or an Adv Tax Policy (7 days) running on a town doubles the tax gold its ticks mint for as long as the window is open. It multiplies the take, not the rate, so loyalty and population are unaffected — a 0%-tax town still earns nothing, twice.
Tax Revenue: the four tax quests
The wealthy quest line also carries four Tax
Revenue quests, read off the same production rate as the resource
quests, for the gold resource specifically — so it is this tax formula
(a Tax Policy included) that feeds them, not the Market. The targets are
500, 1,000, 5,000 and 10,000 gold per realm hour in one town; the lower
two pay gold (1,000 and 5,000) and the upper two pay food instead (10,000
and 50,000). As with the resource quests, a booster active when your quest
list or a claim observes the target met is enough to lock the completion
in for good.
The advanced version adds one thing the plain one does not: while it is active, that town’s loyalty never falls. It may still rise toward its target — the freeze forbids the drop, not the recovery — which turns the 0%-then-spike play below into something far more patient: you can hold a punitive tax rate for a week without paying for it in loyalty, and the grievance side of the ledger is untouched either way.
Both effects are prorated over the ticks they covered. A Tax Policy used and then left alone for 30 hours doubles the gold of the first 24 hours’ ticks and none of the rest; an Adv Tax Policy’s freeze holds loyalty for exactly the ticks it was open, and loyalty resumes falling on the tick it lapses. You never have to be online at the right moment to collect, and a lapsed policy never keeps paying.
Two policies do not stack into a quadruple: the larger multiplier applies and the second one extends the window (see Timed buffs). The doubled gold is counted in the same exact sum as the plain tax, and its fraction carries like any other, so a buffed window never loses a gold to rounding.
Because the freeze stops loyalty falling, an Adv Tax Policy is also a defensive item: conquest works by grinding a town’s loyalty to zero, and grievance-driven decay is what keeps it there between waves. See Conquest for how that grind works.
The 0%-then-spike play
Because population’s target tracks loyalty and loyalty tracks
100 − tax_rate, the fastest way to grow a new town is to run tax at 0%:
loyalty sits at 100, population’s target is capacity itself, and it
fills at the fastest available rate (5% of capacity per tick, no
tax-rate discount). Once population is at or near capacity, raising tax
trades future growth headroom for present gold — loyalty drifts down toward
the new, lower target and population follows it down over many ticks, but
until it catches up you’re taxing a population still close to the old
(higher) level. This is the intended Evony rhythm: grow at low tax, then
spike tax for a burst of income, then drop it again to let loyalty and
population recover.
Fields, labour, and staffing
In classic Evony, population includes your troops, and your fields
(Farm, Lumber Mill, Quarry, Mine) each want a fixed number of workers —
labour_per_level — to run at full output. How many fields a town may
hold at all is a separate, Town-Hall-gated limit — 13 at Town Hall level 1,
+3 per level — shared across all four types; see
The resource-field cap. Restfall’s population column
carries this meaning: every completed field’s labour demand, and every
garrisoned unit’s population_cost (see Units &
Training), both draw from the same pool.
Each field’s labour_per_level is the same table as
Cottage capacity, divided by 10 — level 1 wants 10
workers, level 10 wants 550. Output/hour is that labour × 10: a level-1
field yields 100/hour, a level-4 field 1,000/hour, and so on. A
resource’s own production rate slider
scales both its fields’ output AND their labour demand together — throttle
a resource to 0% and its fields stop pulling from the workforce entirely.
Staffing is what happens when your fields want more workers than your
town has free: idle = population − troops_garrisoned, and if the fields’
total labour demand exceeds that, every field’s output is scaled down by
the SAME ratio (idle ÷ labour demanded, capped at 100%) — an
under-staffed town throttles every field together, not one at a time. This
is a live multiplier on GET/every settle, not a separate action to take.
Training drafts from the same idle pool: an order needs
idle ≥ count × population_cost, where idle = population − field_labour − troop_population (troops garrisoned, plus every pending training order,
plus the order itself) — see Units &
Training for the full rule and its 400
error. Training never changes population itself; drafted residents were
already counted, they just change category.
Troop deaths do change population: when a battle resolves, every unit
that actually died (not the wounded — see Hospital &
Wounded Units) subtracts its population_cost from its
home town’s population, floored at 0. This applies on both sides of a
fight — the defender’s town for its own losses, and the attacker’s origin
town for the attacking force’s losses — and to player-owned towns only;
barbarian settlements have no meaningful population to lose. Nothing
credits population back when a wounded unit heals — those units never
left the population count in the first place. A town’s population then
only recovers the normal way, through the tick economy growing it back
toward capacity × loyalty ÷ 100 (see The tick above) — so
Cottages, not the Hospital, are what throttle rebuilding an army after a
costly battle.
Adjusting production rates
Throttle one or more resources’ field output down — the classic Evony move before a big training order, since it frees the workers those fields were employing back into the idle pool immediately (see Fields, labour, and staffing above).
PATCH /api/v1/towns/{town_id}/production/Authorization: Bearer <token>Content-Type: application/json
{ "rates": { "food": 0, "wood": 100 } }Request body:
| Field | Type | Required | Description |
|---|---|---|---|
rates | object | Yes | {resource_id: rate}, each rate 0–100. Only the resource ids present are changed — this merges onto the town’s existing slider rather than replacing it outright, so setting food doesn’t reset wood back to 100%. |
A resource with no entry in rates (ever, for this town) runs at 100% —
unthrottled — by default.
Resources and the tick economy are settled at the old rates immediately before the change takes effect, so nothing already accrued is retroactively throttled (or un-throttled) by the new slider.
Response: TownResponse with the updated resources and
production_rates.
Errors:
400— a key inratesisn’t a resource id this realm knows about401— not authenticated403— season not active404— town not found or not owned by you422— a rate is outside0–100
What’s coming next
Nothing currently pending — capture-at-zero-loyalty (the last item tracked here) shipped in this release; see Conquest above.
Comfort actions
Evony’s four “comfort the people” actions push loyalty up, pull grievance
down, or grant population/food directly. All four share one cooldown
per town — using any one of them locks out all four for
comfort_cooldown_seconds (900 real seconds by default, divided by the
realm’s time_scale like every other duration). Resources and the tick
economy are settled at the current state before the action is priced or
applied, so costs are always calculated against up-to-date totals.
POST /api/v1/towns/{town_id}/comfort/Authorization: Bearer <token>Content-Type: application/json
{ "action": "praying" }Request body:
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Yes | One of praying, disaster_relief, blessing, population_raising |
Effects (max_population is the town’s Cottage capacity — see
Cottage capacity):
| Action | Cost | Effect |
|---|---|---|
praying | max_population gold | Loyalty +25 (clamped to 100), grievance -5 (clamped to 0) |
disaster_relief | max_population food | Loyalty +5 (clamped to 100), grievance -15 (clamped to 0) |
blessing | 10% of max_population in gold (floored) | Grants 10 × max_population in food (floored, capped at storage); loyalty and grievance untouched |
population_raising | 10 × current population in food (floored) | Population grows by 10% of its current value (floored), capped at max_population × loyalty ÷ 100 — the same ceiling a growth tick applies |
population_raising’s cap only ever stops it from ADDING more — it never
pulls population back down. If a town’s current population already sits
above max_population × loyalty ÷ 100 (a stale reading, or Cottages lost
since the last tick), the action still costs food and still does nothing
harmful: population is left exactly where it was rather than being clipped
down to the cap.
Response: TownResponse with the updated resources, loyalty,
grievance, population, and comfort_available_at.
Errors:
400—actionisn’t one of the four names above, or the town can’t afford the action’s cost401— not authenticated403— season not active404— town not found or not owned by you409— a comfort action was used too recently on this town (shared cooldown across all four)
Levies
A levy is a direct, no-cost-in-resources resource grant — Evony’s “collect
a tax windfall now, pay for it in unrest later” lever. It has its own
cooldown (levy_available_at), completely independent of the comfort
actions’ shared cooldown above — you can pray and levy in the same
sitting. Resources and the tick economy are settled at the current state
before the levy is priced or applied.
POST /api/v1/towns/{town_id}/levy/Authorization: Bearer <token>Content-Type: application/json
{ "resource_id": "food" }Request body:
| Field | Type | Required | Description |
|---|---|---|---|
resource_id | string | Yes | One of gold, food, wood, stone, iron |
Grant (max_population is the town’s Cottage capacity — see
Cottage capacity; every amount is floored and capped
at storage):
| Resource | Grant |
|---|---|
gold | 10% of max_population |
food | 100% of max_population |
wood | 100% of max_population |
stone | 50% of max_population |
iron | 40% of max_population |
Every levy — of any resource — also adds 10 grievance (clamped at
100), pulling the loyalty target down by the same amount: there’s no
resource-free way to levy. This is the intended trade — a levy is a
short-term windfall paid for by a colder town.
Response: TownResponse with the updated resources, grievance,
and levy_available_at.
Errors:
400—resource_idisn’t one of the five names above401— not authenticated403— season not active404— town not found or not owned by you409— a levy was collected too recently on this town
Adjusting the tax rate
PATCH /api/v1/towns/{town_id}/tax-rateAuthorization: Bearer <token>Content-Type: application/json
{ "tax_rate": 25 }Request body:
| Field | Type | Required | Description |
|---|---|---|---|
tax_rate | int | Yes | New tax rate, 0–100. No ceiling — any rank may set any rate. |
The tick economy (and resource production) is settled at the old rate immediately before the change takes effect, so nothing already accrued is retroactively taxed at the new rate.
Response: TownResponse with the updated tax_rate, loyalty,
population, and max_population.
Errors:
401— not authenticated403— season not active404— town not found or not owned by you422—tax_rateoutside0–100
TownResponse fields
All town endpoints (GET /api/v1/towns/, GET /api/v1/towns/{id}, PATCH /api/v1/towns/{id}, etc.) and TownStateResponse (GET /api/v1/state/)
include:
| Field | Type | Description |
|---|---|---|
population | int | Current population, converging toward max_population × loyalty ÷ 100 |
max_population | int | Capacity from completed Cottages — see Cottage capacity |
idle_population | int | population − field_labour − troop_population (garrison + training orders, even finished ones not yet applied + wounded units + healing queue, minus any allied Support garrisoned here). GET /api/v1/state/ also counts units away on an outbound attack or support march (an attack on its way back counts only its survivors). The town endpoints leave marching units out, and the town POST /api/v1/towns/{id}/collect returns also leaves the healing queue out, so they show that many more idle. /state’s value is the one training enforces, except that training also counts scouts and founding escorts still on the road. Can go negative (“red”) when a town is over-committed. |
food_upkeep_per_hour | int | Total hourly food the town’s whole garrison eats, Σ food_upkeep_per_hour × count over every unit in units — including any allied Support garrisoned here (unlike idle_population, this is never netted against it). 0 for an empty garrison. See Food upkeep & desertion. |
loyalty | int | 0–100, drifts toward 100 − tax_rate − grievance — see Loyalty and grievance |
grievance | int | 0–100, changes only via events — see Loyalty and grievance |
tax_rate | int | 0–100, current tax rate — no ceiling |
comfort_available_at | datetime or null | Shared cooldown for comfort actions; null means available now |
levy_available_at | datetime or null | Cooldown for levies, independent of comfort_available_at; null means available now |
production_rates | object | Per-resource production slider, {} = every resource at 100% — see Adjusting production rates |