Discovery Mechanics - Heliomance/Uncharted-Horizons GitHub Wiki
Design document §1.1–1.2
Players do not research specific technologies. Instead, they assign research effort to Focus Areas — broad fields of inquiry such as Fire, Farming, or Electricity. Over time, investment in a Focus Area produces Breakthroughs: specific discoveries that grant technologies, units, buildings, or abilities. Some Breakthroughs unlock new Focus Areas.
The discovery model, written in v3.120. Every measurement since 1 October 2026 rests on it, and the design simulator implements it, except environmental prerequisites, the environment's weighting of the spread, UNIQUE's first-come rule and stacking penalty, theoretical revelation, necessity bonuses and the per-city modifier. Competing Solutions' margins and lock-outs are measured since v3.124. Values marked provisional are playtesting levers.
A civilisation's Insight is its science, routed to Focus Areas. A breakthrough is found in two steps. First its idea must occur: someone in the civilisation has the insight that makes study possible. CORE ideas occur at once; for every other tier, occurring is luck, a chance each turn during a limited moment, and the tier sets the odds. Then the breakthrough is studied: its focus's Insight fills a hidden meter, priced by its era and by how far it lies ahead of the civilisation's development. Funding decides how fast study goes; luck decides which ideas come, and when.
A civilisation directs its research at one Focus Area at a time, the active focus, which receives 80% of each turn's Insight (50% before Specialisation of Labour, below). Switching focus is a deliberate strategic choice, not a per-turn slider allocation: each turn's commitment matters, and the resulting technology profile is characterfully uneven rather than uniformly broad. A Grand Endeavour (Section 1.5), while active, takes the active focus's share.
The rest is the spread. It goes only to the other foci that have something under study, in proportion to the work waiting in each: every breakthrough under study counts, and counts for more the further development has moved past the start of its era, so older work draws more. The civilisation's environmental modifiers (Section 1.3) multiply each focus's draw, so a coastal civilisation's spread tilts toward Seafaring and Trade and a highland one's toward Mining and Observation. A focus with nothing under study receives nothing: no Insight drains into fields where nothing can yet be studied. Neglected fields still move, and serendipity lives in the spread (Section 1.4).
Insight a focus cannot use this turn, because it has nothing under study or has just completed all of it, goes at once to the foci that still have open work, in the same proportions. Almost nothing is lost (0.1–0.5% of Insight in the simulator).
Specialisation of Labour. Before SO05 the split is a gentle 50/50: the civilisation can always lean somewhere, but cannot yet concentrate sharply. Discovering SO05 (Specialisation of Labor) moves it to 80/20, roughly doubling the concentrating power of the active focus. This gives the mechanic a thematic milestone (a society that has not yet specialised its labour cannot direct its inquiry sharply) without ever creating a dead-agency window: even at 50/50 the player is always steering. SO05 is gated on a population-5 city, which on standard speed lands around turn 25–40, just as the tree begins to branch, which is when sharper concentration starts to matter. The gate scales with game speed automatically (Unciv applies the game-speed modifier to city growth). (A "hard" variant, with no spread before SO05, was considered and rejected: with the prioritisation unlock itself un-prioritisable, a slow food start could leave the opening inert. It remains available as a tuning knob.)
Pace. Up to the Early Modern era, §2's spans and prices give every benchmark player one turn per discovery or more, counting knowledge from rivals (v3.108; the Ancient era made dearer in v3.123). From the Modern era the prices are pinned by the science victory's length, which must match base Civ V's (§2), and discoveries come faster: about 1.1–1.25 a turn on a good economy counting rivals' knowledge (1.17 over the whole stretch, v3.124), under one a turn of its own, and a little under one in all on an average economy. CORE ideas occur at once, so the opening's cadence is set by Insight and prices alone.
A focus queue supports all of the above: the player may pre-set an order of Focus Areas that auto-advances when the active focus has nothing left under study, so sequencing through the foundations never requires per-turn clicking.
Insight is generated on the same scale as base-game science, a 1:1 mapping, not a separate currency. A civilisation's per-turn science output (from population, buildings, specialists, trade routes, era scaling) is its per-turn Insight, routed to Focus Areas by the split above rather than spent on a single chosen technology. This inherits Unciv's balanced science curve across the whole game, and gives prices their anchor: §2's era spans are drawn against base Civ V's.
Development is a civilisation's cumulative Insight placed on §2's era spans: the index of the era its total lies in, plus the fraction of that span accumulated (0 at the start of the Primitive era, 8 at the end of the Space era). It measures how far through history a civilisation's research has come, whatever it has found. (Era entry, §2, is a separate count of breakthroughs.)
Every breakthrough has a price: its era's price per discovery (§2) × 0.83 (the model's calibration, provisional) × 4 for every era it lies ahead of the civilisation's development, the premium of being ahead of one's time. "Ahead" is counted from the start of the breakthrough's era, so a breakthrough of the next era costs 4× at the start of the current era, 2× halfway through it, and its plain price once development reaches its era. A breakthrough behind development keeps its own era's price, so catching up is fast, as in base Civ V. The premium makes early arrivals possible but expensive: ×4 per era is the steepness at which arrivals a full era early disappear, while a specialist still earns a real head start (about half an era for a Mathematics specialist's Calculus).
Two implementation points follow from the 1:1 mapping:
-
Progress is stored as a floating-point value, not an integer. Base Unciv accumulates research toward a single tech in whole numbers (
techsInProgress: HashMap<String, Int>), which is fine when all science funds one target. Here a breakthrough may receive a small fraction of a small spread, which would round to zero under integer storage. Since the accumulation loop is being rewritten regardless, progress uses a float so small shares still add up. -
The per-city cost modifier is retained, applied to the price. Base Unciv multiplies each tech's cost by
1 + (cities − 1) × techCostPerCityModifier(TechManager.costOfTech), the vanilla mechanism that stops wide empires out-researching tall ones. The same multiplier applies to every breakthrough's price, preserving the vanilla tall-versus-wide balance. (The vanilla catch-up modifiergetScienceModifieris not carried over: Knowledge Diffusion replaces it.)
A breakthrough becomes discoverable when its prerequisite breakthroughs are discovered (each prerequisite group satisfied by at least one option) and its environmental prerequisites are met. A discovery takes effect at the end of its turn, so a chain advances at most one link a turn.
A discoverable breakthrough receives no Insight at all, however hard its focus is funded, until its idea occurs: the moment someone in the civilisation has it. From then it is under study: it takes a share of its focus's Insight every turn until it is discovered, and it is never lost. Occurring is hidden; what the player sees is governed by revelation (Section 1.4).
- CORE ideas occur the turn the breakthrough becomes discoverable.
- Every other idea has a constant chance each turn through a window, its moment, which opens when the breakthrough becomes discoverable: half its era's length for STANDARD ideas, the whole era's length for UNCOMMON, RARE and UNIQUE ones. The chance is sized so that the odds of the idea occurring within its window are the tier's (the table below).
- Catch-up. Behind history the window shrinks: once the idea's era has ended, the window is divided by 1 + 4 × the eras since it ended, packing the same odds into fewer turns. A Medieval STANDARD idea is 10.0% a turn over 18 turns on time, 27% a turn over 6 turns half an era late, and 41% a turn over 4 turns a full era late, so a landlocked civilisation that reaches the coast late has its Caravel within about six turns.
-
A missed idea. If the window passes without the idea occurring, the idea is lost. UNCOMMON, RARE and UNIQUE ideas are also lost once development is more than half an era past the end of their era, window or not. A lost idea can still return in three ways:
- Rediscovery on demand (STANDARD ideas; v3.120). A lost STANDARD idea comes back when something waits on it. Each turn it has a 10% chance of occurring again for each thing waiting on it (19% with two, 27% with three): a breakthrough it alone now blocks, an FTL prototype it stands in the way of, or an open question on the FTL screen it would answer. It then goes under study at its normal price. History's version is multiple discovery (Newton and Leibniz, Darwin and Wallace): ideas that much depends on keep turning up. An idea nothing waits on stays lost, which is the variance between games the tier exists for, and UNCOMMON, RARE and UNIQUE ideas keep their odds. No game is lost to an unlucky STANDARD idea: none of 2,700 went unfinished in the measurement that adopted it (three worlds, v3.120), nor any of 900 isolated games in the discovery workshop's (14 October).
- Knowledge diffusion (below) brings common knowledge from contacted civilisations.
- A Grand Endeavour (Section 1.5) can complete a lost idea that has been Revealed.
- Glimpses. Each turn a discoverable idea fails to occur, it may be glimpsed instead: Revealed, so its goal is known, without the idea itself (Section 1.4). The chance is 10% a turn for STANDARD ideas and 3% for UNCOMMON ones (both provisional, to be calibrated), and never for RARE or UNIQUE ideas, so the surprises stay surprises.
Windows and chances by era, at a good economy's era lengths (§2; from the simulator):
| Era (turns) | STANDARD: window, chance a turn | UNCOMMON | RARE | UNIQUE (window: the era) |
|---|---|---|---|---|
| Primitive (33.0) | 16.5 turns, 10.9% | 1.54% | 0.32% | 0.20% |
| Ancient (36.0) | 18.0, 10.0% | 1.41% | 0.29% | 0.19% |
| Classical (28.0) | 14.0, 12.7% | 1.81% | 0.38% | 0.24% |
| Medieval (36.0) | 18.0, 10.0% | 1.41% | 0.29% | 0.19% |
| Early Modern (49.0) | 24.5, 7.5% | 1.04% | 0.21% | 0.14% |
| Modern (46.0) | 23.0, 7.9% | 1.10% | 0.23% | 0.15% |
| Atomic (36.0) | 18.0, 10.0% | 1.41% | 0.29% | 0.19% |
| Space (56.0) | 28.0, 6.6% | 0.91% | 0.19% | 0.12% |
Windows are counted in turns, so a slower economy gets the same turns and less Insight in them. (UNIQUE's figures are the simulator's flat 6.5%, which stands in for the stacking penalty below.)
Each breakthrough under study has a hidden meter, drawn when it comes under study: its price × a random factor (mean 1; the middle half of draws fall between 0.63 and 1.28) × any cost multiplier (below). A focus's Insight is shared among its breakthroughs under study in proportion to their progress + 0.1, progress being the Insight it has received measured in its price (0.5 once it has had half its price, whatever its hidden meter). This is momentum: lines already under way draw more, so arrivals stagger rather than all maturing together. Every tier is studied alike once its idea has occurred (decided 14 October 2026): rarer ideas pay for their rarity in occurring, and gain nothing by being slower to finish. Insight becomes progress at the price in force when it is spent, so a breakthrough studied ahead of its time grows cheaper as development catches up. A breakthrough whose share would complete it takes only what it needs and is discovered at the end of the turn; the remainder is shared again among the rest. Progress persists: discovering one thing never sets another back, it frees attention.
A worked example. A focus receives 100 Insight a turn and has three breakthroughs under study, each priced at 200 with a meter of exactly 1: A is 60% done, B 10%, C new.
| Turn | Weights (A / B / C) | Shares of 100 | After the turn |
|---|---|---|---|
| 1 | 0.7 / 0.2 / 0.1 | 70 / 20 / 10 | A 95%, B 20%, C 5% |
| 2 | 1.05 / 0.3 / 0.15 | 70 / 20 / 10, but A needs only 10 and is discovered; the 60 left over is shared between B and C (weights 0.3 / 0.15): 40 / 20 | A discovered; B 50%, C 20% |
So B, already under way, becomes the leading line; C keeps a small share and grows into the next one.
Breakthroughs that require specific resources (e.g. "iron deposits in territory") can be satisfied by:
- Extraction: The resource exists in your territory and you've built the relevant improvement.
- Trade: You have an active trade agreement importing the resource from another civilisation. Trade-accessed resources count as "in territory" for prerequisite purposes.
- Conquest: You've captured territory containing the resource.
This means a maritime civilisation with no iron mines can still research Iron Smelting if they're importing iron through trade — but at the mercy of their trade partner. Losing the trade agreement means losing access until they secure an alternative source.
Section 1.2 continues on Breakthrough Tiers, Competing Solutions, Knowledge Diffusion.