A House Divided A House DividedDocumentation
↵
Changelog
Game Design/World & Simulation

Core Systems

Last updated 2026-10-29
Player wikiCore Systems
Source files

The core loop is a persistent shared world. One real hour is one game turn and one turn advances the in-game calendar by roughly one week (about 7.6 days). Forty-eight turns make one game year.

Summary#

This page is the map of the engine's foundations: the hourly turn, the per-turn action and influence economy, the election accumulation curve, the government and legislation shapes, the economy feature switches and the turn processor. Each area has its own deeper page; this one records the shared constants and links onward.

Player guide: Core Systems

Rules#

Time#

Constant Value Source
MS_PER_TURN 3,600,000 ms (one real hour)
TURNS_PER_YEAR 48 (365 / 48 is about 7.6 game days per turn)
STARTING_YEAR 2019 (turn 1 is the first week of January)
turnLengthMinutes 60

Actions and character resources#

Constant Energy 1 Energy 10 Source
ENERGY_BASE_ACTION_CAP / ENERGY_MAX_ACTION_CAP 200 250
ENERGY_BASE_HOARD_THRESHOLD / ENERGY_MAX_HOARD_THRESHOLD 100 125
ACTION_HOARD_PENALTY 4 actions per turn above the threshold

Both limits are linear in Energy: t = (energy - 1) / 9, cap = round(200 + t * 50), threshold = round(100 + t * 25) (energyActionLimits in ). The per-turn update is actions' = min(cap, max(0, actions - (actions > threshold ? 4 : 0) + refresh)).

See Stats & Actions for the dynamic campaign, advertising, donor, polling, and travel costs.

Elections#

Election cadence is country and office specific. The scheduler in is authoritative; avoid treating one US term table as a universal clock.

The general-election accumulation weights are:

Segment Share Turns
Early pool 50% the rest of the window
General ramp 20% 8 (RAMP_TURNS)
Final four turns 30% 4 (ELECTION_DAY_TURNS)

Source: turnVoteWeight in src/lib/electionEngine/voteCalculations.ts (EARLY_POOL_SHARE, RAMP_POOL_SHARE, FINAL_POOL_SHARE). The window is the general-election window, starting at the end of the primary. Windows of 4 turns or fewer spread the pool evenly; if the early band is empty, its share folds into the ramp so the weights always sum to the pool.

Unused actions are intentionally bankable, so saving for the closing sprint is a supported strategy rather than an exploit.

Government and legislation#

Economy#

Fresh worlds start with the full labour system and the plants market tier, and Freight active. Command-economy handling is enabled for countries and eras configured as planned economies.

The economy includes plants and capacity, commodities, labour and unions, logistics, national budgets, sovereign and corporate debt, banking, forex, central banks, nationalization, index funds, and world trade. Each feature's own as-shipped page is more reliable than old all-in-one phase tables.

Turn processing#

The hourly processor uses an ordered adapter registry and roughly 180 named phases (123 base phases plus 57 per-country election phases). Most phase failures are isolated, recorded, and allowed to leave warnings while later phases continue. Locking and crash recovery prevent concurrent or blindly repeated turns.

See The Turn Processor (as shipped) for the current registry and Turn Processing Submodules for the stable entry points.

Data#

Collection Fields Role Player-visible
characters actions, politicalInfluence, nationalInfluence, infamy, favorability, stats.energy, actionGrantLog Rewritten each turn by processActionRefresh Yes (profile and dashboard); the grant log is capped at the 48 most recent entries
gameState (_id: "current") currentTurn, currentYear, lastTurnProcessed, preset Turn clock Year and turn yes
gameConfig (_id: "default") baseActionsPerTurn, startingActions, startingFunds, officeActionBonus, chairActionBonus, labourSystemMode, marketSystemMode, freightSettlementMode Tunables and feature modes No
electionVoteTallies accumulated votes per turn Election accumulation Results yes
turnLog duration, warnings, per-phase results Turn record No
centralBanks, supremeCourtSeats, congressLeaders, cabinetMembers role holders Read to add action and influence bonuses Roles yes

Configuration#

Setting Default Where set
baseActionsPerTurn 4 (floor 4)
startingActions 25 same
startingFunds 250,000 same
turnLengthMinutes 60 same
officeActionBonus per office type (for example House 1, Senate 2, President 4) same
chairActionBonus 3 (fallback DEFAULT_CHAIR_ACTION_BONUS in ) gameConfig; country configs set central bank chair offices to 3
labourSystemMode "full" for fresh worlds FRESH_WORLD_GAME_CONFIG_FLAGS in
marketSystemMode "plants" for fresh worlds same
freightSettlementMode "active" for fresh worlds; the type allows "shadow" (routes recorded but not feeding plant throughput), which is what an absent value behaves as same, type in
commandEconomyEnabled era-derived at bootstrap (on for 1953 and 1979 command regimes)

The standing policy is that every gameplay flag is on at the top of its ladder for a fresh world, with NPP autonomy held at v4 (FRESH_WORLD_FLAG_EXCLUSIONS).

Timing#

Each hourly turn runs the registry in a fixed group order. The pieces on this page sit in these groups:

turn N (hourly)
  actionRefresh (actions, PI, NPI, infamy, favorability)
  ... bills, campaigns, NPP activity ...
  voteAccumulation (turnVoteWeight)                      -> election window turns
  electionResolution, leadership phases                  -> strictly sequential
  state effects, economy, national aggregation, snapshots

The authoritative group order is the table in The Turn Processor (as shipped); this page does not restate it. Between main turns, markets and election returns can refresh on quarter-hour marks without granting actions.

Worked trace#

A player with no office and no leadership role, Energy 5, with 130 actions, political influence 40, national influence 10, infamy 50 and favorability 80, in a country where their party does not hold the executive and with no accountability drain:

Election curve: a 24-turn general window with a pool P of 1.0 gives 12 early turns at 0.5 / 12 = 0.0417 each, 8 ramp turns at 0.2 / 8 = 0.025 each and 4 final turns at 0.3 / 4 = 0.075 each; 0.5 + 0.2 + 0.3 = 1.0.

Edge cases and limits#

Invariants#

Failure and recovery#

Connections#

Driven by:

Affects:

Tests#

Gaps: no single test ties the pieces on this page together, and the Energy-limit interpolation has no dedicated boundary test beyond the cap case.

Known issues and history#

Last checked: 2026-10-29, version 1.18.0

Ask