A House Divided A House DividedDocumentation
↵
Changelog
Game Design/Legislature & Parties

Parties

Last updated 2026-10-29
Source files

Summary#

Umbrella technical page for the party system: membership, primaries, funds and taxes, organization, NPP recruitment, leadership, influence, slate, caucuses and coalitions. Each subsystem with its own design doc is linked from Connections. This page holds the constants and formulas that have no page of their own, and points to the dedicated pages for the rest.

Player guide: Political Parties

Rules#

Party system and membership#

Endorsements#

Primary system#

Election windows come from DEFAULT_DURATIONS in . durationHours is the total window; the general phase is the trailing 24 turns.

Election Total Primary phase General phase
US House (house) 96 72 24
US Senate (senate) 288 264 24
Governor, State Senate, President 192 168 24
Japan Shugiin 192 168 24
Japan Sangiin 144 120 24
Most parliamentary lower chambers (Commons, Bundestag, Landtag, snap elections, Eastern-bloc assemblies) 48 24 24

These are active-election windows. The gap between regular elections is controlled separately by each office's turn cycle.

Fund generation and party taxes#

Source: . Rates are per turn (one turn is one hour).

Population tier Population Base rate Donor bonus per level
small under 2M $5,000 $100
medium 2M to under 8M $10,000 $200
large 8M to under 20M $20,000 $400
mega 20M and over $40,000 $800

Office bonus (flat per turn, OFFICE_FUND_BONUS): House $5k, State Senate $3k, Senate $15k, Governor $15k, Vice President $25k, President $50k. The same table gives UK Commons $5k and Prime Minister $50k, Bundestag $5k, Chancellor $50k, Minister-President $15k, Landtag $3k, parliamentary and UK cabinet $5k.

Formulas:

Party members pay a state tax (to the state party treasury, set by the State Chair) and a national tax (to the national party treasury, set by the National Chair). Independents pay no taxes. DEFAULT_NPP_STATE_TAX_RATE = 5 applies when no players are in the state party (). NPP generation is 50% of the player rate, with no office bonus, and diminishing returns by funds held: x1.0 up to 50,000, x0.75 to 150,000, x0.5 to 300,000, x0.25 above.

Treasuries: national and state parties both have treasury controls. Treasurers own the planning layer (reserve targets, dashboard and budget posture), while Chairs and Vice Chairs retain emergency access to move funds and adjust spending when needed.

Party organization#

Each state or region party has an organization percentage (0 to 100) that affects electoral performance. It is derived from contribution units, not a cap (, ):

Organization building requires party presence in the state: at least one player character in the party in that state, or at least one elected official (player or NPP) from the party there. When presence is lost, orgBuildingPercent resets to 0 and Build Org cannot add units. UK parties have state party org records for each UK region (England, Scotland, Wales, Northern Ireland, London) and the same mechanics apply. Stale party ID healing fixes org records that reference outdated party identifiers after the sequential ID migration.

Party tier#

partyTierTurn recomputes each party's Major or Minor tier from per-region Org (): a region is earned at TIER_EARN_REGION_ORG_PCT = 20 and lost below TIER_LOSE_REGION_ORG_PCT = 10; graduation needs ceil(regions * 1/3) earned regions (1/4 in the UK, UK_TIER_GRADUATION_REGION_FRACTION); a Major party enters a demotion warning when ceil(regions * 2/3) regions are below the lose threshold, and is demoted after the MAJOR_DEMOTION_GRACE_TURNS = 240 countdown unless it recovers. A Minor party's Political Strength cap is MINOR_PARTY_BASE_PS_CAP = 100 plus MINOR_PARTY_PS_CAP_PER_REGION = 10 per earned region. Tier selects the NPP Action Point pool below.

NPP recruitment#

Third parties can recruit NPP candidates to build their political bench through two mechanisms.

Party creation spawn. When a player creates a custom party, NPPs spawn across the selected states. The rule is partyCreationNPPs (statesRequired, lockHomeState, nppsPerState) in each country's institutionsFacts.ts (also in ). Regions = statesRequired + 1 when the home state is locked; total NPPs = regions x nppsPerState.

Country States selected Home state NPPs per state Total
US 4 + home locked 2 10
BR 3 + home locked 2 8
UK, DE, JP, FR, IE, CN, RU and most others 2 not locked 1 2
DD, PL, CS, HU, RO, BG, YU 1 + home locked 2 4

The creation modal shows alignment indicators for each state (good, neutral, poor fit) based on how the party's positions match the state's political lean.

Ongoing recruitment. Party leadership recruits additional NPPs from the party Actions tab.

Role Scope Resources used
State Chair / Vice Chair Their state only State pool and treasury
National Chair / VC States without active state leadership National pool and treasury

