1. Upgrade cost
Each building has up to three cost components (Food, Material, Science). Each one is a list of bands that start at particular levels. Every level you buy is priced separately and the prices are added up:
- ℓ
- the level being bought.
- band(ℓ)
- the last band whose
StartLevel≤ ℓ (the first band if ℓ is below all of them). - firstStart
- the
StartLevelof the component's first band. The exponent counts from here and does not reset at a new band, so a band boundary is a one-off step in price, not a new curve. - effectMult(ℓ)
- ×5.4 when ℓ is an effect level (10, 25, 50, 100, 200 … 2000), the levels the game announces as "Level N Effect Acquired". ×100 for University and Academy (every 10 levels) and Village Center (every 5). Always 1 for Castle and Trading Post. Otherwise 1.
A component only adds cost once ℓ ≥ firstStart (the exponent must be ≥ 1). That's how Material appears in a Foraging Hut's price from level 101.
Price of each single level, levels 1 to
Show as a table
2. Building another copy
A new building's price depends on how many of that type you already own (n). The game first checks a hand-tuned step table. Past the end of that table it falls back to a formula:
The AmountPower and AmountFactor fields in the balance data are only used here, never for upgrades.
Next 25 copies
3. Production
- Base
BuildingProductionBaseTable, per unit of level, per second.- Timer
ProductionTimerTable, seconds per cycle before any effect level.- 2^effects
- each effect level (10, 25, 50, …) doubles the rate and halves the cycle time. Per-cycle output (before boosts) is therefore Base × level × Timer at any level: effect levels make cycles come faster, not bigger.
- global
- all active global boosts, mostly multiplied together (one ID-prefix group is summed first). Prestige is one of them (the game's Economy Boost).
- local
- governor boosts on the tile add together; Royal Edict boosts multiply.
4. Prestige
Prestige gained on reset
- PrestigePerLand
- 1.0 in this data.
- collected X
- total of that category collected this run (
totalResourcesCollectedInRun). - f(x)
- a tier lookup: the factor of the highest threshold ≤ x, or 1 below the first threshold. Food's first thresholds are 10M → ×1.2, 1.72B → ×1.4, 3.79B → ×1.6.
- land
- the land you've claimed on the current map, as the game shows it (castle and free tiles included).
- landFactor
- the same lookup on the current map's land table (map 1: 10 land → ×2.0, 15 → ×2.1, …).
What prestige gives you
The game's reset screen puts it as "each point increases production, transport and research speed by 10%". In the code it multiplies production and transport capacity, and research speed follows from transport, because research runs on the Science that carts deliver to Universities.
aa = 1015, ab = 1018 … az, ba …, each step ×1000. Inputs accept these suffixes (5B, 2.5aa, 40K) or plain numbers.Sources and confidence
- Read from the code: every formula above comes from statically reading the ARM64 disassembly of the methods named in each section (Cpp2IL dump of
libil2cpp.so, metadata v39, Unity 6000.3.11f1). Constants not in the JSON came from the binary: the 5.4× and 100× effect-level multipliers and the lists of effect levels. - Checked in the game: five upgrade prices from a late-game save match to the digits shown. Foodstore 410→411: 6.21ag Material. Bridge 1→2: 661.25ad Material + 6.61ad Science. Fisherman 400→401: 138.85af Material. Library 450→451: 23.07af Material + 809.49ae Science. Quarry 225→226: 22.63ag Material. Clay Pit: built for 100T, then upgrades to level 2 for 129.96T, to level 9 for 325.19T, to level 10 for 2aa and to level 25 for 14.29aa. Levels 10 and 25 are effect levels, so this confirms the ×5.4 surcharge (325.19T × 1.14 × 5.4 = 2.00aa). Prestige on reset also matches: on map 4 the calculator gave 2.055ac prestige and a 31.66% boost, and the game showed 2.05ac and ×1.32. Production also matches: a level-1 Foraging Hut on map 1 showed 0.105 Food/s base × level 1 × governors (castle) ×12.72 × research level 17 ×6.6 × Economy Boost ×988.3233ab = 8.71ac Food/s. The formula gives 8.712ac. The prestige factor is exactly 1 + 0.1 × prestige (9.88ac), and the game calls it the economy boost.
- Names: the game's code calls the second resource
Wood, and the game shows it as Material. These pages use Material. - Prestige: the reset calculation also records Shrine and Portal Tower factors in its result, but this function doesn't multiply them into
Total. They may be applied elsewhere or only displayed. Not traced. In the game, the reset screen doesn't mention shrines, and prestige matched the calculator without them. Portals haven't been checked. - Settlements: land prices count your owned tiles across all terrains, subtract free tiles (the castle uses one free grassland), and are scaled per map. The building-cost calculator here ignores all that. Use the maps and prestige page, which handles it and matches the game.
- Not modelled: refinery input consumption, cart transport, governor traits, the linear-programming resource valuation, and the exact makeup of global and local boosts. The production calculator takes those as plain multipliers.