A House Divided A House DividedDocumentation
Changelog
Player Wiki/Advanced

Reference: Turn Order

Last updated 2026-08-21

The game runs on an hourly cron. Every real-world hour is one game turn, which is one game week. Turn processing runs through roughly a dozen top-level adapters that together call over 100 phase steps, each hour. This page lists the major groups of phases, what runs in each, and why the ordering matters.

1 turn = 1 game week = 1 real hour 48 turns = 1 game year


Turn sequence overview#

Group Phases Key constraint
1. Resources Action refresh, fund generation, corporation turn Parallel-safe
1a. Finance Bond coupons, NPP funds, commodity prices, portfolio snapshots, savings interest, line of credit, financial suspect scan After corporations (bonds need updated liquid capital)
2. Demographics Turnout decay, party GOTV, party org maintenance, reg drift decay, pressure decay, priority region decay, support decay, support accrual Sequential
3. Party elections State/national/committee elections, party actions, empty party cleanup, coalition disband votes, charter expiry, NPP relationship maintenance, governor legislation queue Parallel then cleanup
4. NPP behavior Election entry, bill voting, speaker voting Uses shared NPP context
5. Bills & cabinets Bill lifecycle, state bills, cabinet nominations, governor AP regen, governor executive orders, governor address expiry, governor/executive endorsements Parallel-safe
6. Campaigns Campaign turn, NPP action processing (every 4 turns), activity logging Sequential
7. Election resolution Primary resolution → vote accumulation → campaign spend reset → timer advancement → snapshots → general resolution → clear resolved support → leadership vacate Strictly sequential: ordering is load-bearing
8. UK/parliamentary government Government formation, no-confidence votes, confidence votes, PM vacancy watcher After election resolution
9. Election coverage Perpetual elections, snap election checks, leadership elections, stale cleanup, auto-reelection entry, presidential succession, international organizations Parallel-safe
10. Fiscal year October processing (turn 40 of 48) Conditional
11. Effects & metrics Policy effects, demographic effects, approval decay, GDP growth, metric decay, subsidy budget, regional budgets, crisis turn, ministerial orders, top sectors recompute Parallel-safe
12. National aggregation GDP growth, national metrics, trade growth mirror, inflation recalc, Forex updates, central bank chair turn/selection, independence desire drift After state effects
13. History Metric snapshots, approval snapshots, interest rate snapshots, party history, portfolio/corp portfolio/stock exchange/investor ranking/wealth list snapshots, suspicious activity detection, game health snapshot Parallel-safe
14. Persistence Increment turn counter, save turn log, send live update Not wrapped in try/catch

Group details#

Group 1: resources#

Runs at the start of every turn, in parallel:

Group 1a: finance#

Runs after corporations so bond coupon flows can read updated liquid capital:

Group 2: demographics#

Sequential (each step depends on the previous):

  1. Turnout decay: All turnout modifiers decay 2% of their current value toward zero.
  2. Party GOTV: Party GOTV budget distributed to states, boosting turnout modifiers for aligned demographics.
  3. Party org maintenance: Cap-contribution rates applied; Org decays by a small fixed rate each turn for any party with Org above 0.

Group 3: party elections#

Party leadership elections, national committee elections, and committee assignments all run in parallel. Then:

Group 4: NPP behavior#

NPPs run their autonomous decision logic:

Group 5: bills & cabinets#

All parallel:

Group 6: campaigns#

Group 7: election resolution (strictly sequential)#

This is the most critical group. The phases must run in this exact order. Reordering produces incorrect election results:

  1. Candidate party sweep: Candidates whose party no longer matches their candidacy are auto-withdrawn (party switches).
  2. Primary resolution: Primaries that have reached their end time are scored. Highest-score candidate per party advances; others are marked withdrawn.
  3. Vote accumulation: General elections accumulate votes for this turn. MUST run after primaries (eliminated candidates are excluded) and BEFORE timer advancement (so the final turn's votes are captured).
  4. Election timers: Countdown clocks advance; elections that have reached their end time are marked "completed."
  5. Primary snapshots: Cumulative primary-phase scores recorded for polling history.
  6. General resolution: Elections marked "completed" are fully resolved: winners determined, elected officials updated, characters receive office, next cycle spawned.
  7. Leadership vacate: Members who lost seats, changed chambers, or won a different office have leadership positions removed.

Why the order matters: If vote accumulation ran after timer advancement, final-turn votes would be lost. If primaries didn't resolve before vote accumulation, eliminated candidates would still receive votes.

Group 8: parliamentary government#

Runs after election resolution:

Group 9: election coverage#

Ensures no seat sits vacant:

Group 10: fiscal year (conditional)#

Only runs on the fiscal year-end turn (turn 40 of each 48-turn year, corresponding to October):

Group 11: effects & metrics#

All parallel:

Group 12: national aggregation#

Sequential (each depends on previous):

  1. GDP growth: GDP updated from sector revenue changes. Runs after unowned sector growth.
  2. National metrics: Country-level aggregates recomputed from state-level data (GDP-weighted for economic metrics, population-weighted otherwise).
  3. Trade growth mirror: Trade growth mirrored from the federal budget system to the central bank system (Forex prerequisite).
  4. Inflation recalculation: Per-turn inflation recalculated using updated national metrics.
  5. Forex turn: Exchange rates updated (when Forex is enabled). Reads inflation differentials and trade volumes; fills limit orders.
  6. Central bank chair turn: Chair infamy and bonuses updated.
  7. Central bank chair selection: Open chair vacancies filled if conditions are met.

Group 13: history#

All parallel, all read-only:

Group 14: persistence#

This group is not wrapped in the error-isolation pattern. A failure here is fatal to the turn:


The error isolation pattern#

Every phase (except Group 14 persistence) runs inside an error-isolation wrapper. If a phase throws, the error is:

  1. Logged to the console
  2. Sent to Sentry
  3. Recorded as a warning in the turn log

The turn does not halt. Subsequent phases continue processing. This means a broken bill lifecycle phase does not prevent elections from resolving. The admin panel shows warnings from the last turn.


Fast mode#

Fast mode runs turns every 30 minutes instead of every hour (i.e., 1 turn = 30 real minutes instead of 60). All timing calculations (election durations, bill deadlines) remain in hours, so everything simply completes in half the real-world time.