Per-state slots follow the state organization (RECRUITMENT_SLOT_TIERS, ):

State Org Max slots
0 to 29% 2
30 to 39% 3
40 to 49% 4
50% and over 6

Available slots = max slots minus current party NPPs in that state.

Cost: 5 NPP Action Points (NPP_RECRUITMENT_AP_COST) plus a flat treasury cost by currency (nppRecruitmentFundCost, ): 50,000 for USD, GBP, EUR, NGN and SUR (also the default for unlisted currencies); 200,000 for BRL and CNY; 500,000 for JPY. Management actions cost NPP_MANAGEMENT_AP_COST = 1 AP; the treasury cost is 5,000 (boost) or 12,500 (loyalty) in the base tier, 25,000 or 50,000 in the BRL and CNY tier, 62,500 or 125,000 for JPY.

NPP Action Points are banked per party and refill each turn in partyActionGeneration: balance' = min(cap, balance + regen); a legacy row with no balance heals to the cap.

Scope Tier Pool cap Regen per turn
National Major 160 16
National Minor 80 8
State Major 40 4
State Minor 20 3

The older scarcity table (5 AP and $100,000 for the first NPP rising to 25 AP and $1,000,000 at four or more, with +1 action and +10% funds per 20 party NPPs, capped at +5 and +100%) still exists as calculateRecruitmentCost in , but it now only prices relocation requests (25% of that cost, via calculateRelocationRequestCost), not recruitment.

Party-wide NPP capacity (): 5 slots per active member for the first 5 members, 4 for members 6 to 10, 3 for members 11 to 20, 2 beyond; clamped to a country ceiling max(25, 6 x regions). A member counts as active with at least NPP_ACTIVE_MEMBER_MIN_ACTIONS = 2 game actions in the last 14 days and no ban.

Growth frontier (): a party may only recruit into regions where it already has a member, elected official or active NPP, plus their direct neighbours.

Cooldown: 24 turns (RECRUITMENT_COOLDOWN_TURNS, ). The national party and each state party track their own cooldown independently (nppRecruitmentCooldownUntil and nppRecruitmentCooldownUntilTurn).

Party leadership#

Each state party and the national party has three elected positions: Chair (highest authority; tax rates and treasury transfers), Vice Chair (second-in-command; assists with NPP influence operations) and Treasurer (treasury planning layer).

Chair Office: purge member (switched off)#

The national party Chair can expel a regular member via the Chair Office tab. The mechanic is currently off: PARTY_PURGE_ENABLED = false in , so chairs cannot expel members and the Chair Office hides the controls. When on:

Speaker of the House#

The Speaker is elected by the full House using a multi-candidacy model.

  1. Any sitting House member (player or NPP) may declare their own candidacy at any time.
  2. Multiple candidacies can be active simultaneously.
  3. Each House member casts one vote for one candidate; switching votes is allowed.
  4. The first candidate to reach a simple majority of all filled House seats wins and is confirmed Speaker.
  5. All other active candidacies are marked failed.

US congressional leadership voting is player-only in live NPP behavior: NPPs do not autonomously vote in Speaker, House leadership or Senate leadership elections. Leadership pages and player whip tools still exist for player coordination. API: GET /api/congress/speaker returns activeCandidacies[], houseTotal, majority, isHouseMember, hasActiveCandidacy and myVoteId; POST /api/congress/speaker takes actions declare, withdraw and vote.

NPP influence#

See NPP System. Players influence individual NPPs through deterministic actions on the NPP profile page (/npp/[id]). Live costs are in CAPITAL_ACTIONS ():

Action Actions (AP) Funds
Request Endorsement 6 $0
Private Meeting 3 $0
Boost / Reduce Favorability 5 $10,000
Boost / Reduce Influence 6 $20,000

There is no chance roll. Party-level NPP management (stat boosts, loyalty, cooperation, relocation) is separate and spends the party's NPP Action Points and treasury (1 AP each; see party-influence.md).

Whip system#

Party leadership can issue whip directives to players and NPP legislators. NPP congressional leadership voting is not a live turn-system behavior, so the NPP whip gameplay is bill-facing.

Party influence#

