A House Divided A House DividedDocumentation
Changelog
Game Design/Economy & Finance

Commodities

Last updated 2026-08-21
Player wikiCommodities
Source files

Commodities model inputs and outputs between corporate sectors. Prices move with global and regional supply and demand, and feed into sector profit margins.

Supply is not an abstract number: under the live market mode (marketSystemMode: "plants", see The Capacity Economy (as shipped)) a sector's commodity output comes from real plant capacity it built and staffed. A sector still under construction, or mothballed, contributes nothing to supply even though it exists on paper. Sold units, not nameplate revenue, are what move the D/S ratio below. Beyond the margin modifiers described here, commodity prices also scale sector revenue directly through price realization (see that section below), and under the deeper clearing/capital tiers, revenue itself is derived from what capacity actually sold, not asserted from a growth rate. See The Capacity Economy (as shipped) and the in-game Market System guide for the full production side of this loop.

Overview#

28 commodity types trade across the economy:

Category Commodities
Extractable Iron Ore, Coal, Crude Oil, Rare Earth Minerals (merged with copper), Natural Gas, Timber
Industrial Steel, Electronics, Chemicals, Plastics, Ordnance
Energy & Fuels Electricity (Energy), Fertilizers, Pharmaceuticals, Vehicles
Food Food Products
Construction Building Materials, Construction Services
Services Software, Financial Services, Healthcare Services, Real Estate Services, Advertising, Consulting Services, Freight, Retail, Network Services, Entertainment Services

Each sector type supplies and demands specific commodities at rates tied to sector revenue. Retail demands many inputs and supplies the Consumer Goods (retail) commodity. Only owned corporate sectors participate in a state's commodity flow.

Pricing#

Each turn, prices update from supply and demand using logarithmic scaling with no hard cap:

ratio = demand / supply
if ratio >= 1: price = basePrice × (1 + 0.7 × ln(ratio))    # shortage
else:          price = basePrice / (1 + 0.7 × ln(1/ratio))   # oversupply

Blended price for display: 50% global + 25% national (country aggregate) + 25% regional (state-level). A global stabilizer (BASE_COMMODITY_SUPPLY_DEMAND = 50,000) on each side prevents extreme swings. A national stabilizer (NATIONAL_COMMODITY_STABILIZER = 500) prevents degenerate ratios in small countries.

Raw supply/demand pressure is compressed by a soft-knee before it reaches the price formula: pressure stays at full fidelity up to COMMODITY_PRESSURE_SOFT_KNEE = 3 (3x shortage/oversupply), beyond which the tail is compressed at COMMODITY_PRESSURE_TAIL_SLOPE = 0.25. The six extractable resources (iron, coal, oil, natural gas, timber, rare earth) use a wider knee for PRICE math only, EXTRACTABLE_PRESSURE_SOFT_KNEE = 8, so scarcity in those markets keeps signalling further before compression kicks in. Margin math always uses the default 3x knee, even for extractables.

Macro-driven commodities (financial services, healthcare services, advertising, real estate services) use a 50/50 global/national blend because state-level activity is meaningless for nationally-driven demand.

Margins#

Margin modifiers are computed independently at global, national, and state level, then blended 50/25/25, matching the price blend:

globalMod   = -K × Σ(rate_i × ln(D_global_i / S_global_i))
nationalMod = -K × Σ(rate_i × ln(D_national_i / S_national_i))
stateMod    = -K × Σ(rate_i × ln(D_state_i / S_state_i))
rawMod = 0.5 × globalMod + 0.25 × nationalMod + 0.25 × stateMod

With COMMODITY_LOG_K = 40, shortages are meaningful but manageable:

Scenario (rate=0.25) Ratio Margin hit
Mild shortage 1.1× -1.0%
Moderate 1.4× -3.4%
Severe 2.0× -6.9%
Extreme 5.0× -16.1%

Sellers in scarce markets get an equivalent surplus bonus (same formula, positive sign).

Per-commodity soft cap: No single commodity can contribute more than ±50 percentage points to the modifier (COMMODITY_PER_ITEM_CAP = 50).

Aggregate caps: After blending, the input leg is floored at −COMMODITY_AGGREGATE_INPUT_CAP (30) and the surplus leg is capped at +COMMODITY_AGGREGATE_SURPLUS_CAP (30). If input plus surplus falls below −COMMODITY_COMBINED_FLOOR (15), both legs are scaled so the combined channel cannot go below −15 percentage points.

State stabilizers: A state-level stabilizer prevents extreme ratios when a state has zero local supply, applied only in the margin path (state prices remain fully dynamic).

Retail penalty: Retail sectors take only 25% of negative input penalties (RETAIL_NEGATIVE_COMMODITY_PENALTY_FACTOR), reflecting substitution power.

Price realization#

Beyond the margin modifiers above, commodity prices scale sector revenue directly (when the market system tier is enabled):

factor = clamp((price / basePrice) ^ 0.5, 0.7, 1.5)
sectorRealization = supply-rate-weighted mean of factors across a sector's outputs
realizedRevenue = baseRevenue × sectorRealization

Prices are lagged one turn to break the price-to-revenue-to-supply feedback loop, and the per-turn shock is bounded to [-30%, +50%]. This is on top of, not instead of, the margin modifiers: shortages now reward producers with more top-line revenue, not just a better margin percentage, and gluts bleed revenue even when the margin looks tolerable. See .

Commodity Page#

The commodity detail page shows:

In-game UI#

Key Files#