Idle Kingdom Clicker Internals

Research

How research is paid for, what each of the 65 researches does at every level, what it costs, and how long it takes, as implemented in Code.dll (TechStateTools, BalanceTools.GetResearchCost, CreateBoostsFromTechLevelSystem, CreateBoostsFromAdjacencySystem) with the game's BalanceData25 research tree.

1. How research works

TechStateTools.GetResearchPerSecond @ 0x270A8AC · GetResearchCost @ 0x28530D4 · TechStateInfoComponent.Paid

A research isn't bought outright. Its cost (always Science) is paid gradually into the active research (TechStateInfo.Paid), and the level completes when the cost is met.

research per second = Science surplus delivered to your Universities per second (from the cart solver) time to finish = (cost − paid) ÷ research per second

That's why the cart planner weights University deliveries ×4 (production page, section 5): Science reaching Universities is research speed. More Universities, more Science goods in range, and fewer transport bottlenecks all speed it up. The World Completion Bonus and prestige speed it up too, because both raise transport capacity.

Research you get for free

UnlockBeginningTechsForFinishedTutorialSystem · TechStateTools.IsTechUnlockedFromCastle · CastleUnlocks.Setup

Four researches are yours from the start: Castle Construction, Foodstore, Foraging Hut and Grassland Dwelling. Seven more reach level 1 free as your castle levels up: Foodstore at castle level 2, Forest Dwelling at 3, Woodcutter at 4, Stockpile at 7, Shaman at 10, Library at 13 and University at 15. Further levels are paid in Science as usual.

Cost of a level

one listed cost: cost(1) = base, cost(n) = base × UpgradeCost[n] (n = 2 … 100) a cost per level: cost(n) = Cost[n] (Land, Infrastructure, Portal)

What a level does, by research type

Producer / Refinery
unlocks the building (a producer makes raw goods, a refinery turns goods into better ones). From level 2, that building type gets production × UpgradeMultiplier[n] (a Tech_ boost filtered to that building).
Transport / Crossing
unlocks the store, or the bridge, tunnel or portal. From level 2, its transport capacity × UpgradeMultiplier[n]. Bridges reach 2 tiles from level 30 and 3 from level 76. Tunnels reach 2 from level 50 and 3 from level 76.
Neighbour bonus
each building of that type gets production × (same-type neighbours you own) × m(n), where m(n) = min(4, 2 + 0.01(n−1) + 0.09⌊n/10⌋ + 0.06⌊n/50⌋).
Land
lets you claim that terrain (Grassland Dwelling, Shipbuilding and so on). Level n gives a number of free tiles of it.
Infrastructure
Village Center, University, Academy, Castle, Trading Post. Level n sets the maximum number you can build and their maximum level. For the Castle (Castle Construction), the first number is the governor slots instead: 1, then 2 from research level 3, then 3 from level 9 (confirmed in the game). The Castle's level cap comes from its own unlock list.

2. The tree

Techtree.Data · Prereq / PrereqLvl · Tier

Rows are the research's tier. Arrows show prerequisites, labelled with the level needed when it's above 1. Click a research to open it in the calculator below.

3. Research calculator

Try it
Every level

4. The level table

TechtreeBasicUpgradeData.Data[n] = { Cost, Multiplier }

Every research with a single listed cost (Producer, Refinery, Transport, Crossing, Neighbour bonus) shares this table. Two patterns:

Ordinary levels
each costs ×16 the previous one (2⁴ per level) and adds a fixed amount to the multiplier: +0.2 per level up to 9, then +0.4, +1.8, +5.6, +13, +25.2 … per decade.
Milestones (10, 20 … 100)
cost extra on top of the ×16: ×10 at level 10, doubling each decade to ×5,120 at level 100. In return they roughly double the multiplier (level 19 → 20 goes ×7.4 → ×15.5). So the level after a milestone costs less than the milestone itself, and stopping just short of a milestone leaves most of the decade's value unclaimed.

The last column, "gain per ×10 cost", shows how much multiplier each tenfold increase in Science buys. Milestones are by far the best value.

The table has rows up to level 103, but rows 101–103 are blank (cost 0, multiplier ×1). GetMaxLevel returns 104 for these researches, so in theory levels past 100 would be free and would reset the boost to ×1. Treat 100 as the real cap.

5. Neighbour bonus

CreateBoostsFromAdjacencySystem.CountNeighborsAndSetBoost · BalanceTools.GetAdjacencyBoostMultiplier @ 0x2854924

Ten neighbour-bonus researches (Plant Lore, Fungal Lore and others) each target one building type. With the research at level n, every player-owned building of that type counts its neighbours of the same type and gets a local production boost of neighbours × m(n). With no neighbours there's no boost. Local boosts multiply with everything else, so clustering same-type buildings pays off quickly.

Try it

Neighbours on the hex grid, so at most 6. Which researches: .

What's verified and what isn't