Every party member has a Party Influence score that accrues passively each turn they are an active member. Bonus actions are distributed to members in proportion to their share of the party's total influence. Defaults: DEFAULT_PARTY_INFLUENCE_POOL_MULTIPLIER = 3 and DEFAULT_PARTY_INFLUENCE_MAX_BONUS = 6 in ; the code uses the larger of the GameConfig value and the default for both. Other rates fall back to the values below when GameConfig does not set them (partyInfluenceBaseRate, partyInfluenceDecayRate, partyInfluenceMaxPenalty).

  1. Per-turn gain = baseRate * closeness + leadershipBonus - infamyPenalty, with baseRate = 3.
  2. Decay then add: new = max(0, current * (1 - 0.04) + gain). The 4% decay is a half-life of about 17 turns without gain.
  3. Closeness (0 to 1) = max(0, 1 - distance / sqrt(200)), where distance is the Euclidean distance between the member's and the party's (economic, social) positions on the -5..+5 axes.
  4. Leadership bonus (flat, stackable): National Chair +5, Vice Chair +2, Treasurer +2, National Committee +1, State Chair +2, State Vice Chair +1, Caucus Chair +2, Caucus Vice Chair +1.
  5. Infamy penalty = min(maxPenalty, maxPenalty * ln(1 + infamy) / ln(1 + 300)) (INFAMY_REFERENCE = 300), with maxPenalty = 4.
  6. Bonus action pool = poolMultiplier * number of player members.
  7. Each member's bonus actions = min(maxBonus, floor(influence / totalInfluence * pool * closeness)) with maxBonus = 6, added to the character's actions up to the Energy-scaled action cap and logged in actionGrantLog with source party.

Leaving a party resets Party Influence to 0, and rejoining starts fresh. The profile page Party Standing card, the members table and the party page header show the score and bonus actions. Members close to the platform gain influence faster and convert it into more bonus actions, a single active member of a small party can dominate the pool, and switching parties loses all accumulated standing.

Analytics, slate, caucuses, treasury planning#

Coalitions#

Cross-party alliances where national party chairs band together under a shared banner. See Coalitions for the dedicated page.

Constants summary#

Constant Value Source
Org baseline (Unaffiliated stake) 100 units ORG_BUCKET_BASELINE_UNITS,
Units per Build Org click 1 ORG_BUILD_UNITS_PER_CLICK, same
Org decay grace / rate 96 turns / 1% of units per turn ORG_DECAY_GRACE_TURNS, ORG_UNIT_DECAY_RATE, same
Recruitment slots 2 / 3 / 4 / 6 at org 0 / 30 / 40 / 50 RECRUITMENT_SLOT_TIERS,
Recruitment cost 5 NPP AP plus $50,000 (USD)
NPP AP pool cap / regen National 160 / 16 (Major), 80 / 8 (Minor); State 40 / 4, 20 / 3
Recruitment cooldown 24 turns
Purge enabled false PARTY_PURGE_ENABLED,
Purge cooldown / rejoin cooldown 48 / 24 turns same
Purge infamy base 25, x1.5 per successive purge, max 100 same
Party switch delay 24 hours PARTY_SWITCH_COOLDOWN_MS,
Max tax rate 33% MAX_TAX_RATE,
Leadership election length 72 turns; founding 12; custom 168 to 420 src/lib/nationalPartyElectionConstants.ts
Primary and general windows table in Primary system
Party influence pool / max bonus 3x members / 6 per turn
Coalition creation 25 actions
Coalition priorities max 3 active
Coalition disband vote 24 hours DISBAND_VOTE_DURATION_HOURS,

Data#

Collection Fields read or written Player visible
politicalParties sequentialId, countryId, name, abbreviation, chairId, viceChairId, treasurerId, committeeIds, coalitionId, membershipMode, pendingJoinRequests, regimeStatus, nppActionPoints, nppRecruitmentCooldownUntil, lastPurgeAtTurn, purgeCount, tier and earned-region fields Yes, except counters and cooldown stamps
statePartyOrg organization, organizationUnits, lastOrganizationBuildTurn, nppActionPoints, nppRecruitmentCooldownUntil, nppRecruitmentCooldownUntilTurn Org percentage yes; units and stamps no
characters party, partyInfluence, partyJoinedAt, partyJoinedTurn, lastPartySwitchAt, freePartyMoveUsedAt, foundedPartyId, purgeRejoinBlocks, infamy, actions, actionGrantLog Party and influence yes
electedOfficials party rewritten on join, leave and purge Yes
coalitions embedded members, pendingInvites, joinRequests, disbandVote; priorities Yes
states read for population tier, GDP and region counts Yes
gameState freePartyMovesOpen, currentTurn No
gameConfig partyInfluenceDecayRate, partyInfluenceBaseRate, partyInfluenceMaxPenalty, partyInfluencePoolMultiplier, partyInfluenceMaxBonus, firstJoinerBecomesPartyChair No
treasuryTransactions written on tax, transfer and NPP spending Treasurers and chairs

Also: coalitionId on PoliticalParty for quick lookups, per-country sequential IDs for URLs (/parties/coalition/3?country=uk), and 10 notification types for coalition events.

Configuration#

Setting Default Where set
partyInfluenceBaseRate / partyInfluenceDecayRate / partyInfluenceMaxPenalty 3 / 0.04 / 4 fallbacks; override in gameConfig ()
partyInfluencePoolMultiplier / partyInfluenceMaxBonus 3 / 6 (the code takes the maximum of the config value and the default, so config cannot lower them) same
firstJoinerBecomesPartyChair on unless explicitly false gameConfig, read in the join route
gameState.freePartyMovesOpen off admin flag, read by isFreePartyMoveWindowOpen
membershipMode open; "approval" files a request per party
partyCreationNPPs per country, see table src/lib/countries/<id>/institutionsFacts.ts
PARTY_PURGE_ENABLED false
National election duration 72 turns, custom 168 to 420 per national party, bounds in nationalPartyElectionConstants.ts
Era price level, GDP baseline 1 and per-country-era baseline fundGeneration.ts,
Major party ids per country majorPartyIds in country configs (UK: LAB and CON; DE: SPD and CDU; US: Democrat and Republican)

Timing#

Party work runs in these turn phases, in order ():

actionRefresh
fundGeneration            (income and taxes)
partyInfluenceTurn        (influence gain, decay, bonus actions)
caucusTax
nppFundGeneration
turnoutDecay
partyGOTV
partyOrgTurn              (organization decay and build resolution)
supportDecay, supportAccrual
partyTierTurn             (Major or Minor tier, after partyOrgTurn)
statePartyElections
nationalPartyElections
nationalCommitteeElections
partyActionGeneration     (NPP AP refill, after partyTierTurn)
expireCharters
emptyPartyCleanup
coalitionDisbandVotes
nppRelationshipMaintenance
...
nppBehavior               (later in the same turn)
primaryResolution         (before electionResolution)
electionResolution

Tier must run after partyOrgTurn and before partyActionGeneration, which generates Political Strength up to the tier-derived cap. Party influence accrues after the action refresh, so bonus actions land on top of the refreshed pool. Player endorsements, joins and leaves are request-time writes between turns.

Worked trace#

Income. A House member in a medium state (population 5,000,000; GDP scalar 1.0), donor base level 40, state influence 50, state tax 10%, national tax 5%.

  1. Base: medium tier, $10,000.
  2. Donor bonus: 200 * 40 = 8,000, times 1 + 50/100 = 1.5 gives $12,000.
  3. Office: House, $5,000.
  4. Total: 10,000 + 12,000 + 5,000 = 27,000.
  5. State tax floor(27,000 * 0.10) = 2,700; national tax floor(27,000 * 0.05) = 1,350.
  6. The character receives 27,000 - 2,700 - 1,350 = 22,950. A 40% state tax would pay 0 tax, not 40%.

Organization. Region with party A at 30 units and party B at 10 units. Denominator 100 + 40 = 140; A is 30 / 140 = 21.4286%. A Build Org click makes A 31 units, denominator 141, A 21.9858% (delta +0.5572), B drops from 7.1429% to 7.0922%. If A then goes 96 turns with no build, its units shrink by 1% a turn: after one decay turn 31 * 0.99 = 30.69.

Party influence. Member at (1, 1), party at (2, -1), current influence 40, no leadership role, infamy 0, party of 4 players, total influence 100.

  1. Distance sqrt(1 + 4) = 2.2361; closeness 1 - 2.2361 / 14.1421 = 0.8419.
  2. Gain 3 * 0.8419 + 0 - 0 = 2.5257.
  3. New influence 40 * 0.96 + 2.5257 = 40.93.
  4. Pool 3 * 4 = 12; raw share 40 / 100 * 12 = 4.8; floor(4.8 * 0.8419) = floor(4.04) = 4 bonus actions, under the cap of 6.
  5. With infamy 50 the penalty is 4 * ln(51) / ln(301) = 2.756, so the gain would be -0.23 and new influence 38.17.

Recruitment. A USD state party at 45% org holds 3 NPPs. Slots: 4 (40 to 49% tier), available 4 - 3 = 1. Recruiting spends 5 AP and $50,000 from the state pool and treasury, and sets the cooldown to currentTurn + 24. A national pool at Major tier with 150 AP refills min(160, 150 + 16) = 160. Party-wide capacity for 7 active members is 5*5 + 2*4 = 33, clamped to a ceiling of max(25, 6 x regions): a 4 region country caps at 25, a 50 region country at 300 (33 stays).

Edge cases and limits#

Invariants#

Failure and recovery#

Connections#

Driven by:

Affects:

Related:

Tests#

Gaps: no test pins the leader election tie-break rule or the disband vote majority in one place; the join route's free-party-move path and the expulsion block have no end-to-end test; the Speaker flow is covered by its own page rather than here.

Known issues and history#

Last checked: 2026-10-29, version 1.18.0

Ask