Jump to content

Convergence.Game/BIBLE/part 7

From MindAttic Docs
Part 7 of 8: 1 · 2 · 3 · 4 · 5 · 6 · 7 · 8
  • WaveDef.Recruitables (RecruitableDef: hero Class, Level, tile, Dialogue, Conditions) places a hero class on the board on the third team, Team.Neutral: amber keyline and a TALK tag, no timeline icon, never acts. Neither side fights it — enemies ignore it (no targeting, no pincer through it, a 2×2 won't shove it), hero damage and enemy-only abilities skip it, and it doesn't hold up a wave (a wave clears with it still standing). A hero dragged through it swaps places with it like any one-tile unit. A recruitable that wants healing enters at half HP (HpPercent overrides).
  • Conditions (all must hold): HealedBy (any hero, or Id = that class, heals it — a hero ally-only ability reaches a neutral), ParticipatedInPincerWith (it stands beside a hero attacker — where a supporter would — when that hero's pincer strikes), PayGold (Amount, paid from the caravan's banked gold at the moment it joins — BattleSetup.Purse, deducted on commit whatever the outcome), TalkedBy (only that hero class can talk it round).
  • TalkCommand (hero id, neutral id; legal only when cardinally adjacent, footprint-aware): tap the neutral with a hero beside it. Terms unmet → RecruitOfferedEvent: it speaks its Recruit dialogue up to the join node and says what it still wants — no clock cost (like a no-op drag). Terms met → one action: RecruitJoinedEvent, it speaks the join node, flips to Team.Hero as a guest ally (§25.11 from there on: player-controlled; standing at a victory → joins the roster; down at the end → it'll be back).
  • Dialogue: a DialogueDef with Trigger.Kind = Recruit, Trigger.Id = the recruitable's class; linear nodes, no choices or effects, must have a join node; $with is the hero talking. Never played between battles.
  • Bot: HeroBot talks a recruitable round the moment every term is met (Recruitment.ReadyTalk), values healing one that wants it, and never counts shuffling a neutral as progress.
  • Content: Ronin (Tithe Moors III, wave 1 — heal me, fight beside me), Sellsword (Shardfall III, wave 1 — 150 G).
  • Open (§6.1 of the draft): permanence — today a talked-round recruit joins the roster exactly like a guest.

25.11.2 Random rescues (added 2026-11-05, owner: "the random character recruitment for saving them", GG-T236)

Amended 2026-11-27 (owner, GG-T1656): the wits quiz is replaced by hero side stories (§28.11). A hero is met as a Wild hero icon in their own faction's regions and recruited through a short side-story quest chain ending in RewardHero; the in-battle wanderer and Rapport stay. The GG-T387 game of wits and the older one-question talk below are superseded, and WitsExchanges, Wanderers.Judge/Threshold/Outlook, the PostBattle talk block, the eight wanderer_* talks and the quiz rules in WandererContent.ValidateDialogue go once the side stories are built. Proposed until the epic's tasks build it (epic GG-T1652): the text below is the live behaviour until then.

Amended 2026-11-16 (GG-T387, owner: "winning a game of wits conversation"). Supersedes the one-question talk and the understanding rule that followed it, now struck below. The talk is a game of wits: DialogueDef.WitsExchanges = 3 exchanges, each a question from the wanderer and three replies for the companion, one per DialogueChoice.Wit (+1 wins the point, 0 neutral, -1 loses it); DialogueScreen shows the standing as a pip meter (the joining mark ringed in gold) that steps after each reply with a cue. The understanding is deterministic, no dice: the start is low trust 0, half 2, full 3, plus 1 with a companion of their own faction; each reply adds its Wit; they join when the final standing is at least Wanderers.Threshold = 4. Validation: 3 exchanges of three unconditional replies, one each of +1/0/-1, all going to the same node; a node going on to $outcome; join/part end the talk; faction Regions must be campaign themes, each claimed once. Who: factions.json Regions — Wanderers.Local prefers heroes whose faction roams the stage's region while any are left, else anyone from the pool.

A battle the player launches may hold a captive: a random hero the player doesn't own, freed as a guest ally (§25.11 from there on).

Amended 2026-11-07 (owner, GG-T342): the captive is now a wanderer. Owner: "so you will sometimes meet a hero while fighting a monster and they will fight the monsters separately but you are able to complete pincer moves with them so you fill a trust gauge by pincering, or healing them at the end of the stage and the loot you and the team member you choose has a conversation with them, if they can come to an understanding they join, if not they go back into the pool of possible recruits" — clarified the same day: "the point is to gain their trust, tell them what they want to hear, and then you have a follower — another party member."

  • The roll (Meta/Wanderers.cs, was Rescues.cs): Wanderers.Chance = 25% per campaign battle, at most one wanderer, decided when BattleScreen builds the battle (Wanderers.Apply → BattleSetup.Wanderer, a WandererSpec). Seeded from the save's creation time, the stage id and the battle seed (Wanderers.SeedFor), so a battle replays the same roll. Never on a Test Mode save, a test stage, the Crucible, or a stage that already has an authored guest or recruitable; and never in the bots' balance runs or dotnet soaks, which build battles without Wanderers.Apply. Authored guests (§25.11) and talk-recruitables (§25.11.1) are unchanged.
  • Who (Wanderers.Pool): an unowned, not-lost hero class that has no other way in — not in the Summon Circle's gold pool, not an authored guest or recruitable, not named by a dialogue's JoinHero/RecruitHero, not a mercenary (mercenaries.json, GG-T233), not a Camp NPC's face. Amended 2026-11-27 (GG-T1597): an unowned, not-lost, uncut hero class whose ClassDef.Acquire is Wanderer or Starter (a custom party can leave a starter unowned). Id order, so a seed always names the same hero. The same pool feeds the Summon Circle's Diamond draw (§25.10).
  • On the board: … as a player-controlled guest (Unit.IsGuest) … "A captive X! Keep them alive to free them." On the board: the wanderer steps on in wave 1 or 2 (seeded) at the stage's recommended level with its class loadout on a free tile (RandomFreeTile, GG-T227) as an independent ally (Unit.Wanderer, IsIndependent), exactly like a tamed beast (§25.11.3): hero team, never commanded (no drag, no bar, not one of HeroesLeftToAct), its own turn icon, and on its turn the shared ally AI (BattleRunner.RunAllyTurn: the pincer planner, else charge the nearest foe through anyone one tile big, then close a pincer it stands at the end of, else strike the weakest adjacent foe, else shoot one in range). As a hero-team unit it pincers with the party both ways (Unit.CanPincer). WandererJoinedEvent; billboard "A wandering X fights the monsters! Fight beside them to earn their trust."
  • Trust (Unit.Trust/TrustNeeded, TrustGrewEvent; tuning in BattleConfig): the gauge is full at 6 (WandererTrustNeeded). +2 (TrustPerPincer) for each hero pincer it is part of, as one of the two ends or as a flanking supporter, alongside at least one commanded hero (a heroes' pincer it closes on its own turn counts). +1 (TrustPerHeal) each time a commanded hero restores some of its HP (a heal at full HP gives nothing). Never above full. Floats "Trust n/m", and "Trusts you!" with a war-cry cue when full. (Proposed by GG-T1290: the player text of this gauge becomes Rapport, the code names stay; Trust becomes the lasting bond of §25.20.)
  • Look: a rose keyline (unit-keyline--wanderer, Palette.Wanderer) with a WANDERER tag; its timeline icon has the same rose border; tapping it says "X is a wanderer: it fights on its own. Pincer beside them or heal them to earn their trust"; the InspectCard heads it "Wanderer · role" with a trust meter (inspect-trust) and how to earn it.
  • Defeat and falls: a wanderer still standing does not keep the party in the fight (only commanded heroes do). If it falls it is down, never lost ("X has fallen!"; a revive brings it back with its turn icon); down at the end, it simply goes back to the road — results read "The wandering X goes on their way — May be met again", nothing is recorded and it stays in the pool.
  • The talk (the "loot"): standing at a victory, the wanderer waits on the results screen (BattleReport.WandererOffer, Wanderers.Offer) — it never joins on its own. The block shows its trust meter, the rule as it stands (Wanderers.Outlook) and a button per party member (a tamed monster can't talk; a faction-mate is highlighted with their faction's name). The member the player picks talks with them: a dialogues.json conversation with Trigger.Kind = Wanderer (Id = the wanderer's hero class, else its factions.json faction, else none for the generic wanderer_met; Wanderers.Scene), "$hero" the wanderer and "$with" the companion. It has one question with three answers: exactly one says what they want to hear (goes to the heard node); the others go to unheard. Leaving the results without talking lets them go.
  • The understanding (Wanderers.Judge, deterministic, no dice): they join only if the companion says what they want to hear and they trust the party: full trust, or at least half trust with a companion of their own faction. Below half, nothing said will do. Then both replies go on to "$outcome", which the rule resolves to the scene's join or part line.
  • Join: a full, normal party member exactly like a freed guest (BattleFactory.JoinRoster): the roster, the party if there's room, at their battle level and wounds; "X joins the caravan!". Part: they go their own way and back into the pool — nothing recorded; owning the hero is the only thing that takes them out.
  • Factions (factions.json, FactionDef, ContentDb.FactionOf): the STORY.md factions with heroes — the Street, the Free Holds, the Lantern Road, the Fen-dark, the Ember, the Wild — and their hero classes; validated (hero classes only, each in at most one faction, unique ids that aren't class ids). Talks: one generic, one per faction, and the Dark Templar's own.
  • Validation (WandererContent.ValidateDialogue): a Wanderer talk names a hero class, a faction or nothing; has no effects; exactly one question of three unconditional answers, one to heard and the rest to unheard; both replies go on to "$outcome"; and join and part nodes end it. "$hero" and "$outcome" fit a Wanderer talk only. The GG-T236 Rescue trigger and the rescue_freed scene are retired.
  • Bots and Test Mode: the bots and soaks never roll a wanderer and Test Mode never does, so nothing changes for them; Wanderers.Converse plays a talk headlessly with a chosen answer (tests). Dev/automation: devwanderer (alias devcaptive) forces the next launch's wanderer.
  • (Tests: WanderTests — the deterministic roll near 25%, pool exclusions, no roll in Test Mode/the Crucible/a guest stage, the roll brings an independent ally with its own icon, it fights on its own turn, trust from a hero pincer and from a heal and its cap, a lone wanderer can't hold the field, a standing one waits to talk and a fallen one returns to the pool, the understanding rule, the right answer at full trust makes a normal party member, the wrong answer or too little trust sends them back, determinism, every pool hero has a faction and a talk, Wanderer-talk and faction validation.)

Freed: … "X is freed and joins the caravan!" … the rescue conversation (Trigger.Kind = Rescue) … Down at the end: … "May be found again" … (both superseded above).

25.11.2.1 Wanderer heroes from the owner's art (added 2026-11-07, owner, GG-T333)

Amended 2026-11-16 (GG-T388): Echo (Support, a Lantern Road wanderer) fills the one gap no hero covered, copying: Encore repeats an ally's last skill or spell from her own position (a copied spell still costs its orbs). Her foe twin, the Mocking Echo, charges an attack that turns a hero's last move back on the party (The Still II, Halcyon II, The Choir's Cathedral I; GG-T393). Both wear copies of the mannequin art until the owner's art arrives.

Amended 2026-11-21 (GG-T531, owner): the Echo hero class is cut (no art, no story role); her abilities stay. Encore (echo_encore) is now on the Tactician's kit (the other turn-order support, whose Countermarch it can copy); Mirror Skin (echo_mirrorskin, Reactive: a fair chance to reflect 25% of a direct hit) is now on the Courier's kit, beside Blur, and the Mocking Echo keeps it. Encore's slot still greys out with "No one to use it on" when no ally has a move to copy (GG-T413/GG-T501). The Echo leaves the Lantern Road faction, the wanderer pool and the Diamond draw; her Advice quiz and description text are dropped, and so is her portrait (the Mocking Echo has its own). An old save that holds an Echo loses her on load (SaveMigrations.DropRetiredHeroes: any hero whose class no longer exists leaves the roster and the party, her gear goes back to the bag with its wear, and the load logs a line). The Mocking Echo foe is unchanged.

Owner 2026-11-07: the new heroes from the art are recruited as wanderers — "met mid-battle, earn their trust, say what they want to hear, and they join". Each is in no other pool (not the Summon Circle, no authored guest or recruitable, no story JoinHero, not a mercenary), so Wanderers.Pool holds them and so does the Diamond draw (§25.10.2). Each has a factions.json faction for the half-trust bridge, an Advice quiz (talk_quiz_<id>) and the faction's generic wanderer talk (no hero-specific scene: story text is placeholder until it is authored in Prose, GG-T355). Portraits are 1024 canvases with Figure and Thumbnail (§12.1.2).

  • Herald (herald, Healer, Speed 12, home tree Cleric, faction the Wild). A flower-winged messenger of the Bloom (STORY.md §4) who heals by giving her own essence. The Bloom is a growth, not a faction with heroes, so she sits with the Wild, the closest faction (tide-changed growths). Bar: Heal, Guardian's Rush, potion, Lifegift, Covering Withdrawal (the Skirmish-Mender cluster). Signature Lifegift (herald_lifegift): a Skill, cooldown 2, instant, an ally mends 30 (scaled by WIS like every heal) and the Herald pays Essence, 12% of her max HP. Passive Rebloom (herald_rebloom): at her turn start below 60% HP she mends 5%. Support Petalfall: heals the chain 10%, reach 3. Stats lean VIT/WIS (9/14/12/12/12/13/15/12), so she can afford the price. Where the Cleric spends orbs and wards, the Herald spends herself: free, big heals that leave the bank for the casters.
    • Life Price (was "Essence", renamed GG-T646 for canon: mana, never essence; glossary id essence kept) (AbilityDef.LifeCost, 0..0.5 of max HP; Formulas.LifeCostHp): once the heal lands the caster loses that share of her max HP, at least 1 and never her last HP. It is a price, not a blow: no attacker, no damage triggers, no cast stagger; a DamagedEvent with no source and the note "Life Price" plays the -N float and the debuff cue. Validated: a Skill or Spell ally heal (BaseHeal > 0, AllyOnly). The bot never pays it below 40% HP and weighs the HP given. Glossary [Life Price]. Player text names the six enchant materials "<Element> Aether" (ids mat_essence_* kept) and enchanted gear reads "Imbued with <Element> aether."
  • Manasmith (aetherist, Healer, Speed 12, home tree Cleric, faction the Fen-dark; GG-T337). A Choir singer who reversed the hymn and pours mana in instead of drawing it out (STORY.md §4); the Fen-dark is where the Choir's runaways go (§3.5). Bar: Heal, Preemptive Ward, potion, Mana Pour, Sanctuary Rite (the Aegis Warden cluster). Signature Mana Pour (aetherist_aetherpour): a Skill, cooldown 4, instant, an ally mends 15 and one orb flows into the party's bank — the Bulwark's Siphon (§14.15) run backwards. Passives Arcane Insight (mana charge when she backs a pincer) and Pure Spirit (she can't be Silenced: the Choir's Hush doesn't take). Support Cyan Current: heals the attacker 10%, reach 3. Stats lean INT/WIS (7/9/11/12/12/18/18/12). Where the Herald spends HP to save orbs, the Manasmith feeds the bank so the casters can spend.
    • An orb grant can ride a heal (AbilityDef.PoursOrbs: GrantsOrbs on an ability that also heals, hits or buffs). It resolves on its targets like any ability, then mints its orbs ("aether"); a bare grant (Meditate, an ether) still resolves on its own with no target.
  • Tactician (tactician, Support, Speed 12, home tree Alchemist, faction the Free Holds; GG-T336). A former Choir staff officer who planned tithe routes until she read the ledgers (STORY.md §4). The Choir has no hero faction; the Free Holds, with their militias and old oaths, are the closest fit for a defecting officer. Bar: Quicken, Stumbling Ground, potion, Countermarch, Swift Swap (Tempo Weaver tools for position and pace). Signature Countermarch (tactician_countermarch): a Skill, cooldown 4, no damage, on any foe. Passive Keep Away (a fair chance a foe that strikes her directly is pushed back 1 s). Kit also holds Encore (echo_encore, from the cut Echo, GG-T531): repeats an ally's last skill or spell from where she stands. Support Flank Order: Pushback 0.75 s on the pincer's foes, reach 3. Stats 10/11/12/12/12/15/15/12. The other supports move the party's tempo; she rewrites the enemy's order.
    • Countermarch (AbilityDef.SwapsTurns, Countermarch): the foe's turn icon trades its time to act, exactly, with the foe whose turn is furthest off: the one about to act goes to the back of the line and the straggler steps up to its time. Both must be on the bar (not recovering in the tray, not Frozen) and on the enemy side; an independent ally is never moved. On the last foe, or one off the bar, it does nothing ("Already last" / "Not on the line"). It is a trade, not a push, so the Pushback cap (§2.3) doesn't bound it: the bar holds the same turns, only who strikes next changes (a charging caster or the foe beside a wounded hero for a harmless straggler). Played back as the existing Pushback glide on the foe and Haste glide on the straggler, with their cues, and a "Countermarch!" float. Validated: a Skill or Spell that picks one foe. The smart bot prices it by the time it buys (GG-T356, HeroBot.CountermarchValue): the harm of the foe's next turn (HeroBot.NextTurnHarm: its worst blow on a hero it can reach, a KO and a completed enemy pincer weighing most, a charge it would start less), scaled by the seconds it is delayed (3 s buys all of it), less the harm the straggler does when it steps up, plus the pending hero casts that now land first; under 6 points (no heavy blow, KO or pincer averted) it skips it; the casual bot sends a threatening foe to the back. Glossary [Countermarch].
  • (Tests: WandererHeroesTests — each hero's kit, the wanderer pool and faction, the quiz, the art; Lifegift heals and costs essence but never the last HP; a LifeCost must pay for an ally heal; Mana Pour heals and pours an orb; a bare orb grant is unchanged; Countermarch trades two turns exactly and does nothing on the last foe or one off the bar; the smart bot countermarches to avert a KO but not a light blow, nor to trade one KO for a sooner one; a Countermarch must pick one foe.)

25.11.2.2 The Commander (rewritten 2026-11-27, owner, GG-T1305; was "Warden, the fixed lead", GG-T533)

The canon lead (Data/Prose/canon/06-arc.md, Decisions; GG-ONE-LIGHT "Halcyon's key"; GG-PEOPLES): the player is the Commander, a person of Halcyon who died in the Still the night Halcyon fell and was brought back 1,200 years later by the Still itself. The Commander is not a fighter and not a unit: heroes come to them for advice and leadership. Halcyon keyed its machines to its own people's mana, and present-day mana carries only the Lullaby's thinned thread, so Halcyon tech wakes only near the Commander: the Mana Orbs the party fights with (Halcyon's batteries), old doors, an archive for a moment. That is why capable present-day people follow the Commander and why the party can field orbs at all. No one holds all the answers: the Commander's memory is fragmentary (how Halcyon worked, in pieces; not why it fell or what the Somnolith is), and every other character is a present-day person, so knowledge is spread across the cast. No one in the story is a sleeper.

Amended 2026-11-29 (owner, GG-T2201, epic GG-T2198): the Commander did not die and was not brought back 1,200 years later. Halcyon laid the Commander down to sleep on purpose the night it fell, as its hail-mary, and the vault woke them ten thousand years later, the same span the Somnolith has orbited, as the Convergence nears; the Choir's tithe through the tanks only kept them alive. The Commander is a sleeper, the only one. Their memory is still fragmentary, with one exception: the plan, which only they know (gather the warriors of this age, wake the Ward-Engines, bring everyone to one place at one hour; what happens there stays unsaid). The premise in full: §27.3.5.

  • Naming: story text says "the Commander" (article, capitalised role, like the heroes, GG-T565). The player-entered profile name (front door, GG-T1258) is a token a writer may use in direct address only. Text is gender-neutral. No portrait, XCOM-style (owner 2026-11-29, GG-T2189): unlike every hero, the Commander has no look to pick and no face; not an in-world person, never shown on screen, addressed directly as "you" (overrides the female/male portrait pick below).
  • Decisions with a default, awaiting owner (listed in 06-arc.md Decisions): the warden class stays an ordinary present-day recruitable Tank with its kit unchanged; "Manalift" reads as the Somnolith; the Commander has female and male portraits (reversed, GG-T2189: no portrait); in battle the Commander gives advice plus a few orders (spec in the battle feature); the Warden's present-day faction is the Lantern Road.
  • In battle: the Commander gives advice and a few free orders, specified in §9.2.
  • The Warden today (GG-T1420): a lantern-post keeper of the Lantern Road (factions.json lantern) who walks pilgrims through the gorges and takes the blow meant for someone else. The kit below is unchanged; its theme line now reads keeper of the road's light: Reveille and the Lantern wake pilgrims the Choir's hymn put under, not fellow sleepers. Its words (class:warden, the Advice quiz dialogue:talk_quiz_warden, and the hero, codex and Still texts that called the Warden the lead or a sleeper) are seed texts drafted to Prose.
  • Retired: the Warden, the Last Sleeper, as lead, and the "only sleeper" rule.

Historical note: Warden, the fixed lead (2026-11-21, owner, GG-T533). The text below is kept as written. The kit is still the warden class's; the fixed-lead mechanics were removed by GG-T1405 (2026-11-27, see The fixed lead below). The canon lead was the Warden, the Last Sleeper, Halcyon's last guard, asleep in the Still on the night Halcyon fell, who woke 1,200 years too late; the only sleeper in the story (GG-T577, replacing "the First Sleeper" who thawed the others). Story text names the Warden with the article, like every hero ("The Warden" at the start of a sentence, "the Warden" elsewhere; GG-T565, replacing the earlier bare-name rule); the class id and assets stay warden. A class of its own, separate from the Knight (the Knight is unchanged). The owner's female portrait ships (Portraits/warden.png, 1024 canvas with Figure and Thumbnail); the male variant ships with GG-T532 (below).

  • Class (warden, Tank, Speed 11, home tree Guardian, Martial weapons, Heavy armor). Stats sit in the tank band (16/18/10/11/18/8/10/11: one Strength moved to Wisdom). Theme: guardian of sleepers, keeper of light. Where the Knight swaps into danger and the Paladin wards the whole party, Warden takes the blow for one comrade and protects the party's light against the blanking-style statuses (the Lullaby's [Asleep], the Hush's [Silenced]).
  • Bar (DefaultLoadout): Taunt, Reveille, X-Potion, Stand Guard, Lantern of the Still. A new Warden knows Taunt and Stand Guard (Progression.StarterKit); Reveille and the Lantern are bought from the trainer or learned in the tree, like every kit move (GG-T388).
    • Stand Guard (warden_stand_guard, signature): a Skill, cooldown 3, on one ally: they are [Guarded] for 2 turns.
    • Reveille (warden_reveille): a Skill, cooldown 3, on one ally: strips every debuff ([Asleep] and [Silenced] included) and hastens their turn icon 0.15u. The timeline move: a sleeper woken and brought forward.
    • Lantern of the Still (warden_lantern): a Skill, cooldown 5, every ally within 2 tiles (Diamond 2, centred on Warden): every debuff stripped, then [Ward]. Cleansing, plus the Paladin's Bulwark in a radius rather than the whole party.
    • Kit also holds Shield Bash, Shove, Antidote and Hands of Mercy (never Sleep or Silence: Warden doesn't put people under), and Anchor Stance (warden_anchorstance, GG-T882, §7): Rooted and Heavy until its next action, the allies beside it braced against every foe's shove, hook and swap and the anchor's heave.
  • Passives: Full Light (warden_full_light, Always Immunity to sleep and silenced: a sleeper's light is wholly their own, so the Lullaby and the Hush don't take) and Last Watch (warden_last_watch, Reactive: an ally falls, Warden gains [Taunting] and draws every foe).
  • Support Reveille: Haste 0.75 s on every ally along the chain, reach 2 (the Dervish's band), so backing a pincer brings the party's next turns forward.
  • [Guarded] (engine, small: BuffDef.Intercepts, BuffInstance.SourceId, BattleConfig.GuardReach = 2): a buff that remembers who applied it. In BattleRunner.Damage, the single damage choke-point, a foe's blow or hostile ability that lands on a [Guarded] unit is taken by its guardian instead, when the guardian is alive, not immobile (asleep, frozen), on the same team and within 2 tiles (Manhattan); the guardian's own reductions ([Taunting], [Ward], armor) apply, the buff is spent ("intercepted"), and the float reads "Guarded!". Source-less damage (a poison tick, a blast, Essence) and misses are never guarded. Any status or movement the blow carried still lands on the original target: the guard takes the damage only. Validated: an Intercepts buff must be a Buff. Status icon, VFX style (cyan, the colour of mana) and glossary [Guarded].
  • The fixed lead: retired 2026-11-27 (GG-T1405). Progression.LeadClass and Progression.IsLead are gone; the Warden is an ordinary hero:
    • New game: the starting party is the three heroes picked at character select (§25.15), in pick order, with no slot held for anyone; the 2-arg Progression.NewGame uses StartingRoster = Knight, Barbarian, Cleric (Tank, Striker, Healer). The hint reads "Pick 3 to set out with…" and no tile is pre-locked.
    • Benching: Party.Toggle may move anyone to the reserve, the Warden included; the only refusal left is the last member ("Someone has to go").
    • Recruit pools: the Warden is in the Summon Circle's gold pool (Acquire Summon, GG-T1597; was summon.json), and Summon.StoryPick skips the gold pool and guests by Acquire.
    • Old saves (SaveMigrations.ReleaseLead, on every load, replacing EnsureLead): a GG-T533 save keeps its Warden in the roster as an ordinary hero who can now sit in the reserve; the migration only tidies the party the old rule shuffled (each member once, each one a roster hero, no more than the cap of 6, extras step back to the reserve, no one leaves the roster). Idempotent, never throws.
    • Tutorial: the Roles & Taunt lesson focuses the party's first Tank (Lesson.FocusRole) instead of the warden class.
    • Was (GG-T533):
      • New game: Progression.NewGame always puts Warden first in the roster and the party, whatever party it is given; StartingRoster is Warden, Barbarian, Cleric (Tank, Striker, Healer). Character select (§25.15) opens with Warden already locked into the first slot of the strip ("Your lead: always in the party"); the hint reads "Warden leads. Pick 2 more…", so the player still picks the other two of the starting three.
      • Locked in: Party.Toggle refuses to move Warden to the reserve ("Warden leads the party").
      • In no recruit pool: Wanderers.Pool (so the Diamond draw too) and Summon.StoryPick skip the lead; the Summon Circle's summon.json pool, guests, recruitables and mercenaries don't list them.
      • Old saves (SaveMigrations.EnsureLead, on every load after DropRetiredHeroes): a save without Warden gets them the way a summon joins (Summon.Join: the roster's average experience, trained to that level), then Warden moves to the front of the party; if that makes the party more than the cap of 6, the last member steps back to the reserve (nobody leaves the roster). Idempotent, wrapped so a bad save never throws; a content set without the class is left alone.
  • Text: the class description and lore are seed texts in Content/Text/descriptions.json (class:warden) and the glossary entry in Content/Text/glossary.json (glossary:guarded), with drafts for Prose (prose_text.upsert_seed); story text is the Prose engine's to author.
  • Amended 2026-11-21 (GG-T532): the male Warden ships too (Portraits/warden_male.png, MaleFigure/MaleThumbnail in classes.json), the first class with both versions (§25.11.2.3). A new game asks the picked heroes' looks right after the party pick (GG-T1405: there is no locked Warden any more).

25.11.2.3 Hero variants: female or male, picked on joining (added 2026-11-21, owner, GG-T532)

Owner: "eventually I want to generate male counterparts for all the character classes in the game so you get one or the other, they randomly show up but when they finally join your party you get to choose the gender, same with summoning - if your diamond cost lands on a character, you get to pick male or female variant; no change to story or mechanics makes everything equal."

  • Looks only. A hero's variant changes the art and nothing else: same class, stats, kit, tree, support, story beats and text. Heroes stay named by role with the article, "the Cleric" (§25.11.2.2), and hero-facing text never assumes a gender (see the text rule below).
  • The art. The female art is the class's Portrait file (acolyte-female-00.png, every class has it); the male art is its MalePortrait file (acolyte-male-00.png), the same 1024 canvas rule (§12.1.2) and naming (§12.1.3). A class may carry MaleFigure (written by GridGame.Studio/tools/import_art.py when <classId>_male is imported) and MaleThumbnail (framed by hand); each falls back to the class's own Figure/Thumbnail, and ContentLoader.Validate checks them when set. Most classes have no male art yet (GG-T535 generates it); everything below works with partial art.
  • Save (v14). HeroSave.Variant (HeroVariant Female, the default, or Male; serialized by name) and HeroSave.VariantPending. Progression.NewHero sets VariantPending, so every way a hero joins waits for the pick: new game, story JoinHero/RecruitHero, the Summon Circle (gold), the Diamond draw, a wanderer won over, a freed guest, a mercenary, a quest reward (and, until GG-T1405, the Warden EnsureLead gave an old save). Migration v13 → v14: every hero already in the roster is Female with nothing pending; idempotent, never throws; an unknown variant value reads Female on any load. Domesticated monsters have no variants.
  • One resolver (App/Services/Art.cs). Art.Portrait(classId) reads the version through HeroLooks.Of(classId): an owned hero's Variant, else a look the current battle gave an unowned hero, else Female; then the male art if it exists, else the female art. Every portrait, thumbnail (Ui.PortraitThumb frames with Art.ThumbnailFor, the male framing on male art), figure (Art.PortraitFigure, FigureSize, FigureNativeHeight: a <id>_male texture uses its class's MaleFigure), cut-in, dialogue speaker, card, level-up and death dissolve goes through it, so no view knows about variants. Art.Portrait(classId, variant) / Art.PortraitFigure(classId, variant) draw one version explicitly (the picker). Art.HasMaleArt(classId) is cached.
  • The picker (App/UI/VariantPicker.cs). A dimmed veil with "<Hero> joins you!", "Choose a look. Same skills, same story." and the two figures side by side, Female left and Male right, each a whole-card tap target with its label under it; the pick pops the card and fades the veil (law 5: a cue on opening, ui.confirm on the pick). VariantPicker.ShowPending(then) asks every waiting hero in join order; a class with no male art is skipped silently and set Female. It opens: after the new-game party pick (before the prologue, the locked Warden included); after the Diamond draw's reveal and a gold summon's arrival; and on the router's hook whenever Camp, the results screen or a Camp page (Summon Circle, Mercenaries, Quests, Party, Status, Bounties) comes up with someone waiting (story joins, wanderers, mercenaries, quests). Never over a battle, a story scene or a crawl. Camp's coach marks wait while it is up.
  • Changing it later. The hero screen's Status tab shows Change look under the portrait for a class with male art: the same picker with the current look marked in gold and a Cancel.
  • Wanderers on the board (§25.11.2) show either version at random (seeded by the battle) when the class has male art (HeroLooks.Show, cleared at each battle start); the talk after the battle shows the same look. Joining still asks the player.
  • Automation. Bots, -demo, Test Mode, -autobattle and harness runs don't stop to ask (waiting heroes become Female) unless the run passes -variants (as the Rested gate's -rested). The state dump's save.variants maps each hero to Female/Male ("?" while pending) and save.variantPicker says whether it is up; tools/harness.py variants drives new game → the Warden's picker → Male → the male Warden at Camp → Change look → Cancel, recorded.
  • Text rule. Hero-facing text (ability descriptions, class cards, banners, seed text) refers to a hero by role or as they/them, never he/she. GG-T532 fixed the local seed text (the Shieldguard's Valkyrie, the Panda Brawler's Slam, the Herald's Lifegift descriptions, the Herald's card, the wanderer banners). Prose-owned class descriptions that still say she/her (Herald, Manasmith, Hex Stalker, Monster Tamer, Tactician) are listed on GG-T532 for Prose; enemies and Camp NPCs keep their own pronouns.
  • Neutral class names (owner 2026-11-21, GG-T543). Since every class has both looks, no class name is gendered. Display names only; ids, portrait files, ability ids and Prose keys are unchanged so saves and art keep working: shieldmaiden is the Shieldguard (the owner's "Shieldbearer" is already the Bulwark Shieldbearer enemy), pandagirl the Panda Brawler, blackwitch the Hexer, whitewitch the Lightweaver, sister the Acolyte. Sister Ilsabet (the Medic Wagon's crew NPC) keeps her name.
  • (Tests: Hero_variants_new_heroes_wait_old_saves_are_female_and_choosing_sets_it; PortraitCanvasTests checks a MaleFigure against its _male PNG's alpha bounds.)

25.11.3 Taming and domestication (added 2026-11-06, owner, GG-T303)

Owner: a Monster Tamer can tame an enemy monster so it fights for the party for a few turns, "like Umaro the yeti berserker in FF VI": it acts on its own, keeps its own timeline icon and AI, and may run straight through a pincer you were setting up. Fight beside it long enough and it asks to join for good.

  • The Tame effect (AbilityDef.Tame = base chance, TameTurns = duration in the monster's own turns) is one ability field, so any source plugs in: the Monster Tamer's Tame (Skill, 0.6, 4 turns, cooldown 2) and the Dog Whistle consumable (dog_whistle_call, 0.35, 2 turns). Validated: a Tame is a Skill or Item ability that picks one foe (SingleActor, PickActor, EnemyOnly), 0 < Tame <= 1, TameTurns >= 1.
  • Who (Taming.WhyNot): a living enemy with no society: not Sentient (so frog folk, soldiers, hags never), not a boss (tag Boss, boss phases or a rule-break), not remains, an egg or a corpse, one tile and not a snake, not tagged Untameable. Today that is the bats, wolves, werewolf, yeti, flying monkey, vulture, scorpion, slimes, sandmaw, tree golems, skelepedes, the mindless undead, cyber-zombies and the ghost. TargetResolver.IsValidPick offers only these, so a refused pick spends nothing.
  • Odds (Taming.Chance, one Rng draw): base x (1.5 - the monster's HP fraction, so x0.5 fresh to x1.5 nearly dead) x level factor (1 + 0.05 per level the user is above it, x0.5..x1.5) + 0.4% per point of the user's Luck and of its Wisdom, clamped to 5-95%. A failure is a TameFailedEvent ("Resisted (n%)").
  • Tamed (TamedEvent): the unit flips to Team.Hero with Unit.Tamed where it stands; any charge it was casting fizzles (CastCancelledEvent "tamed"); it keeps (or gets) its own turn icon. It is independent (Unit.IsIndependent): never commanded (no drag, no bar; CanMove and GetSlotStatus refuse; not one of HeroesLeftToAct). Its own turn doesn't end the party's window (only enemy turns do, §2.0), its buffs tick on its own turns, and party tempo doesn't move its icon. Enemies treat it as a hero: they target it and pincer it. A tamed beast alone doesn't keep the party in the fight: when every commanded hero is down, it is a defeat.
  • Its turn (BattleRunner.RunAllyTurn): start-of-turn triggers. Amended 2026-11-06 (GG-T306): first it asks the shared pincer planner for a walk that completes a hero pincer, sets up an end a hero can close, or slots it into a chain (§14.1.3), swapping through friend and foe. Otherwise it charges the nearest foe on the shortest cardinal path through anyone one tile big. Friend or foe swap into the tile it leaves, exactly like a hero drag, up to its MoveRange. It is deliberately not clever about your setup. It still acts on its own, so it can disrupt your setup. Then it closes any hero pincer it stands at the end of (it carries the Pincer keyword, §1.3), else hits the weakest adjacent foe, else shoots one in range. Its own class Support backs the party's pincers (§1.2.3). End-of-turn triggers and buff ticks follow.
  • Bond (Unit.Bond/BondNeeded, BondGrewEvent): each own turn fought while tamed adds 1. BondNeeded is the class's TameBond (yeti and werewolf 6), else 3 + level/5. While the bond isn't full, each turn also spends one tame turn; at 0 it breaks free (TameEndedEvent): back on Team.Enemy where it stands, its bond kept for a re-tame. A full bond ("Bonded!") stops the countdown: it stays for the rest of the battle.
  • Domestication (Meta/Domestication.cs): a tamed monster still standing at a victory with a full bond asks to join (BattleReport.TameOffers). The results screen shows "X wants to join you!" with Accept and Decline. Accepted, it becomes a roster member (HeroSave.Domesticated, keyed by its enemy class, so one of each) at its battle level: in the party if a slot is free, else the reserve. In battle it spawns with the party as an independent ally (HeroSpec.Domesticated) with the Pincer keyword. Drawbacks: no gear (Equipment.Equip refuses), no learned skills or Tomes, no skill tree (an enemy class has no HomeTree), half XP (Domestication.XpFactor) and no growth past Lv 30 (LevelCap). Camp shows a TAMED badge in place of a role.
  • Look: a tamed or domesticated unit wears a chartreuse keyline and a TAMED tag on the board, and its timeline icon has the same Palette.Tamed border. A "Tamed!" float with a power-up cue; "Bond n/m" each turn; "Bonded!" with a war-cry cue; "Breaks free!" with the debuff cue. The InspectCard shows a bond meter and the turns left.
  • Getting them: the Monster Tamer (Support, Wild Child's portrait, home tree Alchemist) is in the Summon Circle pool. Kit: Tame, Feral Howl, Alpha's Challenge, Regen, Quicken, Antidote. Passives: Pack Leader (after it backs a pincer, a fair chance to turn the attacker it backed [Empowered]) and Beast Sense (a beast that attacks it directly is pushed back 1 s). Support: Whip Crack, Pushback 0.5 s. The Dog Whistle (150 G, stack 3) is sold by the Merchant.
  • Not in scope: Monster Meat transformation (GG-T304). The bot never tames yet (no score for it).
  • (Tests: TamingTests.)

25.12 Caravan upgrades (added 2026-10-10, owner direction: "upgrades … a sense of progression")

Hidden at release (GG-T392): Features.Caravan; see §8.1.

The caravan is the party's moving base — a Choir supply caravan the crew stole on tithe day (STORY.md §4), and the shops between battles (US-348 framing; story text §27.1). caravan.json defines upgrades bought with gold at Camp → Caravan (CaravanUpgrades.Buy, levels in SaveData.Caravan):

Upgrade Levels Effect
Mana Casks 400 / 900 / 1800 every battle starts with +100 / +200 / +300 mana points in the party pool (BattleSetup.StartMana, level Value in caravan.json)
Medic Wagon 600 / 1400 after each battle won on the road, the wagon medic heals 25 % / 40 % of each standing party hero's missing HP, rounded up (MedicWagon.Patch, shown on the results; GG-T1790, replaced "the inn opens on the road at ×2 / ×1.5 price")
Armory Wagon 350 / 800 / 1500 repairs −20 / −35 / −50 % (Repair.Cost(c, s, …))
Strongbox 500 / 1200 expedition completion bonus +25 / +50 %
Scouts 300 Adventure lists each battle's foes
Enchanter's Wagon 700 / 1600 armor enchants −20 / −40 % gold (ArmorEnchanting.Gold(c, s, e); never below 1; the guided first rune stays free) — GG-T75
Quartermaster's Ledger 450 / 1100 salvage (bag, equipped and Broken) returns +25 / +50 % of each material, rounded half up (CaravanUpgrades.LedgerYield) — GG-T75
Blacksmith's Forge (facility) 400 / 1500 / 3000 Iron / Steel / Mythril Forge: forge Rare / Epic / Legendary results (§25.12.2) — GG-T432
Alchemist's Still (facility) 300 / 1200 Glass / Silver Alembic: brew Uncommon / Rare-and-up results (§25.12.2) — GG-T432

(Test: Caravan_upgrades_cost_gold_and_change_how_expeditions_play.)

25.12.2 Facility upgrades gate material tiers (GG-T432)

Owner 2026-11-19: "caravan upgrades meaning you have to unlock the shops abilities to increase the value of things that can be built there, ya thats a necessary gold sink so copper, iron, steel, increasing quality of materials means you need better facilities for Blacksmith, Alchemist, etc".

Each crafting station has a facility, a caravan upgrade in caravan.json with a BaseName, a BaseRarity and, per level, a Name and the rarest result Rarity it can make (Meta.Facilities; levels in SaveData.Caravan under forge / alembic; ContentLoader.Validate checks only those two ids are facilities and that each level's rarity rises). A recipe needs the first facility level whose rarity covers its result's rarity (Facilities.Required); the existing rarities are the material tiers, so no new items were added:

Station Base (free) Level 1 Level 2 Level 3
Blacksmith (Forge + Upgrade) Copper Forge — up to Uncommon (225 recipes) Iron Forge 400 G — Rare (111) Steel Forge 1,500 G — Epic (71) Mythril Forge 3,000 G — Legendary (39)
Alchemist (Brew) Clay Still — Common (11) Glass Alembic 300 G — Uncommon (11) Silver Alembic 1,200 G — Rare and up (4) —

The Enchantress has no facility (her enchants are gated by the Alchemist's skill tier only, §25.3.4). Prices against measured stage pay (≈210–270 G a stage at Lv 1–6, 400–600 G from Lv 9, ≈9,900 G for the main campaign): the first rung is one or two early stages, Mythril about six late stages, the whole ladder 6,400 G. A facility is bought at its own station (a Build row atop the recipe list, and a Build button on any recipe it locks: a coin cue, then the forge's clang or the still's glug) or as a card on the Caravan screen; buying one at the station doesn't open the Caravan row early (CampUnlocks.CaravanOpen ignores facilities). Locked recipes show "🔒 Iron Forge" in the list and "Needs Iron Forge (you have the Copper Forge)" in the detail, never hidden; Crafting.Craft refuses with "Needs Iron Forge" and consumes nothing. Station XP (§24.6.1) stays the separate skill axis on Tier; a recipe needs both (Crafting.CanMake). The guided first forge, first armor and first brew pick only recipes the base facility allows (all Common). Save v10 grandfathers older saves: one facility level per station tier above Apprentice (Journeyman → Iron Forge / Glass Alembic, Master → Steel Forge / Silver Alembic), never lowering a bought one. The bot builds facilities too (§25.3.3). (Tests: FacilityTests.)

25.12.1 The caravan crew and their barks (GG-T75, added 2026-11-02, owner direction 2026-10-16)

Each wagon has a crew member (Crew, CrewRole in caravan.json), shown on its Caravan card ("Crew: Brannoc, cask-keeper"): Brannoc the cask-keeper (Mana Casks), Sister Ilsabet the wagon medic (Medic Wagon), Old Hask the wagon farrier (Armory Wagon), Penny Tallow the purser (Strongbox), Wren and Dace the outriders (Scouts), Lio the rune apprentice (Enchanter's Wagon) and Osk the quartermaster (Quartermaster's Ledger). They are not Camp NPCs (§25.0.1): they have no station, no Talk and no join scene.

Barks: each crew member has a few one-line Barks. The Caravan screen's header and, once the Caravan station is open (CampUnlocks.CaravanOpen), a small "Around the wagons" window under Camp's gold/time panel each show one line with its speaker (CaravanUpgrades.Bark(c, s, turn)). The line changes every time the screen rebuilds. Lines come from the crews whose wagon this save has upgraded, or from every crew before the first upgrade. A bark is flavor text, not dialogue (§27): no portrait scene, no branching, no choices, no effects, no flags, nothing to tap. It is not an overworld either (§28).

25.14 The party of six — was five (added 2026-10-11, owner: "add a fourth and fifth hero onto the team … a 5 player team seems about right for max")

MaxPartySize = 5; a new game's five are picked on CharacterSelectScreen (§25.15) rather than fixed. Amended 2026-10-19 (owner, GG-T118): the cap stays 5 but a new game starts with three; the other two join at story beats (§25.17). Recruits and rescued guests wait in reserve when the party is full. Camp shows the five in a two-column grid; class blurbs render their [keywords] as highlights.

Amended 2026-11-06 (owner, GG-T291): the cap is six — "two attackers and two supporters for each attacker." Progression.MaxPartySize = 6 (StartingPartySize stays 3): one pincer's two attackers, each with two supporters chained to it (§1.2.3). The slots fill at the existing story beats (§25.17): the 4th after Tithe Moors I, the 5th at Shardfall, the 6th at Anchor Wastes; the Halcyon healer (and any later recruit or rescued guest) waits in reserve. Six heroes spawn on the stage's DefaultHeroStarts in rows 6–7, below the enemy band, on every campaign stage, and share one item bag (§24, GG-T285). Camp shows six in its two-column grid (three rows); the Items "use on" row wraps a party of six into equal thirds. (Tests: PartyCapTests — The_cap_is_six_and_the_start_stays_three, A_seventh_hero_waits_in_reserve, Six_heroes_spawn_on_free_tiles_below_the_enemy_band_on_every_campaign_stage, Six_heroes_share_one_bag; StoryRecruitTests.)

25.15 Character select (added 2026-10-11, owner: "unlock all character and select a random cross section of heros, make character selection like a fighting came where you have a grid at the bottom then you select a tile then the full artwork appears on top and you lock in that character")

New Game → slot now pushes CharacterSelectScreen instead of calling Progression.NewGame with the fixed five directly. Every hero-team class in content (62, not just StartingRoster) is an open tile in a scrollable grid at the bottom — tiles are 164px with an even 10px margin on all sides and the row centred (Justify.Center), so the gutter reads the same left, right and between tiles regardless of how many columns fit or the window's width. Tapping a tile previews it — full Art.Portrait art, name, role badge, description — in a reveal panel above, framed in that role's colour, which slams into place (oversized and tilted, a Tween.Back overshoot down to rest plus a small landing shake and an impact cue) rather than popping in cold, matching the cut-ins' bombastic feel (bible law: no single-frame swaps). Tapping the same tile again (or "Lock In") commits it to the party strip at the top. Amended 2026-10-19 (GG-T118): three locks (Progression.StartingPartySize; a hint under the header says more heroes join along the road), not five (§25.17); the last lock → Progression.NewGame(c, name, party) (an overload taking the chosen roster; the old 2-arg form still exists for automation/tests and defaults to StartingRoster). Amended 2026-11-27 (GG-T1405): no tile is pre-locked; the GG-T533 lead (Warden locked into the first slot, "Pick 2 more") is retired, so the player picks all three and the party sets out in pick order. -demo drives the identical screen itself (auto: true): it previews a random not-yet-picked class, pauses, locks it in, once per starting hero, so every attract-mode run shows a different squad. (Verified: tools/harness.py launch, screenshot of the live grid showing even gutters, and a frame-by-frame record capture of the reveal panel mid-slam — tilted/oversized mid-flight, not instant.)

25.16 Diagonal slip (added 2026-10-11, owner: Terra Battle's fast-swipe diagonal move — "if you moved quickly and accurately you could move diagonally between two squares… it takes skill… allow the game to skip the collision detection")

Player hero drags only (never AI — enemies/bots use the separate StepEnemy/EnemyPlanner path and never submit a diagonal step). Gated by BattleConfig.DiagonalSlipEnabled (mutable, default on; -noDiagonalSlip at the command line turns it off). A diagonal step is legal, destination tile fully free (no unit, no movable — never a swap, never onto anything: a glide into open space, same "two units never share a tile" invariant §(tile-conflict safety net) protects), with no softened "at most one corner" rule — the two flanking tiles' occupancy is never consulted, matching the owner's framing of the original as skipping a check rather than a designed exception. WalkPath (BattleRunner.Combat.cs, the single path both the committed move and the live drag-ghost preview run through) accepts Coord.IsDiagonalNeighbor alongside the existing cardinal check when the flag is on. The client (BattleScreen.Input.ExtendPath) only ever offers a diagonal candidate when the raw drag gesture between polled pointer-move frames is both fast (> Tile×6 px/s) and close to a true 45° (within 12°) — a careful/slow drag always still resolves as today's safe two-cardinal-step route, so the skill gate is pointer-timing, not a toggle the player can rely on deliberately. (Tests: Diagonal_is_not_a_pincer_and_diagonal_step_is_refused_when_slip_is_disabled, Diagonal_slip_glides_onto_a_free_tile_when_enabled, Diagonal_slip_is_still_refused_onto_an_occupied_tile_even_when_enabled. The engine contract is machine-verified; the client's speed/angle gesture gate is pointer-timing and was confirmed by hand, not by the automation harness — its synthetic drag endpoint deliberately smooths input into ~30px sub-steps for clean recordings, which never reproduces a real fast flick, so a drag through it always falls back to the safe two-step route exactly as before, with zero regression.)

25.17 Small start, story recruits (GG-T118)

Owner 2026-10-19: "New Game picks a small party (2-3 heroes) instead of 5; further heroes join at story beats through dialogue." The party cap stays 5 (§25.14). Amended 2026-11-06 (owner, GG-T291): the cap is 6, so the Anchor Wastes Knight now fills the sixth slot instead of waiting in reserve; only the Halcyon healer (Sage) goes to the reserve.

  • Start: Progression.StartingPartySize = 3. Character select locks in three (§25.15); the 2-arg Progression.NewGame (automation, tests, Test Mode) uses StartingRoster = Paladin, Barbarian, Cleric (Tank, Striker, Healer). -demo auto-picks three. Amended 2026-11-21 (GG-T533): Warden, the fixed lead, is always one of the three (locked into the first slot; the player picks two), and StartingRoster is Warden, Barbarian, Cleric. Amended 2026-11-27 (GG-T1405): the fixed lead is retired: the starting party is the three picks, StartingRoster is Knight, Barbarian, Cleric, anyone can be benched and the Warden joins the recruit pools like any hero (§25.11.2.2).
  • Story recruits: a dialogue effect JoinHero (§27.1) — Id (preferred class) and/or Role. Summon.StoryPick resolves it so it always brings someone new: the named class if the player doesn't have it, else the first unowned hero of that Role, else one of a role the roster lacks (Healer, Tank, Mage, Support, Striker, Ranged), else anyone unowned (none left → no-op). The fallbacks skip the Summon Circle's pool and every stage guest, so those stay worth having; name order makes it deterministic, and the dialogue's "$recruit" speaker is bound to the same pick when it opens, so the hero who speaks is the hero who joins. The recruit arrives free at the roster's average experience (Summon.Join, like a Summon Circle recruit) and takes an open party slot, else waits in reserve. Separate from RecruitHero, which hires exactly one class and does nothing if it's owned.
  • The beats (dialogues.json, real narrative as of GG-T120): after Tithe Moors I (before the next launch) — a Mage (Red Mage); at the start of Shardfall — a Support (Engineer), making five; at the start of Anchor Wastes — a Tank (Knight), making six (GG-T291); at the start of Halcyon — a Healer (Sage), who goes to the reserve because the party is full (before GG-T291 the last two did). Every path through each beat ends in the join (the join is on the last node, not a choice). They sit on top of the guest allies (§25.11) and the Summon Circle (§25.10).
  • Nobody is lost for good: nothing in the dialogue vocabulary removes a hero.
  • Founding (GG-T1594): a new campaign plays the Opening crawl, then the due Founding scene (DialogueRunner.PendingFounding, its "$party:N" speakers the three picks, whose looks the VariantPicker has already asked), then Camp (StoryBeats.NewCampaign). No Founding scene due (or Test Mode) goes straight to Camp.
  • Bots: Test Mode and the balance sim never show story, but play every pending beat headlessly before a stage (DialogueRunner.PlayPendingBeatsHeadless, first choice) so the recruits still join; the Test Mode cycle line reports them as story: ….
  • Balance (BalanceReport.Campaign_pacing_table, 4 seeds, up to 4 attempts a stage): the default rows now start with the trio and play story beats. Greedy finishes 4/4 (as before); greedy+camp 3/4 (was 2/4); Tithe Moors II onward plays like the five-hero start because the fourth hero arrives before it and the fifth at Shardfall. The only early stage the trio found harder was Tithe Moors I for the casual bot (30% of attempts vs 66% with five), so it was lightened (§22.7) and is now 80% with 61% HP left. The table keeps a greedy+camp trio no-story row (GG-T87's trio-start: no story recruits, so the Summon Circle step always has a slot to fill) and a greedy five-start (pre-GG-T118) row as the yardstick.
  • (Tests: StoryRecruitTests — the small start, JoinHero's named/role/missing-role fallbacks, the summon pool and guests left alone, a full party sends the recruit to the reserve, the $recruit face is the joiner, every path through every recruit beat adds exactly one hero, story beats grow the trio to five by Shardfall, recruits arrive at the roster's experience, Test Mode's headless join, JoinHero validation. Harness: python tools/harness.py recruits picks three on the real party select, clears Tithe Moors I and checks the recruit dialogue plays with the joining hero's portrait and the party grows to four; uicheck checks a new game starts with three.)

25.18 Rested and the paywall hooks (GG-T232)

Owner 2026-11-05: "everything costs gold now but eventually there will need to be a 'monitization' angle that lets you recover your 'Rested' points … make everything cost 1g and take 1second to complete; but these would be scaling pay walls in the future". Clarified the same day: the hooks are only summoning, the Diamond lucky craft (GG-T235) and refilling Rested ("until I call it monetize, it's not"); Rested is party-wide energy. Every other price is unchanged. Amended 2026-11-07 (owner, GG-T343): Diamonds now also buy the Summon Circle's random draw (§25.10.2) — still through the Summon hook's timed job (PaywallJob.Diamonds records Diamonds spent instead of gold, refunded if it fizzles); Diamonds are still bought only through the LuckyDiamond hook, and there is still no store. Amended 2026-11-19 (owner /goal, GG-T427): the 1 g / 1 s placeholders are retired for real, tunable gold prices, and Rested gets a second, Diamond-priced refill alongside the gold one, so Diamonds can pay for either a hero (the Diamond summon) or skipping the Rested wait, as the owner asked. Amended 2026-11-20 (owner, GG-T455): Diamonds get an exchange rate and a store (§25.18.1); the LuckyDiamond hook is retired.

  • Paywall hooks (Meta/Paywall.cs): PaywallKind { Summon, LuckyDiamond, RestedRefill }. Paywall.Cost(kind, save) (gold) and Paywall.Duration(kind, save) (seconds) read one tuning table — still the one spot every future rebalance touches, now holding first-pass real numbers instead of placeholders: Paywall.SummonGoldPrice 800 (a deliberate, chosen-hero recruit — a permanent roster asset, priced above a blind draw), Paywall.DiamondGoldPrice 250 (one Diamond at the forge's "Buy Diamond" button — a real choice against spending the same gold on gear) (retired by GG-T455 for the exchange), Paywall.RestedRefillGoldPrice 100 plus RestedRefillGoldPerStage 15 per campaign stage cleared (HighestClearedStage + 1), so a refill stays about half to one stage's measured pay (≈210 g a stage at Lv 1–6, 400–600 g from Lv 9; the main campaign ≈9,900 g in one pass, from the 2026-11-17 polish records) — 100 g at the start, ≈460 g at the campaign's end; a flat 60 g was under 3% of what the 10 launches it buys earn, which made waiting and the Diamond refill pointless. Every job still takes 1 s to land (the ceremony, unchanged). Paywall.Tag prints e.g. "100g · 1s". Amended 2026-11-20 (GG-T519): Paywall.Tag prints the price alone, e.g. "100 G"; a bare "· 1s" meant nothing to a new player. A wait of Paywall.NotableWaitSeconds (5 s) or more is named, " · ready in 30s" / " · ready in 2 min" / " · ready in 3 h" (Paywall.WaitSuffix, also on the Summon Circle's draw button); a shorter one only plays out as the job's progress bar. There is still no real-money store.
  • Timed jobs: Paywall.Start(save, kind, arg, now, out job) takes the gold and records a PaywallJob (kind, arg, StartedUtc, Seconds, Paid) in SaveData.Jobs — one per kind at a time — so a long future job survives a restart. Paywall.Progress/Ready, then Paywall.Finish(c, save, job, now) lands the kind's effect (Summon → the hero arrives; RestedRefill → the pool fills; LuckyDiamond → one Diamond for the lucky craft LuckyDiamond → retired by GG-T455: Paywall.Start refuses it and an old save's pending job lands as a full gold refund of what it paid) and removes the job; it refuses a job still running. Paywall.FinishReady lands every job whose time is up — Camp calls it on build unless one is playing on screen.
  • On screen (App/UI/PaywallUi.cs): TimedJobView.Begin(now => (result, job), label, onDone) runs the paying start (a refusal toasts why), persists, then TimedJobView.Run(job, label, onDone) shows a modal (paywall-job) whose bar (paywall-gauge) fills over the job's real duration with a countdown, a coin cue (ui.buy) as it starts and ui.confirm as it lands, then toasts the result.
  • Rested (Meta/RestedPool.cs, SaveData.Rested): one party-wide pool, Max 10. Every stage launch — Adventure, Next stage, Retry, the Crucible — spends 1 (StageLauncher/CrucibleLauncher through RestedGate). It comes back 1 point per 10 real minutes (RegenEvery), never above max; a clock that runs backwards restarts the interval. At 0 a launch is refused — "The party is exhausted — no Rested left. Next point in m:ss." — with a Refill Rested — 100 G offer (rising 15 g per stage cleared) that fills the pool and then launches. Camp's side column shows a camp-rested window (points, meter, "+1 in m:ss", the gold rested-refill button, and now a second rested-refill-diamond button — 1 Diamond 25 Diamonds (or 150 G) since GG-T455, paid through DiamondExchange.Pay, for an instant fill with no 1 s job: RestedPool.DiamondRefillPrice/DiamondRefill, GG-T427; short of both currencies it offers the Diamond Store); Adventure rows add "· 1 Rested" and the Crucible screen "Costs 1 Rested".
  • Exempt: Test Mode saves (SaveData.TestMode), and -demo, -testmode, -autobattle and harness (-automation) runs set RestedPool.Unlimited, so bots and automation are never blocked (Camp shows "Unlimited"). A harness run opts in with -rested, or the dev endpoint devrested?points=N&limit=1.
  • (Tests: PaywallRestedTests — each hook's own tunable price, spend and regen, refusal at 0 with the wait, Test Mode exemption, the gold refill job (gold up front, not before its time, fills, one at a time), no gold → refused, the Diamond refill (instant, no job, no gold while Diamonds cover it, the shortfall exchanged from gold; too few Diamonds and gold refused; refused when already rested), a running job surviving a save round trip, summoning through the job at the flat price.)

25.18.1 The Diamond exchange (GG-T455, owner 2026-11-20)

Amended 2026-11-21 (owner, GG-T568): Diamonds became Aetherite Shards; renamed Mana Shards by GG-T675 (2026-11-22). Everything below still holds; only the name the player sees changed: "Diamonds" reads Mana Shards (GG-T1974: one name everywhere, "Shards" is no longer a short form: buttons and counters read "25 Mana Shards (or 150 G)", and ShardText.Short equals ShardText.Name), the Diamond Store is the Mana Shard Store, and the store packs' display titles read "100 Aetherite Shards" … "2,500 Aetherite Shards" (product ids unchanged). Code ids, element names (diamond-*, camp-diamonds), the ui.diamond cue and the save shape keep the old word. See §24.9.1.

Owner: "Like guildwars gold and diamonds need an exchange rate so if something costs diamonds, it can be purchased with gold or with real money, right now lets make it 100 diamonds for $1.00 just to keep it low and honest".

  • The rate (Meta/DiamondExchange.cs, the one tuning spot): DiamondExchange.GoldPerDiamond 6 and DiamondsPerDollar 100, so 100 Diamonds = $1.00 = 600 G — exactly the old one-Diamond gold price, so a gold balance buys what it did before the re-denomination. mat_diamond's MaxStack is 999,999.
  • Prices (re-denominated): the random summon DiamondSummon.Price 100 ($1.00 / 600 G), the instant Rested refill RestedPool.DiamondRefillPrice 25 ($0.25 / 150 G), a lucky craft Crafting.LuckyDiamondCost 50 ($0.50 / 300 G).
  • Paying: every Diamond sink goes through DiamondExchange.Pay(save, price): Diamonds in the bag first, the shortfall converted from gold at the rate; if gold can't cover it either it fails with "Not enough Diamonds: N more, or M G to exchange" and takes nothing. Quote gives the split (Diamonds used, gold used), CanPay the check (with gold kept back for the rest of an action, e.g. a lucky craft's recipe gold). Every Diamond-priced button shows both prices (DiamondExchange.Label: "25 Diamonds (or 150 G)"); short of both, tapping it offers the Diamond Store (DiamondStores.OfferStore).
  • Buying with gold: DiamondExchange.Buy exchanges N×6 G for N Diamonds, instantly (no timed job). It replaces the retired LuckyDiamond paywall job (600 g for one Diamond over 1 s); an old save's pending one is refunded in full.
  • Real money: IDiamondStore (Status, Connected, Purchase(content, save, pack, done)) sells DiamondStore.Packs at the flat rate, no bonus tiers: 100 for $1.00, 500 for $5.00, 1,000 for $10.00, 2,500 for $25.00 (diamonds_100 … diamonds_2500). Purchase answers with a PurchaseResult (Granted, Pending for an order awaiting a parent's approval or a slow payment, Cancelled, Failed, Unavailable); Delivered reports a purchase that finished outside any call (approved later, or left unfinished by a crash), which the App toasts. The App picks the store (DiamondStores.Current, connected at boot): editor and development builds use DevDiamondStore, a test stub that grants the pack at once for free and says so on screen ("Test store (dev build): purchases are free and land at once."). Release builds on Android and iOS use UnityIapDiamondStore (GG-T468, App/Services): Unity IAP 5 (com.unity.purchasing 5.4.4) over Google Play Billing and StoreKit, the four packs as consumables under the same product ids on both stores. The flow is the store's: purchase → OnPurchasePending → grant the Diamonds and write the save → ConfirmPurchase (Google consumes, Apple finishes), so a crash between the grant and the confirm re-delivers the order instead of losing it; unfinished orders are fetched again at every connect. A store that can't connect or fetch the products says "Store unavailable: …" and sells nothing. The adapter is compiled only when the package is present (GG_IAP, from Convergence.App.asmdef's versionDefines), so Meta stays engine-free and the dotnet build never depends on it. Any other release build (desktop, WebGL) uses UnconnectedDiamondStore, which shows the packs but answers every purchase with "Store not connected yet".
  • The purchase ledger (GG-T469, Meta/PurchaseLedger.cs, save v11): SaveData.Purchases.Granted maps every store transaction id already granted (Google's purchase token, Apple's transaction id) to its product, Diamonds, time, store and refund state. PurchaseLedger.Grant pays a transaction exactly once (a re-delivered id answers AlreadyGranted and is just finished again); paid Diamonds ignore the bag's cap (the money was taken). The IAP store grants through it, writes the save with SaveStore.Write and only confirms the order when the write succeeded; a failed write leaves the order unfinished so it comes back. An order that arrives with no save loaded (the title screen) waits and is granted to the first save loaded; one already granted in another slot of the profile is just finished. Pending/deferred: a deferred order (Ask to Buy, Family Link, a cash payment) answers Pending and lands through Delivered when it clears, even on a later launch; ExistingPurchasePending answers Pending too. Failures and cancels grant nothing and say "Nothing was charged". Refunds: PurchaseLedger.Refund takes back only the Diamonds still in the bag (never gold, never below zero, idempotent) and marks the record; Apple's revocation callback (product only) refunds that product's latest unrefunded purchase (RefundLatest). Google reports refunds of consumed purchases only to a server (Voided Purchases API), so an Android refund after delivery is not clawed back. Restore: finished consumables can't be restored on either store; unfinished orders are fetched again at every connect, and on iOS a Restore purchases row (diamond-restore) asks StoreKit to re-send them. The save itself (with its Diamonds and ledger) comes back on reinstall through the platform's device backup (Android Auto Backup, iCloud backup). A v10 save migrates to an empty ledger; an older build refuses a v11 save rather than drop the ledger.
  • The account wallet (GG-T567, model built 2026-11-23 by GG-T620, Meta/AccountWallet.cs): Diamonds belong to the store login, not the save. AccountWallet holds one Diamond balance and one purchase ledger (Granted, the same PurchaseRecords) per store login on the device, shared by every profile and slot. AccountWalletStore keeps it at Profiles/.account/wallet-<key>.json (the dot folder is never listed as a profile); the key is the first 16 hex digits of the login's SHA-256, or device until the store names a login, so each phone or login has its own wallet and no account name reaches the disk. Writes are atomic with a rolling .bak, and a damaged file loads the backup instead of an empty wallet. AccountWallets has the ledger's rules over it: Grant once per transaction (paid Diamonds ignore caps), Add, Spend (all or nothing, never overdraws), Refund/RefundLatest (only what's left, idempotent) and TotalBought. Moving saves in (GG-T621, Meta/WalletMigration.cs): WalletMigration.Migrate carries a save's bag Diamonds and its purchase ledger into the wallet, once. A save is known by its identity, save-<CreatedUtc ticks in hex>, which every copy of it shares (another slot or profile, a .bak, a cloud copy, an export); the wallet's Migrated map keeps, per identity, the most Diamonds any copy held when carried in, so a later copy or an older backup adds only what it holds beyond that max and nothing is paid twice. A moved save gets the flag wallet-moved:<Diamonds drained>:<wallet key> (a flag, so no save-version bump) and its bag is emptied of Diamonds; a flagged save is never carried again. Ledger records the wallet lacks are merged in without re-paying (their Diamonds were already in the bag), and a refund the save saw marks the wallet's copy refunded with what was clawed back. The save keeps its own ledger untouched for rollback. Diamonds found in the bag of an already-moved save are stray: reported (Stray), never carried, since carrying them could pay a rolled-back copy twice. WalletMigration.Run writes the wallet first and the save after; a failed wallet write puts the save back (Undo) and it is tried again on the next load, and a crash between the two writes adds nothing on the rerun. Wired (GG-T702): at boot, before the real-money store connects (GameApp.OpenWallet, then DiamondStores.Warm), the device's wallet is bound as DiamondExchange.Wallet and every slot of every profile is moved into it (a boot move keeps the save's UpdatedUtc, so the most recent slot doesn't change); every load (Continue, Load Game, a chosen cloud copy) and every new game runs it again (GameApp.MoveToWallet). From then on a moved save's Diamonds are the wallet's: DiamondExchange.Have/Pay/Buy/Grant, DustEconomy.Refine, the fizzled-summon refund (Paywall.Finish), the Rested refill, the Diamond draw and the lucky craft all read and write the wallet through DiamondExchange.Add (no bag cap in the wallet), and the Camp/Hub/Shard Store counters and the automation state show its balance. A save that isn't moved (no wallet bound: tests, sims, the headless/demo/test sessions) keeps using its bag. A wallet change marks it dirty and GameApp.Persist writes the wallet before the save, skipping the save write when the wallet's failed. The IAP store grants paid orders into the wallet (AccountWallets.Grant, no save needs to be loaded), writes it and only then finishes the order; Apple's revocation takes its refund out of the wallet (RefundLatest). Cross-profile refunds against the account ledger: GG-T622. (Tests: AccountWalletTests, WalletMigrationTests.)
  • The catalogue and wallet ownership (GG-T1447, GG-T1564, Meta/StoreCatalog.cs): every real-money product is a StoreProduct in StoreCatalog.Products: its store id, ProductType (Consumable buys again and again, NonConsumable is owned once and restores on a new device), list price in US cents, the Shards and Summon Tickets it pays into the wallet, the cosmetic ids it unlocks and an AccountLimit (0 is none; a non-consumable is always 1). The Shard packs come in from DiamondStore.Packs unchanged (consumable, no limit); beside them are the starter pack (starter_pack, $2.99: 300 Shards, 5 Tickets and frame_starter, consumable, once per account), the season 1 premium pass (season_pass_s1, $4.99, non-consumable) and three non-consumable cosmetic bundles (cosmetic_frames_1, cosmetic_themes_1, cosmetic_backdrops_1); offer, pass and bundle prices are placeholders until the owner sets them (GG-T1445). StoreCatalog.Bought counts a wallet's unrefunded purchases of a product, Remaining what it may still buy (int.MaxValue with no limit, 0 once a non-consumable is owned) and CanBuy whether that is above 0. The wallet keeps Tickets, Owned (non-consumable ids) and Cosmetics beside its Diamonds (StoreCatalog.Owns/OwnsCosmetic). AccountWallets.Grant pays a transaction from its catalogue product (an unknown id is UnknownProduct), past any cap or account limit since the money was taken; its PurchaseRecord notes the Tickets paid, the cosmetics this transaction actually added (one already owned is not counted) and whether it took ownership. A non-consumable the wallet already owns, delivered again under a new transaction id (a restore), is recorded, so it is never granted later, but grants nothing and answers AlreadyGranted. Refund takes back the Diamonds and Tickets still in the wallet (never below zero), only the cosmetics that transaction added and the ownership only if that transaction took it, so refunding a restore changes nothing. The monthly spending limit prices every record from the catalogue (PurchaseLedger.MonthCents), and SpendLimits.Refusal takes a StoreProduct as well as a DiamondPack. (Tests: StoreCatalogTests.)
  • Buying any catalogue product (GG-T1574, Meta/DiamondExchange.cs, App/Services/UnityIapDiamondStore.cs): IDiamondStore.Purchase(content, save, StoreProduct, done) and PriceOf(StoreProduct) sit beside the pack overloads, so the starter pack, the season pass and the cosmetic bundles are bought through the same store. A purchase is refused first, with nothing charged, when DiamondStore.CantBuy(wallet, product) says the account can't buy it again ("<name> is already yours." for an owned non-consumable, "<name> is limited to N per account." past an account limit); it answers Unavailable. A Shard pack still books into the save's own ledger (DiamondStore.IsPack); every other order lands only in the account wallet, so the IAP store holds it until the wallet has loaded and never books it in a save ledger. Grant toasts are worded by product (DiamondStore.Gains: "+300 Mana Shards, +5 Summon Tickets, 1 new cosmetic", "<name> unlocked", or "<name> delivered"). Restoring non-consumables: the owned ConfirmedOrders that OnPurchasesFetched returns are granted into the wallet with no confirm step (nothing to finish; a product the wallet already owns is recorded and grants nothing); on Android that happens at connect, on iOS the Restore purchases row fetches after RestoreTransactions succeeds. DevDiamondStore grants any catalogue product into the wallet under a dev- transaction id, free, as a paid order would be, and UnconnectedDiamondStore answers every product purchase Unavailable ("Store not connected yet").
  • Offers (GG-T1450, Resources/Content/offers.json, Meta/Offers.cs): each OfferDef has an id and name, exactly one of a real-money ProductId (a catalogue product whose Shards, Tickets and cosmetics it must match) or a ShardPrice, its contents, an AccountLimit (0 is none), ShowsAfter (campaign stages cleared before it shows) and an optional EndUtc. Offers.Available shows an offer while it has not ended, the save has cleared enough stages (Test Mode sees all) and the account may still claim it (Remaining: its own limit, and for a product the catalogue limit too). BuyWithShards spends the price from the account wallet and pays the contents, all or nothing; ClaimOnGrant counts a claim when a store grant paid an offer's product. Claims are counted per login on the wallet (AccountWallet.OfferClaims). Offers.Validate checks offers.json against the catalogue. Seeded: starter sells starter_pack once per account after 5 clears (the Summon Circle). Built 2026-11-27 (GG-T1638): the Shop's Offers tab. ShopHubScreen shows one kit panel per Offers.AvailableIn offer, named offer-<id>: its name, its contents (Shards, Summon Tickets, cosmetics), each price it has (a money offer's store price, else the catalogue list price; a Shard offer's ShardPrice, red when the wallet is short) and, under a limit, the claims left. Buy on a Shard offer is BuyWithShards and writes the wallet; on a money offer it passes the Shard Store's age, monthly-limit and parental gate, then IDiamondStore.Purchase of the catalogue product. The claim is counted where the store grants the product (ClaimOnGrant in the IAP store's fulfilment and restore paths and in the dev store), once per transaction, so a deferred or restored purchase counts too. An empty tab says when the next offer opens (CampUnlocks.MilestoneHint of its ShowsAfter), else "No offers right now. Check back soon."
  • Screen (DiamondStoreScreen, diamonds, menu kit): the balance (diamond-balance, diamond-count) with the rate; an "Exchange gold" window with an amount picker (diamond-amount-minus100/-minus10/-plus10/-plus100/-max, default 100), the gold it costs (diamond-quote) and how many the purse can buy; a "Buy Diamonds" list of packs (diamond-pack-100 … diamond-pack-2500) under the store's status line (diamond-store-status, GG-T470: one line for where a purchase stands, classed purchase-state--ready/processing/success/pending/cancelled/failure/unavailable: "Processing your purchase…" in warning colour while the store's sheet is up, then the answer in good/warn/dim/bad, or the store's own "Store unavailable: …" when it can't sell). Each pack row shows the store's localized price string (IDiamondStore.PriceOf, e.g. "1,09 €") once the products are fetched, falling back to the US-dollar list price (DiamondPack.Price); the note then says prices are set by the store in the player's currency. No double taps: while a purchase or restore is in flight (DiamondStores.InFlight, static so it holds across leaving and coming back) every pack and Restore row is disabled and the bought row reads "Processing…"; a store that never answers unlocks after two minutes with a "still pending" note. An unavailable store disables the rows. The screen redraws on its own when the store connects, its prices arrive or it drops. A granted purchase or a gold exchange plays ui.diamond; a cancel or pending answer ui.select; a failure ui.error; a footer with the quote and Exchange (diamond-exchange, confirms first). Reached from Camp's Diamond Store row (camp-diamonds), the forge's buy-diamond, the Summon Circle's summon-diamond-store and every "not enough Diamonds" moment. Features.DiamondStore (on) hides the Camp row and the packs when off; the exchange and gold payment stay.
  • Minors and spending (GG-T1437 rules in Meta/AccountWallet.cs's SpendLimits; screens GG-T1559, SpendGate in DiamondStoreScreen.cs): per store login, not per save. The age question: before a wallet's first real-money purchase a modal veil (age-question) asks "Before your first purchase: how old are you?" with Under 13 / 13 to 17 / 18 or older (age-under13, age-teen, age-adult); the answer is stored on the wallet (AccountWallet.AgeBand) and written at once, then the purchase carries on. Cancel (confirm-no) buys nothing and asks again next time. It is asked once per wallet, never per profile or slot. The monthly limit: each wallet has MonthlyLimitCents; unset, it follows the band's default: under 13 $20.00 (SpendLimits.Under13DefaultCents), 13 to 17 $50.00 (TeenDefaultCents), adult none. This month's spend is every unrefunded ledger record priced from the catalogue (PurchaseLedger.MonthCents). A pack that would pass the limit is refused before the store sheet opens: SpendLimits.Refusal shows on the store's status line as an Unavailable answer ("That would pass this month's spending limit of $20.00 ($5.00 left). A parent can change it in Settings.", or "Purchases are turned off. …" at $0). The parental gate (under 13 only, before every purchase): a veil (parental-gate) asks "Ask a grown-up. What is a × b?" (a 6-9, b 3-9, SpendLimits.GateQuestion) with four shuffled answers (gate-answer-N, N the number shown); the right one starts the purchase, a wrong one closes the gate with "That's not right. Ask a grown-up to help." and ui.error, and nothing is bought. Both veils are named like Confirm's, so Android Back cancels them and a navigation clears them. Settings > Data (with Features.DiamondStore on and a wallet bound): a Spending limit row (settings-spending-limit) reads SpendLimits.Describe and this month's spend ("Default ($20.00) · $5.00 this month"); each tap moves to SpendLimits.Next (Default, Off, $10.00, $20.00, $50.00, $100.00, No limit, then Default) and writes the wallet. Unless the wallet answered adult (SpendLimits.LimitGated, which includes a wallet that hasn't answered yet), the first tap opens the parental gate; once passed, the row stays unlocked until Settings is closed. (Tests: StoreCatalogTests price the limit from the catalogue.)
  • Odds disclosure (GG-T503, App Store Guideline 3.1.1 / Google Play "Loot boxes"): every paid random item shows its odds before purchase, computed by the same Meta code the roll uses (no second copy of the rules). Diamond summon: DiamondSummon.Odds(content, save) lists every hero the next draw can bring (DrawOdds: ClassId, OneIn, Chance, Label "1 in 23 (4.3%)") — exactly the wanderer pool, each equally likely — and DiamondSummon.Pick draws a uniform index over that same list. The Summon Circle's "Call a stranger" window shows DiamondSummon.OddsLine ("Each of these 23 heroes: 1 in 23 (4.3%)", summon-odds) beside an Odds button (summon-odds-btn, toggles to "Hide odds") that opens the full list (summon-odds-list, one summon-odds-{classId} row per hero: name · role and its "1 in N (x%)", then "Every hero listed is equally likely. Heroes you already have never come."); the Draw confirm repeats the odds line. The gold summon is a chosen hero, not random, so it has no odds. Lucky craft: Crafting.MasterworkOdds(content, save) returns the Masterwork chance without and with the Diamond — Crafting.MasterworkChance, the function Craft rolls against — and the forge's lucky-craft window shows Crafting.LuckyOddsLine ("Masterwork chance: 15% without a Diamond, 55% with one", lucky-odds); the lucky-craft button now confirms first ("Pay 50 Diamonds for a lucky craft? Masterwork chance 55% (without the Diamond 15%)."). Craft fixes the chance before it pays or grants station XP, so a craft that levels the Blacksmith rolls at the chance that was shown. Percentages read through OddsText.Percent (one decimal, culture-free). (Tests: SummonTests.The_disclosed_odds_are_the_pool_the_draw_picks_from, Every_seed_draws_only_listed_heroes_spread_across_the_pool, Odds_read_as_a_culture_free_percentage; LuckyCraftTests.The_disclosed_lucky_odds_are_the_chances_the_craft_rolls, A_craft_rolls_at_exactly_the_shown_chance_even_when_it_levels_the_forge.)
  • Bots (Test Mode, CampRoutine, the soaks) never exchange or spend Diamonds. Automation's economy adds goldPerDiamond, diamondsPerDollar and luckyDiamonds; diamondGold is one Diamond's gold (6) and summonDiamonds/refill.diamonds the new prices.
  • (Tests: DiamondExchangeTests — the rate and stack size, paying with Diamonds only, a gold shortfall, can't afford takes nothing, gold buys Diamonds instantly, the flat packs and only the dev stub granting; LuckyCraftTests, PaywallRestedTests, SummonTests pin the prices to the constants.)

25.19 The Codex (added 2026-11-24, owner, GG-T922)

An in-game Lore / Encyclopedia the player reads to catch up on the story. It is built on the Bestiary (§25.11) and the glossary, not beside them: an entry unlocks once the player meets the thing, never locks again, and reads as new until it is opened.

  • Kinds (CodexKinds, Core/Content/Models/Misc.cs; one tab each on CodexScreen, led by its kind icon, RowIcon): Places (a campaign region's theme id or a stage id), Factions (factions.json), Characters (hero classes, Camp NPCs, caravan crew), Foes (the Bestiary's own grid and detail, not a copy), Items, Abilities, Keywords (glossary entries) and Story (chapter/<id>, dialogue/<id>, ending). Places, factions, characters, foes and story are listed in full, with a "???" silhouette for an entry not reached yet; items, abilities and keywords are open-ended and list only what has been found.
  • Entries and text: Resources/Content/codex.json (GG-T924) names the entries, their titles and their related links; each body is Prose (description key codex:<kind>/<id>, payload long, via tools/prose_text.py upsert_seed), falling back to the record's own words when it has no text yet. ContentDb.CodexEntry resolves title, body and links; a link to an entry not reached yet shows as a "???" row.
  • Unlock rules (Meta/Codex.cs, GG-T923/T929): a battle fought unlocks its stage and region (Codex.UnlockStage, after the battle); a hero who joins unlocks their character entry and every ability they arrive knowing (UnlockHero); a learned ability, a gained item (SaveData.AddItem), a glossary term opened in the game's text (GlossaryText), a chapter crawl or the ending played (Story) and a dialogue played to the end each unlock theirs. Codex.Sync then derives everything else the save already shows (Bestiary Seen, the roster and its gear, each hero's faction, joined NPCs, caravan crew, seen crawls and dialogues, cleared stages); it runs after every battle, every dialogue, every load and on opening the Codex, and is idempotent.
  • Read state: SaveData.Codex holds the unlocked keys (<kind>:<id>), SaveData.CodexRead the opened ones; unlocked and not read is new. Opening an entry marks it read and takes off its New badge (row and tab).
  • Old saves (back-fill): save v16 added the Codex. A save from before it runs Codex.Sync(markRead: true) on load, so everything it had already reached unlocks as read: a returning player finds a full Codex without a wall of New badges. Later loads sync without marking read.
  • Camp wiring (GG-T926): a Codex row (camp-codex, the tome icon) sits beside the Bestiary; it reads "N new" and wears the New badge while any entry the screen can show is unread (Codex.UnreadCount). Once a stage is cleared and an unread entry exists, a one-time Camp lesson (hub-codex, CampCoach) points at the row. In battle and in the hub, a newly unlocked place, faction, character, foe or story entry toasts "New Codex entry: <title>" (several at once: "N new Codex entries"; CodexNotice, fed by Codex.EntryUnlocked); items, abilities and keywords unlock quietly, and back-filled entries and bot saves never toast.

25.20 Trust and cohesion (proposed 2026-11-27, GG-T1290; owner review GG-T1291)

Two lasting bonds that grow over the campaign and never undo what they unlocked. Trust is how far one hero trusts the Commander (the player); cohesion is how well two heroes work together. Both are 0-100 and read in the same six tiers. The design page docs/design/trust-cohesion/index.html shows the tables below. Status: design only, nothing built; saving them is GG-T1292.

  • Scales and tiers: Trust per hero, cohesion per unordered hero pair (Barbarian+Cleric is the same bond as Cleric+Barbarian), each an integer 0-100. Tiers 0-5 begin at 0 / 10 / 25 / 45 / 70 / 100. A bond never drops below the floor of the highest tier it has reached: a loss can take it down to that floor and no further, so nothing a tier unlocked is ever lost.
  • Who has Trust: heroes on the roster. Not the lead Warden while it exists (§25.11.2.2; it still takes part in cohesion pairs), not domesticated monsters (§25.11.3; they keep their bond meter), not mercenaries (GG-T233). Cohesion pairs are drawn from the same heroes, plus the Warden.
  • Sources of Trust:
    • Dialogue choices -10 to +10 per choice, set on the choice in dialogues.json. Each choice pays once per save (once-guarded by its dialogue and choice id), so replaying a scene or a talk earns nothing more.
    • Join-route seeds, set when the hero joins: a story recruit (§25.17) 10 (tier 1 on arrival); a wanderer won at full battle Rapport (§25.11.2) 15; a Summon Circle hire, a freed guest or a talk-recruitable (§25.10, §25.11, §25.11.1) 5. A starting hero begins at 0.
    • Victories: +1 for each hero who fought in a won battle (stood on the board at any point; a hero downed by the end still counts, one on the reserve bench does not).
  • Sources of cohesion: dialogue choices as for Trust (-10 to +10, once per save, on a pair-scene choice), and per-battle pair credits for two heroes who fought together in a won battle: +1 for each hero pincer they were both part of (as the two ends, or an end and a supporter) and +1 each time one healed, shielded or buffed the other, capped at 5 per pair per battle.
  • Paying a victory (built, GG-T1573): the battle counts each pair's credits in BattleResults.PairCredits (keyed as Bonds.PairKey); on a won commit Bonds.ApplyBattle adds each pair's credits, capped at BondsConfig.PairCreditCapPerBattle, as cohesion and BondsConfig.VictoryTrust to each hero who fought, standing or downed. Guests, domesticated monsters and mercenaries are skipped. Each bond's before and after is reported on BattleReport.BondChanges for the results screen; a loss or retreat pays nothing.
  • Battle payoffs of Trust: +2% crit chance and +2% evasion per tier (tier 5: +10% each). At tier 5, Resolve: once per battle the hero survives a lethal blow at 1 HP. Resolve is a new Clutch! kind (resolve, glossary clutch_resolve; §13.4.1), so it floats "CLUTCH!" with its headword and pays the shared ClutchCharge. Built (GG-T1581, GG-T1582): ResolveEvent floats "Resolve!" over the hero with a clang just before the Clutch.
  • Battle payoffs of cohesion: bonded pincer partners (the two ends of a pincer) deal +3% damage per tier of their pair (built, GG-T1308, a2be0c1f: BattleSetup.Cohesion, the party's pair key (Bonds.PairKey, "a|b") to cohesion tier, filled by BattleFactory.Build only for party pairs with tier > 0 and copied onto the state; a hero pincer whose two ends are a bonded pair adds BattleConfig.PincerDamagePerCohesionTier (3%) per tier to both ends' blows, carried as PincerFormedEvent.BondTier and shown as a "Bond n" tag on the pincer; an enemy pincer or an unbonded pair has tier 0; tests in BondsTests); a supporter's reach +1 when the attacker it would support is a tier-3+ bonded partner (built, GG-T1309, c25c24e5: BattleConfig.BondedReachBonus in PincerDetector.FindSupporters); support magnitude +10% (heals, shields, buffs one gives the other) at tier 4+ (built, GG-T1309: BondedSupportBonus scales every support effect in PerformSupport and the crit loan; a bonded support also earns a Bond combo credit and its cut-in reads "Bond n", GG-T1588; tests in BondsTests and ComboTests, written, not run); at tier 5 the pair unlocks its authored Duo support, a support effect written for that pair alone.
  • Story payoffs: a Trust scene for a hero at tiers 1, 3 and 5 and a pair scene at cohesion tiers 2 and 4, each played at Camp the next time it opens (dialogues.json triggers, one per beat). The hero with the highest Trust in the party voices the chapter beats that name a party speaker (ties: the longest-serving).
  • Joined scenes at Camp (GG-T1594): a hero who joined by a non-story route (a summon, a wanderer, a freed guest) is greeted by a Joined scene on the way back to Camp from the results screen: after any level interlude, chapter crawl and vendor join beat, and after the VariantPicker has asked their look on the results screen. StoryBeats plays DialogueRunner.PendingJoined one after another (each chosen when the last ends) with "$hero" bound; finishing one adds the hero to SaveData.MetHeroes, so each is greeted once.
  • New Game+ keeps every bond: Trust, cohesion and the highest tier reached carry over with the roster, and once-guarded dialogue choices stay spent.
  • The core cast: Barbarian, Cleric, Red Mage, Engineer, Knight and Sage (the starting picks and the four story recruits, §25.17) get the authored Trust scenes, every pair among them (15 pairs) gets its pair scenes and its Duo support. Every other hero still earns Trust and cohesion and their battle payoffs; their story beats fall back to generic scenes.
  • Naming versus the wanderer gauge: the battle gauge a wanderer fills (Unit.Trust/TrustNeeded, TrustGrewEvent, §25.11.2) keeps its code names, but its player text becomes Rapport ("Rapport n/m", "Ready to talk!", the InspectCard's rapport meter, "earn their rapport"), so on screen Trust means only this lasting bond with the Commander.
  • Tuning: every number above (the 0-100 range, the tier floors, the dialogue range, the seeds, the victory and pair credits and their cap, the crit/evasion, damage, reach and support bonuses, the Resolve HP, the scene tiers) lives in one config, BondConfig, beside BattleConfig, so each can be dialed without touching the rules.

25.13 Roles (added 2026-10-11, owner direction: "a healer should need to heal, a magician should have ranged spells, a tank should be able to taunt")

Every hero class has a Role (validated): Tank (9), Healer (8), Mage (6), Striker (31), Support (8), Ranged (2). The role sets the default bar and the learn list; caster power (§13.1.5) makes the stats matter.

Amended 2026-10-13 — archetype sub-kits: each role (Ranged too since 2026-11-02, GG-T18 — see below) splits into 3-5 WoW-style sub-archetypes that play differently within the same role (owner: "every combination of tanking type... find Paladin, Warrior, and Druid do things differently"). Every class keeps slot 0 (the role's shared baseline, e.g. Tank's taunt) and slot 2 (item:x_potion) in common; slots 1 and 4 carry two bespoke abilities per sub-archetype, and slot 3 is the class's own unique signature (unchanged from the original per-class kit pass). A fourth bespoke ability per cluster ("Core") is learnable but not in the starting bar, so there's room to customize without disturbing the default. Sub-archetypes: Tank — Aegis Guard (pure mitigation + cleanse), Juggernaut (knockback aggression), Warlord (party buffs), Deathguard (drain/poison); Healer — Aegis Wardens (preemptive wards), Hexmenders (damage-for-heal), Skirmish-Menders (mobile support); Support — Primal Pack, Tempo Weavers, Field Engineers; Mage — Spellblades, Field Casters; Striker — Berserkers, Duelists, Skirmishers, Combo Brawlers, Attrition, Shadowsteps, Opportunists, Brawlers. Full id list: tools/icons.json's ability map, or docs/USER_STORIES.md ticket GG-T3.

Amended 2026-10-13 — a role-wide invariant, found by live play (GG-T14): every Tank's default bar must keep at least one damage-dealing ability. A lone tank (party wiped around it) can't pincer by itself, so if every bar slot is non-damage or on cooldown/unaffordable, it can soft-lock against a weak enemy neither side can finish — this actually happened to the Aegis Guard cluster's first cut (fixed by swapping its Capstone for its own damage-dealing Core ability). Asserted by SynergyTests.Every_hero_has_a_role_and_kits_match_it.

Amended 2026-10-13 — Ranged (new 6th role): a precision-attacker archetype distinct from Striker (melee, AdjacentOnly) and Mage (AoE elemental) — no ability in a Ranged hero's bar may be AdjacentOnly. Two classes so far, hexsniper and hexwarden, reusing the portraits of the existing Ranged-tagged enemies hag00/hag01 (AttackRange 3) rather than new art — see GG-T11.

Amended 2026-11-02 — Ranged sub-archetypes (GG-T18): Ranged now splits into the Ranger tree's own three branches (§25.6.1, GG-T74), one class each, on the same slot convention as every other role: slot 0 the role baseline ranged_quickshot, slot 1 the branch Opener, slot 2 item:x_potion, slot 3 the class signature, slot 4 the branch Capstone (the branch Core stays learnable, off the starting bar). Marksman (patient single-target burst) — hexsniper: marksman_deadeye_shot / hexsniper_piercingshot / marksman_execution_shot. Trapper (slows, roots, silences) — hexwarden: trapper_binding_shot / hexwarden_snareshot / trapper_snare_net. Skirmisher (lane pressure + falling back) — new class hexstalker (Hex Stalker): skirmisher_covering_volley / hexstalker_fadingshot (Fading Shot: 14 Dark, Blinded, caster steps back 2) / skirmisher_rapid_barrage; added to the Summon Circle pool. The shared ranged_calledshot/ranged_suppressingfire stay in every Ranged class's learnable list (and the tree's nucleus). Art: hexstalker reuses the portrait/thumb of hag02, a common Kiter-brain hag mook that appears across many encounters — the same "defector" reuse as hag00/hag01, which is what this ticket was waiting for; the named miniboss swampmistress00 is still deliberately not reused.

Universal cross-class pool (added 2026-10-13, GG-T4): AbilityDef.Universal — any hero can learn a Universal-flagged Skill regardless of role, extending the pre-existing rule that every Spell is already learnable by any class (Abilities.Learnable).

Role Job
Tank draw the enemies, protect casters, at least one damage option always in the bar
Healer mend and cleanse (WIS)
Mage ranged elemental AoE damage (INT)
Striker pincer damage, melee skills (STR)
Support tempo — Quicken allies, Slow foes, rally the party
Ranged precision single-target/line damage that never needs to be adjacent

The starting trio is a full triangle: Paladin (Tank), Barbarian (Striker), Cleric (Healer). Role badges show on the Camp cards, Party, Status (with a one-line "what it's for") and the battle panel. The Abilities screen can move a slot along the bar (Abilities.Swap). (Tests: Every_hero_has_a_role_and_kits_match_it, The_bar_can_be_reordered_within_unlocked_slots.)

26. Responsive Design & Aspect Ratio

26.1 Reference resolution

1170 × 2532 portrait (GameApp.DesignWidth/Height) is the minimum stage: every screen must fit in it. The live size is GameApp.StageWidth/StageHeight (design pixels), between 1170×2532 and 1424 wide (MaxStageWidth, 9:16) or 3000 tall (MaxStageHeight, just past 9:23; GG-T706, GG-T2115). Screens lay out vertically from the top in fixed design pixels and horizontally against the live width (left/right insets, or centred on StageWidth), so extra width or height is absorbed, never cropped.

26.2 Panel scaling

PanelSettings: ScaleWithScreenSize, MatchWidthOrHeight; GameApp.FitStage sets the reference resolution to the live stage size and match to the limiting axis whenever the screen size changes, then raises GameApp.StageResized.

26.3 Adaptive stage (GG-T169)

Amended 2026-11-16 (GG-T398; owner 2026-11-05: "every screen must scale to fit the supported aspect ratios (9:23 to 3:4) and resolutions, using the extra space instead of leaving dead margins"): GameApp.StageSizeFor(aspect) grows the stage from the 1170×2532 minimum up to 1899 wide (3:4, MaxStageWidth) or 2990 tall (9:23, MaxStageHeight), so every shape from 9:23 to 3:4 fills the screen edge to edge; only shapes outside that range clamp to the nearest supported stage inside the stage-frame outline. Scaling is always uniform.

  • Content column: Fit.Column is the stage width capped at Fit.ColumnMax (1424, the 9:16 width), centred by Fit.Inset; menus, windows, results, profiles, character select, credits, crawls, dialogue and merc renewal sit in it, so a tablet's extra width goes to the backdrop. Fit.C(pct) sizes within it. Amended 2026-11-21 (GG-T550; owner: "every screen scales to fill all aspects 9:23–3:4 with consistent gutters, no dead margins"): on a 3:4 tablet that cap left ~240-design-px empty backdrop bands either side of every page (Adventure, vendors, Items, Heroes, settings, results, dialogue) while the hub and battle filled the width. Fit.ColumnMax is now MaxStageWidth (1899), so the column is the whole stage on every aspect, Fit.Inset is 0, and every page's header and windows sit Kit.Gutter from the stage edge like the hub's; the battle's ability bar and Party · Lore · Log tabs span it too. Lines still stop at about 60 characters (Typography.Paragraphs), and Fit.Roomy grids (party cards, window editor) add a column on the wider stage.
  • Camp hub: three party cards abreast when Fit.Roomy (stage ≥ 1600 wide), two otherwise.
  • Battle: the board centres, top bar and timeline span the stage, the ability bar, orbs and Party · Lore · Log tabs keep to the content column; the tabs take any extra height.
  • Resize: the router rebuilds the current screen on StageResized (battle re-lays itself out; dialogue, crawl and credits opt out via RebuildOnResize). Amended 2026-11-28 (GG-T2028): GameApp re-fits the stage every frame it sees a new Screen.width/height, safe area or density, so a Fold folding or unfolding or a Flip re-lays out the running app with no restart; StageResized then fires even when the stage size is unchanged, and a re-fit that lands mid-transition refreshes the new screen once its fade clears. The automation resize endpoint takes w, h and optional safe insets (top, bottom, ref) and replies after the re-layout; python tools/harness.py refold checks the hub across Fold cover, main and cover again in one player.
  • Verification: harness.py aspects runs 9:23 … 3:4 (must fill) plus 9:25 and 1:1 (must be framed).

Amended 2026-10-21 (owner: "on-device experience is king — fill every phone, frame tablets, never warp"): GameApp.StageSizeFor(aspect) picks the stage: on a screen wider than 19.5:9 the height stays 2532 and the width grows to match, up to 1424 (9:16); on a taller one the width stays 1170 and the height grows, up to 2730 (9:21). Inside 9:21…9:16 — every mainstream phone — the stage fills the screen edge to edge with no bars. Outside it (tablets 3:4/2:3/10:16, ultra-tall shapes) the stage clamps to the nearest supported shape, is centred, and a stage-frame outline (the same white rounded frame every window uses) sits 10 px outside it over a near-black bezel, so the bars read as deliberate. Scaling is always uniform.

  • Battle: the board is centred on the stage width (BoardLeft = (StageWidth − 1080)/2, 45 at the minimum), the timeline stretches (StageWidth − 230), cut-in anchors mirror against StageWidth; the bottom info panel is pinned top and bottom, so it absorbs extra height. BattleScreen.ApplyStageLayout re-applies these on StageResized.
  • Automation: design-pixel taps map through the live stage width; stagebounds reports design (live stage size) and framed.
  • Verification: python tools/harness.py aspects launches at 9:23, 9:21, 9:20, 9:19.5, 9:18, 9:16, 2:3 and 3:4, shoots title/hub/battle, runs the layout audit, and fails if the stage drops below the minimum or the frame state doesn't match the rule.

Amended 2026-11-23 (GG-T706; owner: "don't put ability bars around the border, scale the game to a valid AR and put blue mystic fog in the out of bounds black area"): the valid range is 9:23 … 9:16 (aspect w/h 0.391 … 0.5625). MaxStageWidth is back to 1424 (9:16); MaxStageHeight stays 2990 (9:23). Every shape outside the range gets the nearest valid stage, centred, uniformly scaled, inside the stage-frame outline, and the out-of-bounds area is the blue mystic fog (App/UI/MysticFog.cs): a deep night-blue ground (#090D1C) under three soft fog banks from one procedural noise texture, tinted deep indigo, Somnolith blue #7590C8 (§11.5) and a pale mana glint, drifting against each other on 29–61 s periods with a 13 s breathing glow; Reduce Motion holds them in the rest pose. The fog is hidden and idle while the stage fills the screen. This withdraws GG-T398's "fill to 3:4" and GG-T523's side-column ability bar. Fit.ColumnMax follows MaxStageWidth, so Fit.Roomy (≥ 1600) no longer triggers. GG-T699 and any margin audit measure the letterboxed stage rect (stagebounds), not the window.

Why 9:16 … 9:23: the layout is designed at 9:19.5 (1170×2532); the vertical stack (board 1080 wide, HUD rows, info tabs that absorb height) only adapts along height, and extra width beyond ~1424 produced dead bands or the side-bar mode. Every mainstream phone sits inside; a few percent of extra width (10:16, 2:3) is not worth a second layout, and the owner prefers a deliberate bezel.

Device class Typical shape (w:h portrait) Aspect Result
Older 16:9 phones, iPhone 8/SE 9:16 0.5625 fills (widest valid)
18:9 / 19.5:9 / 20:9 phones (iPhone X–16, Pixel, Galaxy S) 9:18 … 9:20 0.5 … 0.45 fills
21:9 phones (Xperia 1/5/10) 9:21 0.429 fills
Foldable cover screens (Galaxy Z Fold 5/6) ≈ 9:22 … 9:23 ≈ 0.39–0.41 fills
Fold 3/4 cover, other ultra-tall ≈ 9:24.5+ < 0.391 letterboxed: fog above/below
Old 3:5 phones/tablets (WVGA, 1024×600) 3:5 0.6 letterboxed: thin fog side bands
Android tablets 10:16 (16:10) 10:16 0.625 letterboxed
Tablets 2:3 (Surface, some Android), Chromebook tablets 2:3 0.667 letterboxed
iPads 3:4 3:4 0.75 letterboxed
Foldables opened (Z Fold inner, Pixel Fold) ≈ 5:6 … 6:5 ≈ 0.85–1.2 letterboxed (wide fog bands)
Chromebooks / desktop windows (landscape 16:9, 16:10, 3:2) 16:9 … 3:2 1.5–1.78 letterboxed (fog either side)

Amended 2026-11-23 (GG-T724; owner: "some devices are just too small for this game; this game should be targeting flagship models that can actually run games" and "for now lets just focus on iPhones, Samsung Galaxy and Google Pixel releases"). Convergence targets flagship iPhone, Samsung Galaxy (S and Z) and Google Pixel phones from 2021 on. The table above still describes what the stage does on any shape; this one is what we design and test for. Figures are portrait px (w×h) and logical width in pt (iOS) or dp at the default display size (Android), from the makers' spec pages (Apple, Samsung, Google Store) and GSMArena, checked 2026-11-23; a "≈" figure is the panel class, not re-verified for that exact model.

Family Model (year) Physical px Logical Aspect w/h ppi SoC Result
iPhone 18 Pro / 18 Pro Max (2026) 1206×2622 / 1320×2868 402 / 440 pt 0.460 460 A20 Pro fills
iPhone Duo (foldable, 2026) outer / inner 1398×2034 / 1878×2670 ≈466 / ≈626 pt 0.687 / 0.703 460 / 430 A20 Pro letterboxed on both screens (fog side bands)
iPhone 17 / 17 Pro / 17 Pro Max / Air (2025) 1206×2622, 1206×2622, 1320×2868, 1260×2736 402 / 402 / 440 / 420 pt 0.46 460 A19 / A19 Pro fills
iPhone 17e (2026), 16e (2025) 1170×2532 390 pt 0.462 460 A19 / A18 fills
iPhone 16 / 16 Plus / 16 Pro / 16 Pro Max (2024) 1179×2556, 1290×2796, 1206×2622, 1320×2868 393–440 pt 0.46 460 A18 / A18 Pro fills
iPhone 15 / 15 Plus / 15 Pro / 15 Pro Max (2023) 1179×2556, 1290×2796 393 / 430 pt 0.461 460 A16 / A17 Pro fills
iPhone 14 / 14 Plus / 14 Pro / 14 Pro Max (2022) 1170×2532, 1284×2778, 1179×2556, 1290×2796 390–430 pt 0.46 460 A15 / A16 fills
iPhone 13 / 13 Pro / 13 Pro Max (2021): minimum 1170×2532, 1284×2778 390 / 428 pt 0.462 460 A15 (floor) fills
iPhone 12 mini / 13 mini; SE 2nd/3rd gen 1080×2340; 750×1334 375 pt 0.462; 0.562 476; 326 A14 / A15 below the minimum screen: not designed for (below)
Galaxy S S26 / S26+ / S26 Ultra (2026) 1080×2340, 1440×3120, 1440×3120 ≈384–412 dp 0.462 411 / ≈513 / 498 SD 8 Elite Gen 5 / Exynos 2600 fills
Galaxy S S25, S24, S23 series (2023–25); S22 series (2022): minimum 1080×2340 or 1440×3088–3120 ≈384–412 dp 0.462–0.466 416–505 SD 8 Elite … SD 8 Gen 1 / Exynos 2200 (floor) fills
Galaxy Z Fold Fold8 Ultra (2026), Fold7 (2025) cover 1080×2520 ≈411 dp 0.429 (9:21) ≈422 SD 8 Elite (Gen 5) fills
Galaxy Z Fold Fold8 (2026, the 4:3 "wide" model) cover / inner 1248×1972 / 1848×2448 — 0.633 (≈10:16) / 0.755 ≈420 / 404 SD 8 Elite Gen 5 letterboxed (fog side bands)
Galaxy Z Fold Fold6 (2024), Fold5 (2023), Fold4 (2022) cover 968×2376, 904×2316 — 0.407 / 0.390 ≈402–410 SD 8 Gen 3 … 8+ Gen 1 fills (Fold4/5 at the 9:23 edge)
Galaxy Z Fold inner screens, every generation but the Fold8 ≈1812–1968 × 2160–2184 — ≈0.83–0.90 ≈368–374 — letterboxed (wide fog bands)
Galaxy Z Flip Flip8 (2026), Flip7 (2025) main 1080×2520 ≈411 dp 0.429 (9:21) ≈400 Exynos 2600 / 2500 fills
Galaxy Z Flip Flip6 / 5 / 4 (2022–24) main 1080×2640 — 0.409 (9:22) ≈425 SD 8 Gen 3 … 8+ Gen 1 fills
Galaxy Z Flip cover screen (FlexWindow, 3.4–4.1", ≈1:1) e.g. 948×1048 — ≈0.9 — — not supported: the game is a main-screen app
Pixel 11 / 11 Pro / 11 Pro XL (2026) ≈1080×2424, ≈1280×2856, 1344×2992 ≈412 dp 0.449 (20:9) ≈422 / ≈495 / 482 Tensor G6 fills
Pixel 10 series (2025), 9 series (2024), 8 (2023), 7 (2022) 1080×2400–2424, 1280×2856, 1344×2992, 1440×3120 ≈412 dp 0.445–0.462 422–512 Tensor G5 … G2 fills
Pixel 6 / 6 Pro (2021): minimum 1080×2400, 1440×3120 ≈412 dp 0.45 / 0.462 411 / 512 Tensor G1 (floor) fills
Pixel Fold 11 Pro Fold (2026), 10 Pro Fold (2025), 9 Pro Fold (2024) outer 1080×2342–2424 ≈412 dp 0.446–0.461 399–422 Tensor G6 / G5 / G4 fills
Pixel Fold the original Pixel Fold (2023) outer 1080×2092 — 0.516 408 Tensor G2 fills
Pixel Fold inner screens (2076×2152; original Fold 2208×1840) — — ≈0.96 / 1.2 ≈372–380 — letterboxed (wide fog bands)
Pixel a-series (6a–10a) 1080×2400 ≈412 dp 0.45 ≈410–430 Tensor (mid tier) not a target; same shape and chip family, so it runs

Targets (GG-T724).

  • Minimum hardware: a 2021 flagship chip. Apple A15 (iPhone 13), Snapdragon 8 Gen 1 / Exynos 2200 (Galaxy S22, Z Fold4, Z Flip4), Google Tensor G1 (Pixel 6). Everything newer in the three families is supported. That floor brings 4–8 GB RAM, Metal 3 and Vulkan 1.1 with it.
  • Minimum OS: iOS 17.0 (iOSTargetOSVersionString, raised from 15.0 in GG-T724). Every target iPhone runs it, and nothing it drops (iPhone 8/X) is above the hardware floor. Android 12 (API 31) for the Play release bundle: the Galaxy S22 and Pixel 6 shipped with it. Applied in GG-T725: ConvergenceBuild.cs sets minSdkVersion to API 31 for the release bundle (the project setting alone would not change the bundle, so the floor lives in that file). The development APK stays at 26 so BlueStacks 5 (Android 9) and the emulator suite still install it (docs/RELEASE_BUILD.md). Target SDK stays "highest installed".
  • Aspect range unchanged: 9:23 … 9:16. Every target phone, and every fold/flip outer or main screen above, is inside it (iPhones ≈0.46, Galaxy S 0.462, Pixels 0.445–0.462, Fold7/8 Ultra covers and Flip main screens 9:21–9:22, Fold4/5 covers at 9:23). Deliberately letterboxed in the mystic fog: every foldable inner screen, the Galaxy Z Fold8's 10:16 cover and both iPhone Duo screens. No flagship falls just outside the range, so it did not move.
  • Minimum screen: a 6.1-inch-class phone, short side ≥ 390 pt (iOS) or ≈ 384 dp (Android, default display size), ≥ 1080 physical px wide. At 1080 px the stage draws at ≥ 0.92 screen px per design px (1080 / 1170), so TypeFloor never engages on a target device.
  • Below the minimum (iPhone SE 2nd/3rd gen, 12 mini, 13 mini, and any non-flagship Android): "not designed for", not blocked. They still install and render (the SE's 9:16 even fills), but nobody lays out, tunes or tests for them, and a layout problem that shows only there is not a bug. Blocking is a store setting, not a Unity one (below). Owner decision, reversible: SE and mini are out (flagships only). Galaxy A-series and Pixel a-series are not targets either, but are not excluded from the store: they share the shape, and recent ones pass the chip floor.

Withdrawn design rules (they existed only for small or odd devices; GG-T724). From the GG-T706 table above, these rows are no longer design targets: "Older 16:9 phones, iPhone 8/SE" (9:16 stays the widest supported shape, for split-screen windows and the harness, not a device to design for), "21:9 phones (Xperia 1/5/10)", "Fold 3/4 cover, other ultra-tall", "Old 3:5 phones/tablets (WVGA, 1024×600)", and the tablet, Chromebook and desktop rows beyond "it letterboxes". The "Resolution and DPI" paragraph below keeps its maths, but its small-window thresholds (usable down to a ≈ 640-px-tall window, scale ≈ 0.25) are now a desktop-window fallback, not a phone requirement. TypeFloor and GG-T711's shrink-to-fit floor stay as safety nets. No code was removed.

Store settings (the owner; Unity cannot set these).

  • Play Console › Release › Device catalog: the simplest rule for "iPhones, Samsung Galaxy and Google Pixel" is to include only the manufacturers Samsung and Google, then exclude the Galaxy A/M/F series if they shouldn't see it, plus a rule RAM < 6 GB and SoC older than Snapdragon 8 Gen 1 / Exynos 2200 / Tensor G1. Exclude tablets and Chromebooks (form factor) unless a letterboxed phone game is wanted there. The API 31 floor comes from the release bundle (GG-T725).
  • App Store Connect: iPhone only; minimum iOS comes from the Xcode project (17.0). Apple can't exclude by model, and no hardware capability cleanly separates the SE/mini from the targets, so they stay "not designed for". ProjectSettings targetDevice: 2 is iPhone + iPad; switching the export to iPhone only (0) belongs in the BuildIOS entry when it is written (GG-T479, docs/RELEASE_BUILD.md), since iPads letterbox anyway.

Verification: python tools/harness.py aspects devices runs the target matrix by name (DEVICE_ASPECTS: one window per flagship screen shape, plus the letterboxed fold inners); plain aspects keeps the generic sweep that tools/polish.py uses. Amended 2026-11-28 (GG-T2026): the matrix is tools/devices.json (read through tools/devices.py), shared by scenario.py, uiaudit.py and harness.py: --device takes a device id, a shape id (its representative), shapes (one in-target device per shape) or all (every in-target device: iPhone 15 Pro / 15 Pro Max and every iPhone 16 and 17, Galaxy S23 and newer plus the 2023+ Z Flip and Fold covers); older devices stay selectable by id. The default device is iphone15pro. aspects devices runs one in-target device per shape plus the letterboxed inners; aspects DEVICE and safeareas --device DEVICE (each device's own shape and safe area) take the same names.

Resolution and DPI. Scaling is one uniform factor (screen px per design px = limiting screen axis ÷ stage axis incl. the 36-px frame pad); it is not clamped up or down, so a 4K window or a 460-dpi phone just draws sharper. The minimum usable stage is the design stage itself, 1170×2532 design px; what limits a small or low-dpi screen is text size, which TypeFloor (Tokens.cs) clamps: no line drawn below 12 screen px or 9 dp, raising the body/caption sizes in steps (32 … 48 design px). Thresholds: the stage is fully usable down to a window ≈ 640 px tall (scale ≈ 0.25: 132-design-px tap targets ≈ 32 px, the text floor active; a 1366×768 laptop window is ≈ 0.27); below that targets shrink under 32 px and the shape is unsupported (it still renders, never cropped). A phone at 1080 px wide or more draws at ≥ 0.76 with no floor. Very high DPI needs no clamp.

26.4 Camera

One UI-only camera (cullingMask = 0, black clear); the board is UI Toolkit, so there is no orthographic framing.

26.5 Safe area

GameApp.ApplySafeArea insets the screens container where Screen.safeArea (notch, home bar) overlaps the stage — which on a phone that fills the screen is every time. -safeArea <topPx>,<bottomPx> simulates one on desktop.

Amended 2026-11-20 (GG-T483): content and buttons stay inside the safe area, the art does not. A screen's backdrop layers (each leaf fill child of its root: the background picture, a shade) reach out under the insets (GameScreen.BleedBackdrops, on every mount, rebuild and inset change), so no screen shows a black band under a notch or gesture bar; a page header's band reaches up to the top edge too (Ui.Header: negative margin + padding of SafeTop, controls below the inset). A change of insets (upside-down portrait, the endpoint below) is noticed like a stage resize: GameApp.StageResized fires and the current screen rebuilds (Fit.H reads the new usable height). Faking one: -safeArea top,bottom (window px) at launch, or the automation safearea?top=90&bottom=48&ref=2400 (px quoted at a 2400-px-tall phone, scaled to the window; clear=1 goes back to the device's; no arguments reports safeTop/safeBottom in design px). The game is portrait-only, so left/right insets (a landscape punch-hole) are not applied. Verification: python tools/harness.py safeareas (9:23 and 3:4, a 90-px notch and 48-px gesture bar at 2400 tall: title, Camp, Merchant, results, battle, layout audit, recorded).

Amended 2026-11-28 (GG-T2027, the device matrix tools/devices.json: iPhone 15 Pro and newer, Galaxy S23 and newer, the Z Flip and Z Fold): the platform settings that let the game reach those edges are set by the build (ConvergenceBuild.ApplyAndroidScreen, BuildIOS), not left to ProjectSettings. Android: max aspect ratio ConvergenceBuild.AndroidMaxAspectRatio = 2.6 (Unity's Custom aspect mode), so a Z Flip main screen (22:9, 2.44) and a Z Fold cover (23.1:9, 2.56) open full-screen instead of in Android's own black bars (the old cap was 2.4); render outside the safe area on, so the window takes the cutout (layoutInDisplayCutoutMode shortEdges) and Screen.safeArea reports the punch-hole and gesture bar, which ApplySafeArea keeps content out of as above; a resizeable activity, so folding or unfolding a Fold (cover to inner screen) resizes the running game instead of restarting or letterboxing it, and the stage refits through GameApp.StageResized. python tools/check_aab.py prints the bundle's max aspect, resizeableActivity, orientation and cutout values and fails a non-resizeable activity capped below --min-aspect (2.6). iOS: system gestures are deferred on the bottom edge (a swipe up from the home-indicator strip goes to the game first, the system only on a second swipe), so a drag on the board's bottom row is not taken for Home; the home indicator auto-hides (hideHomeButton) once the player stops touching the screen. Unity sets that for the whole player, not per screen: battle gets it, and so do the menus, until a native toggle limits it to battle. Amended 2026-11-28 (GG-T2121): the native toggle is in. The build sets hideHomeButton off, so the menus keep the home indicator; HomeIndicator (App/Boot/HomeIndicator.cs, on ScreenRouter.Changed) asks for it auto-hidden while the top screen is the battle and shown on any other (a menu pushed over the battle shows it), through Plugins/iOS/GGHomeIndicator.mm, which replaces prefersHomeIndicatorAutoHidden on Unity's root view controller with the flag it holds and calls setNeedsUpdateOfHomeIndicatorAutoHidden. Every other platform compiles the call out (UNITY_IOS && !UNITY_EDITOR). The stage's own aspect limits (MaxStageWidth/MaxStageHeight, §26.2) are unchanged here,. Amended (GG-T2115): MaxStageHeight is 3000 (was 2990), so the Z Fold5 cover (904 x 2316, aspect 0.3903, stage 1170 x 2998) fills the screen with no fog bands; the valid range is 1170:3000 (0.39) … 9:16.

26.6 Units and overflow (GG-T272, GG-T271; owner 2026-11-05)

Owner: "measure things in agnostic units" and "all overflow should be avoided when possible, when not possible automatic marquee that prints out the rest and then resets back to left".

  • Units. Design px already scale uniformly to every resolution (§26.2), so type (TypeScale), spacing (Space, 8-px scale with a 4-px half step) and fixed-size art and controls (Size) stay in design px. What design px don't absorb is aspect, so layout widths and vertical bands that should breathe use stage units: Fit.W(%) / Fit.H(%) (percent of the safe-area stage, GameApp.SafeTop/SafeBottom) or flex/Length.Percent, and every full-width panel sits Fit.Edge (24) from the stage edge. No App or USS margin, padding, size or position is a bare number any more (tools/polish_lint.py POL-C1). The battle board's 1080-px grid and its HUD rows stay fixed game geometry, named beside BoardTop (BannerTop, InfoPanelTop, TopBarHeight, TimelineFrameHeight).
  • One GUI text size (GG-T770, owner 2026-11-23: "calculate the right font size based on aspect ratio, dpi and resolution, then use that for all gui, bold and italic and colors and underlines and strikethrough are allowed but all these different font sizes make it look messy"). Every GUI label (titles, headings, rows, buttons, tabs, captions, hints, badges, banners, cut-in tags, combat floats) draws at one size, TypeScale.Base (USS --type-base). GuiType (Tokens.cs) works it out on every stage fit (GameApp.FitStage → GuiType.SetScreen) and on Settings → Text size (TextSize.Apply → GuiType.SetTextSize): the design size that draws 14 dp at the stage's scale (screen px per design px, set by the aspect's limiting axis) and Screen.dpi (160 when unknown), clamped to 40–56 design px (a desktop window or tablet never draws smaller than the reference phone, 1170 px at 460 dpi = 40), times Text size (100/115/130 %), raised to the TypeFloor legibility floor (12 screen px / 9 dp), capped so a line across the stage still holds 28 characters, and rounded to 2 px. The UI root takes the matching type-base-40 … type-base-72 class, so every USS-sized label follows live; sizes set in code read TypeScale.Base when their screen builds. Emphasis is never size: a title or heading stands out by weight (bold, the Heavy font role) and colour, meta by a dimmer colour; italic, underline and strikethrough are the other tools. The only text not at the base size is the board's fixed geometry — marks inside a tile (GUEST/TAMED tag, cast-chip letter, acted tick, status count, region counter: BoardView.TileLabelFont) and tile-filling pictograms (trap skull, region glyph: TileGlyphFont) — and icon glyphs sized to their icon (mana pips, the bounty skull). TextFit shrink-to-fit (GG-T711) is only an overflow fallback: a label starts at the base and shrinks (down to TypeFloor.ShrinkFloor) only when a word does not fit its box. Automation: stagebounds reports typeBase.
  • Overflow. Text wraps where it can. A single line that can't (a menu row's value — prices, counts, "Lv 1 · 5 waves" — or a fixed-width name) is a marquee (Ui.Marquee, App/UI/Marquee.cs): it sits in a clipping box; when the text is wider than the box it holds (Timing.Cinematic), scrolls left at 90 px/s with Ease.InOut until the end shows, holds, fades out, snaps back to the start, fades in and repeats, on pause-aware Tween time. With Reduce Motion it shows an ellipsis instead. Menu-row values never shrink below their text and never take more than 55% of the row, so the row's label wraps instead (before: prices broke as "30 / G" beside a two-line name). The layout audit counts a marquee label as handled, not as overflow, and measures wrapped text with a 1-px rounding allowance.
  • Amended 2026-11-06 (owner, GG-T305: "perfect text wrapping on all things (hyphenated or word wrap as an option), and one-line things like buttons have a restarting marquee that scrolls the info, flashes 3 times, then resets to left-most and begins again"). Nothing opts in any more: TextFit (App/UI/TextFit.cs, installed on the panel root by GameApp) passes over every TextElement every 120 ms.
    • Single line (white-space: nowrap) wider than its box — a button, tab, menu-row value, name, chip, badge or header — is a Marquee (App/UI/Marquee.cs, the one shared component; the party-card name and menu-row values use it like everything else). The element keeps its text and layout (its own glyphs drawn invisibly with a leading <alpha=#01>), and an absolute clipping overlay laid over its content box (a sibling: a TextElement with a child loses its text measure) draws the same text in the same font, size, colour and shadow. Cycle: hold at the left 1.2 s → scroll at 90 px/s (Ease.InOut, at least 0.7 s) until the end shows → hold 0.3 s → flash three times (opacity 1 → 0.2 → 1, 0.16 s each way) → snap back to the left → repeat. Only while the text overflows; text that fits is static and untouched. Pause-aware (Tween.Dt) but not sped up by Battle speed. Reduce Motion: an ellipsis. Ui.Marquee(label) now only lets a label shrink below its text; a menu-row value's 55% cap is in px from the row's width (a percent max-width on a text node resolved against the wrong base).
    • Wrapped text (white-space: normal) is laid out by Meta/TextBreaking.cs LineBreaker against the label's real width and font: greedy like the engine, then no lone word on the last line when the word before it can come down too (never stranding a lone dash or letter above it), no single-letter word ("a", "I", "&", a dash) ending a line, and an overlong word hyphenated at a break point (or split with a hyphen) instead of being cut mid-glyph. When the engine's own wrap is already clean the text is left exactly as given; otherwise the label gets explicit line breaks and a minimum width of its longest line + 2 px (so the engine never re-wraps a line by a rounding hair), re-laid when its width, its parent's width, its font size, the font or the setting changes, or code sets new text (which must hold still for one pass, so a typewriter is never re-flowed mid-line). A GlossaryText word wider than its whole row becomes a wrapped label so it hyphenates too.
    • Settings → Text wrapping: Word wrap (default) / Hyphenate (SettingsSave.Hyphenate, settings.json game.hyphenate), applied live. Hyphenate also breaks a word that would otherwise leave more than 20% of a line empty, at the largest Hyphenation point that fits.
    • Hyphenation (Meta/TextBreaking.cs Hyphenation.Points/Hyphenate, Typography.Hyphenate for text that lays itself out): deterministic English, words of 6+ letters, at least 2 letters before and 3 after a break, a vowel on both sides. Breaks only where it is sure: before known suffixes (-tion/-sion/-cian/-tial/-cial/-tious/-cious, -ment(s), -ness, -less, -ful, -able/-ible, -ing(s), -thing; a doubled consonant before -ing/-able/-ible splits between the doubles: run-ning, ter-rible, but fall-ing), after un-/dis-/inter- (before a consonant) and over-/under-/counter-/super-, and inside a consonant cluster between vowels at the first split whose right part is a legal onset, never inside ch/ck/gh/ph/sh/th/wh (con-trol, mon-ster, black-smith, lit-tle, sim-ple); a lone consonant between vowels is never split (le-mon vs lem-on is ambiguous). Never a capitalised word (proper nouns), a number, or anything inside a [keyword] or a rich-text colour/link/bold span. (Tests: TextBreakingTests.)
    • Amended 2026-11-23 (owner, GG-T711: "the sheer quantity of devices is mind boggling, the scaling of text to fit boxes is important it should always try scaling text to fit content before it gives up and wraps"). Shrink to fit comes first. Each TextFit pass, a text whose words don't fit its content box on one line takes a smaller font (inline style.fontSize, from one measurement since width scales with size, then up to 6 corrective 0.5-px steps), down to TypeFloor.ShrinkFloor (Tokens.cs): the larger of the 30-px caption floor (GG-T1878; was 24) and the design size that draws at 12 screen px / 9 dp on this screen. Only if it doesn't fit even at that floor does it go back to its own size and fall back: wrapped text wraps (and hyphenates as above, so no word is cut); a one-line (nowrap) text becomes the marquee, and with Reduce Motion an ellipsis. Nothing clips silently. Re-fitted when its words, its parent's width, the floor (screen shape) or a setting/font changes (the parent's width is read after the shrink lays out, so a parent sized by the label is no feedback loop; a text gives up after 12 re-fits). Code that sets a font size on a shrunk label (a tween, a counter) takes it over for good.
      • Fit-first: every one-line text (buttons, tabs, names, chips, badges, headers, menu-row values, captions) and every short wrapped label (menu labels, field values, headings, counts: six words or fewer).
      • Wraps at its own size (never shrinks): paragraph text, i.e. Ui.Para / Ui.Note / Ui.Empty (kit-text, kit-note, kit-empty), any wrapped text of more than six words, GlossaryText rows (a sentence built of word labels), and anything with the opt-out class no-fit (TextFit.NoFitClass; fit-off still opts out of fitting altogether). The Mercenaries pitch quote (GG-T700) is Ui.Para, so it keeps wrapping. The Abilities bar item label is one line again, X-Potion ×15, shrunk to fit its cell (GG-T701 had moved the count to a second line).
    • The layout audits treat a marquee host and its overlay as handled; automation (clicktext, texts) reads TextFit.SourceOf, the words as given; textinfo?text= reports how a text element is laid out and fitted; setting key=hyphenate value=1 flips the mode.

26.7 The menu kit (GG-T454; owner 2026-11-20)

Design system (GG-T2044): the kit below, with each role's builder, classes and states, the select-then-confirm rule per component, and the layout grid and thumb zone per device shape, is specified in DESIGN_SYSTEM.md §3 to §5 and shown live in docs/design/design-system/index.html.

Amended 2026-11-20 (owner, GG-T454: "the alignment and padding and fontsize and whitespace is horrible nothing looks like it fits together every single menu needs to have one standardized look and feel that can be repeated over and over and over and utilizes space as efficiently as possible"). Every menu screen is built from one kit of roles (Ui.cs, values in Tokens.cs Kit, classes .kit-* in Theme.uss); a screen picks roles, never its own font size, padding or margin.

Role Builder Look
Page title Ui.Header(title, back, …, subtitle) heavy title; an optional subtitle (station level, profile) rides under it in the bar in gold instead of a cramped line below
Page body Ui.PageBody (HubPage does it) centred content column; windows sit 24 px from the stage edge and 16 px from the header, each other and the bottom
Window Ui.Panel(title, fill) padding 16 / 24; heavy title; fill takes the leftover height
Tab strip Ui.Tabs the window under it sits flush on it automatically
List Ui.ListPanel a window that fills the column and scrolls inside itself; two of them split the height evenly (Equip's slots and bag, GG-T452)
List row Ui.MenuRow label + right-aligned value, body, one 132-px target tall, 24 px apart
Row note Ui.Note a sentence under a row, body dim, indented to the row label (72 px)
Section header Ui.Section heavy gold, flush left
Card Ui.Card portrait 120 (compact cards: 96), heavy name, lines below, its buttons in a row under its text (Ui.Actions), same 24-px pitch as rows
Fact Ui.Field a read-only label/value line: dim label in a 220-px column, body value
Detail pane Ui.DetailPanel as tall as its content up to 45% of the column, then it scrolls; heavy heading + dim meta + body sentences
Footer / action bar Ui.Footer the total on the left, the commit button on the right, at the bottom of the screen (POL-C4)
Empty state Ui.Empty body dim, centred

Amended 2026-11-23 (GG-T770): Type has four sizes (title 60, heading 48, body 40, caption 30). Type has one size, TypeScale.Base (§26.6 "One GUI text size"); the roles above differ by weight and colour only. Type has four sizes and one rule: title 60, heading 48, body 40, caption 30. Anything that wraps is body (Ui.Para, POL-A2, the same rule Typography.Paragraphs already enforced for long text, now for every sentence); a single line of meta is caption (Ui.Caption). The 24-px badge size is gone from menus except the title's version tag. Screens that stay bespoke: the Title, story crawls and credits roll, dialogue, the Level Up and results celebrations and the character select (art-led), the talent graph's node cards and the battle bar's slots (fixed-size cells), the Bestiary grid (EvenGrid), and the window editor's live preview (it shows the theme's sample styles).

Amended 2026-11-23 (owner, GG-T712: "every item or place or selectable must be prefixed with a icon so the user knows what they are pressing"). Every tappable row, card, button and list entry leads with a kind icon, so a tap target never reads as plain text (entering a stage used to look like a random line in a wall of text). One call does it: row.KindIcon(RowKind, Texture2D) or row.KindIcon(RowKind, string id) (App/UI/RowIcon.cs, GG-T714). The icon is the kit's .menu-icon (class kind-icon too), 64 design px (Size.Icon), put right after the row's .menu-cursor (first child when it has none), replacing any icon already there. It is fixed: flex-shrink 0, it never shrinks, and the label shrink-to-fits the width left over (GG-T711). Art goes through RowIcon.ArtFor(kind, id); where a kind has no art the row gets that kind's emblem (KindEmblem), so a row is never bare. RowIcon.Badge(icon, RowKind.Cleared | New | Locked) adds a small corner mark for a stage's state. Emblems are drawn with Painter2D as a Somnolith-blue (#7590C8) disc, pewter rim and pale mark, crisp at any size; never font glyphs (GG-LAW-11).

Kind (RowKind) Icon: art, else emblem
Place, Stage the region's board tile Tiles/<theme>-00 (Art.BoardTile); else place pin (Place) or Enter arrow (Stage)
Item ItemIcons/<id>-00; else pouch
Ability AbilityIcons/<id>-00 (or legacy icon); else bolt
Status StatusIcons/<id>-00; else aura ring
Hero, Npc, Keeper the portrait through its Thumbnail framing (swap point RowIcon.ActorThumb, GG-T713); else bust
Bounty the bounty skull (BountySkull, §22.4)
Enter Enter arrow
Back, Close, Confirm left arrow, cross, check
Locked, Cleared, New padlock, check, four-point sparkle (usually as badges)
Menu, Quest, Shop, Station three bars, exclamation, coin, roof over a door
Settings, Save, Quit, Talk gear, save disk, power, speech bubble
Bestiary, NewGamePlus, Crucible, Diamond open book, loop, chalice, cut gem

Entering a stage (owner, GG-T715): it goes through a confirm step that shows who is going into battle, not straight from the stage row.

Art to-do (owner): every kind in the table whose icon is an emblem is a stand-in for real art, to be drawn: place marker, cleared / new / locked badges, Enter arrow, back and close, confirm, quest, station markers, Bestiary, Settings, save and quit, NG+, Crucible, Talk, Diamond Store; plus own board tiles for the five post-game regions, which have none of their own yet.

26.8 App lifecycle on phones (GG-T480)

  • Leaving the app (home button, app switcher, an incoming call: OnApplicationPause(true)) writes the save first, because Android may kill a backgrounded app without warning. The battle itself is not saved: a battle the OS kills is lost and the save is where it was before the stage (the battle only commits on victory, defeat or retreat).
  • Losing focus (the notification shade, a system dialog: OnApplicationFocus(false)) and leaving both hold the game: the current screen gets GameScreen.OnAppSuspended, which opens the battle's pause menu (§GG-T126 pause: the clock, playback and sounds stop), and AudioListener.pause holds the music and every ringing effect mid-clip. Coming back brings the sound back; the battle waits on its pause menu for Resume.
  • Only phones do this. The desktop build keeps running unfocused (the harness drives it in the background) unless it is started with -pauseOnFocusLoss.
  • Quitting writes the save (OnApplicationQuit).
  • Android's back button (and back gesture) arrives as the Escape key and does what Escape does: the screen's OnBack, then the router's Back. With nothing to go back to (the Title, the Camp) it asks "Quit the game? Your progress is saved."; Back again cancels the question.
  • Resuming the onboarding (GG-T1392, GG-T1394). ✅ Built (GG-T1392, GG-T1394, GG-T1398, GG-T1401); python tools/harness.py frontdoor (GG-T1408) plays the uninterrupted path through to Done. Continue and Load ask Onboarding.Next (StoryBeats.Resume) where the save's onboarding stands: Crawl replays the opening crawl from the top (Skip available) and then runs the rest of the Start Campaign sequence; Drill n relaunches that drill from its start; HubIntro opens Camp, whose first visit hands off in CampCoach.OnHub (GG-T1401): after drill 5's To Camp, an in-drill skip, Start Campaign's Skip to Camp or a resume at HubIntro, a Your heroes are ready card opens (Confirm.Notice, named graduation-card: one Lead on button, which Android Back also gives; a chime, a fade and a title pop, with Reduce Motion keeping the sound only). The heroes address the Commander by role ("Drills done, Commander."; a skipper hears "We know our work, Commander."). Lead on then starts the hub-adventure lesson (§25.0.2), and HubIntro -> Done is written when that lesson ends. A skipper (lessons off) sees the card but no lesson, and Done is written as the card appears. Bots, Test Mode saves and demos see neither and are finished silently; practice drills (GG-T1647) never reach it. Another Camp lesson due on that visit waits for the next one, and quitting before Done shows the card again on Continue. A finished onboarding opens Camp as before. The Start Campaign sequencer writes the checkpoint as each step starts (Crawl, then Drill 0); the Drill cleared card writes the next drill, and HubIntro after drill 5. It is persisted with the save on pause and quit. Older saves migrate to Done (save v25). Skip tutorial in a drill (GG-T1398), once confirmed, turns every lesson off (lessons:off, TutorialDone), sets the save flag drills:skipped (Drills.Skip; the drills are not marked cleared), writes HubIntro and goes straight to Camp, whose first visit then finishes the onboarding. Start Campaign's Skip to Camp (GG-T1645, §11.2.1) lands in the same state before any drill is played.

26.9 Target devices (GG-T2025)

Amended 2026-11-28 (GG-T2116, owner: "ok make that be the baseline", "iphone 15 pro"): the target is narrowed to 2023 and newer hardware, with the iPhone 15 Pro (2023, A17 Pro, 1179x2556, 393x852 pt, 59 pt top / 34 pt bottom insets) as the reference device (reference: "iphone15pro" in tools/devices.json). In target: iPhone 15 Pro and 15 Pro Max and every iPhone 16 and 17 model (16e and Air included); the Galaxy S23 series and newer (S23 to S25, FE, Plus, Ultra, S25 Edge); the 2023+ Z Flip5/6 main screen and Z Fold5/6 cover screen. Not in target: the iPhone 12, 13 and 14 families, the base iPhone 15 and 15 Plus, the Galaxy S21 and S22 families. Every device in the file carries inTarget, and out-of-target ones stay for comparison, marked out in DEVICES.md; audit and capture tools default to the in-target set and iphone15pro (iphone17pro stays available). The hardware floor is now chip tier 2 (A16 / A17 Pro and Snapdragon 8 Gen 2 and newer), and the narrowest in-target screens are the Z Fold5 cover (301 dp) and the 360-dp Galaxy S base models. The paragraphs below are the earlier, wider scope (GG-T2025).

Owner, 2026-11-28: the target is the latest Apple and Samsung phones from the last five years: every iPhone 12 to 17 (12 mini, 13 mini, Plus, Pro, Pro Max, 16e and Air included) and every Galaxy S21 to S25 (base, +, Ultra, FE and the S25 Edge), with the Galaxy Z Flip5/6 main screen and Z Fold5/6 cover screen as a should. The iPhone SE and the Flip cover screen (FlexWindow) stay out by default. This widens GG-T724's list (§26.3) for those two families: the iPhone 12 family (A14, 2020), the 12/13 mini (375 pt, 1080 px wide) and the Galaxy S21 family (Snapdragon 888 / Exynos 2100) were below its floor and are now designed and tested for. Pixel phones keep GG-T724's rule; pixel9 and ipad stay as reference shapes for the tools.

  • One source of numbers: tools/devices.json lists all 48 target phones plus the two reference devices, each with portrait px (and Samsung's default FHD+ size for its QHD+ panels), pt/dp scale and logical size, ppi, portrait safe-area insets top/bottom/left/right in device px, aspect, top refresh rate, chip, a chip tier (1 to 3) and release year, and marks any field that is an estimate. docs/devices/DEVICES.md explains every field and cites the source of each figure. Tools take device sizes from that file, not their own tables (GG-T2026 moves scenario.py, uiaudit.py and harness.py onto it).
  • Fifteen shapes, each with a representative id a tool runs for one window per shape: iphone-mini (iphone13mini), iphone-notch-390 (iphone14), iphone-notch-428 (iphone14plus), iphone-island-393 (iphone16), iphone-island-430 (iphone16plus), iphone-402 (iphone17pro), iphone-440 (iphone17promax), iphone-air (iphoneair), galaxy-20x9 (galaxys21), galaxy-fhd (galaxys25), galaxy-qhd (galaxys25ultra), galaxy-flip-main (galaxyzflip6), galaxy-fold-cover (galaxyzfold6cover), and the reference shapes pixel-20x9 (pixel9) and ipad (ipad).
  • Fit: every target phone is inside 9:23 … 9:16 and fills the screen, including the Z Fold5 cover (0.3903, stage 1170 x 2998, GG-T2115). The smallest drawing scale is the Fold5 cover's 0.77 screen px per design px; the smallest physical GUI text is about 10 dp there and 12 to 13 on the 360-dp Galaxy S base models and the iPhone minis. The aspect range, the stage sizes and TypeFloor do not change.
  • Hardware floor: the A14 and the Snapdragon 888 / Exynos 2100 (chip tier 1). The minimum OS (iOS 17, Android 12 for the Play bundle) covers every target phone: the S21 family shipped with Android 11 but was updated through Android 15, and the iPhone 12 runs iOS 17 and later.
  • Camera cutouts (GG-T2119, owner 2026-11-28: "need all iphone emulations to include the camera cutout based on manufacturer specs"): every iPhone in tools/devices.json carries cutout (Dynamic Island or notch: width, height, top offset and corner radius, device px with pt alongside) and screen_radius (the display's rounded corners); the sources and which figures are estimates are in DEVICES.md. When tools/scenario.py or tools/uiaudit.py launches the dev player as an iPhone, it sends that geometry to the automation deviceframe endpoint, and Dev.DeviceFrame draws the cutout and the four corners in black (UI Toolkit Painter2D) over every element, scaled to the window, so the live window and every capture show what the hardware hides. It exists only in development builds and only after that endpoint is called; a Galaxy punch-hole can use the same shape (type: punch) once its figures are recorded.
  • Text size (GG-T2114): body and caption text draws at 14.7 physical dp or more on every in-target phone. GuiType.TargetDp is 15, and a screen narrower than the iPhone 15 Pro (2.56 in) takes up to 1.2x more (ReferenceWidthIn, NarrowBoostMax); the Z Fold5 cover draws 56-px text (17.2 dp). Per-device table in DEVICES.md. TextFit wraps what no longer fits; battle HUD rows stay fixed (9.0).
  • Not yet confirmed: Samsung publishes no safe-area figures, so every Galaxy inset (32 dp top, 24 dp bottom) is an estimate, and so are the dp widths of the S23/S24/S25 FE, the Z Flip5 and the Z Fold5 cover. A reading of Screen.safeArea on a real device replaces them in tools/devices.json.

27. Story crawl (no dialog)

Amended 2026-11-16 (GG-T386, owner: "after every 5 stages have a story scroll"): the per-theme crawls are retired. campaign.json Chapters holds one crawl after every fifth campaign stage (validated: exactly one, in order), played once after that stage's first victory on the way back to Camp, or at the next launch. A save that skipped ahead sees only the latest; a level interlude or a beat crawl due at the same stop waits, so two scrolls never play back to back. Keys crawl:chapter/<id>; the beats are outlined in STORY_OUTLINE.md. Until the story is written in Prose, the Prologue, the eight chapters, the Ending and every conversation show lorem ipsum (Prose draft batches chapters-386, lorem-387).

Amended 2026-11-27 (GG-T1478): a region may again have an entry crawl: a campaign.json theme with HasCrawl has the key crawl:region/<theme>, played once per save (seen-mark region:<theme>), never on a Test Mode save. Same-stop rule: the first victory over a region's last stage plays the next region's crawl on the way back to Camp, inside that stop's chapter scroll (under the region's name) or alone; a region crawl the results screen didn't get to play opens the first launch into the region, before its ThemeStart beats, in one scroll with any chapter crawl still due and the first beat's own crawl. Two scrolls still never play back to back.

StoryCrawlScreen: the theme name (Cinzel) and its campaign.json Crawl text scroll upward at 95 design-px/s over a dimmed theme backdrop; Skip › or a tap anywhere ends it and replaces it with the battle. It plays on the first launch of any stage in a theme — from Adventure or from the results screen's "Next stage ›" (both go through StageLauncher.Launch); the theme is recorded in SaveData.SeenCrawls (and saved) when the crawl starts. Amended 2026-10-09 (timing by scroll speed instead of a 26 s duration). Amended 2026-11-07 (GG-T355): the crawl's words come from Prose (crawl:<themeId>, §27.2); campaign.json holds no text.

No dialog system: no character dialogue, no branching, no cutscenes. Amended 2026-10-19 (owner, GG-T117): character dialogue now exists (§27.1); there are still no cutscenes. Amended 2026-11-02 (GG-T75): the caravan crew's rotating one-line barks (§25.12.1) are not part of the dialogue system: they are not in dialogues.json, have no speakers' portraits, branches, choices, effects or flags, and need no tap. The in-battle "surprise" reinforcement beat (§14.8) stays a lightweight one-line announcement card.

27.0 The story start to finish (GG-T231, owner 2026-11-05: "make the story from start to finish; title screen, new campaign, text scroll … a story crawl at a certain level … a boss … roll credits")

Amended 2026-11-27 (GG-T1305, owner): the story's protagonist is the Commander, the player, a person of Halcyon brought back from the dead who leads the present-day heroes but does not fight (§25.11.2.2); the Warden, the Last Sleeper, is retired as lead. Crawls and conversations below that name a lead hero predate it.

Owner clarification: a "cutscene" is a conversation (§27.1) or a text crawl — no new cinematic system. StoryCrawlScreen now takes any title, text and backdrop, not only a theme's.

  • Prologue. campaign.json Prologue (CrawlDef: Title, Crawl, Backdrop) — "Tithe Day": tithe day at Saltmoss and the crew's run with a stolen Choir caravan. Plays once, right after the last lock on character select (StoryBeats.NewCampaign), then Camp. Never for automation, Test Mode or -demo saves (they don't come through New Game).
    • Amended 2026-11-27 (GG-T1550): Prologue → Opening crawl. ✅ Built (GG-T1363): campaign.json Prologue is now Opening with Pages [{Name, Backdrop}], five pages seeded as placeholders; click-through in docs/design/front-door/ (content model GG-T1363). The Prologue becomes the opening crawl: paged, not scrolled, each page one Prose key crawl:opening/<n> (crawl:opening/1 … crawl:opening/N) over the Saltmoss backdrop; a tap or Next turns the page, Skip › ends it. This section fixes only the key names: the words come from Prose under the story slice (GG-T1256, GG-T1303), and a page may say the player's name through the {commander} text token (§15.4). It plays once per campaign after Start Campaign (was New Game): as built (GG-T1358, GG-T1645) after the team pick and New to Convergence?, then the Founding scene and the tutorial drills, not Camp (§11.2.1). Still never for Test Mode or -demo saves, nor the automation newgame shortcut; a harness that taps Start Campaign (python tools/harness.py frontdoor, GG-T1408) sees it and taps Skip › (crawl-skip).
    • Amended 2026-11-28 (GG-T2065, planner default the owner approved; marked for the owner): the Prologue is played, not read. The "Tithe Day" Saltmoss crawl gives way to the scripted prologue in STORY_SLICE.md (§28.10): the Commander wakes in a Halcyon vault under the Tithe Moors (an outlying tank-house of the Still), the hamlet of Tithe takes Saltmoss's place, and the stolen white tithe caravan is the Tithe Collector's wagon, taken after the bridge rematch. The opening crawl stays, cut to three pages (crawl:opening/1-3) after drill 1. The Collector is the Captain's man, and for the vertical slice the Captain at The Tithe Moors III (greenvalley-03) is the boss: its first victory plays a short slice ending crawl and rolling credits, then Title, with the Lantern Road roadsign dormant. The full game's Ending stays at cathedral-03. The Prose canon's Prologue row (06-arc) is amended once the owner confirms.
    • Amended 2026-12-01 (GG-T2370, built GG-T2344, GG-T2345): the slice ends on the map, not Title. With Features.Slice on (-allfeatures turns it off), the first victory over campaign.json SliceEnding.Stage (greenvalley-03) turns the results screen's Continue into: the Captain's defeat beat when due → the slice ending crawl (crawl:ending/slice) → CreditsScreen in rolling mode → Camp, the player camped on the map. The save flag story:slice-ending records it (cleared by New Game+); never on a Test Mode save. Stages past greenvalley-03 stay locked (Progression.IsStageUnlocked, 571437c2), and the Lantern Road roadsign stays dormant, reading "The road continues". (Scenario: python tools/harness.py sliceending: a boss win on greenvalley-03 reaches the crawl and the credits, then Camp.)
  • Level interlude. Trigger LevelReached (DialogueTrigger.Level, 2+) fires once any roster hero is at that level. It plays on the way back to Camp from the results screen (DialogueRunner.PendingInterlude → StoryBeats.Camp), or at the next launch if that comes first (it's an ordinary beat to PendingBeat). A story beat may open with its own crawl (DialogueDef.Crawl, headed by its Title; story beats only, validated). Content: Lv 10 — "Why We Ran", a crawl on how running turned into fighting, then a talk with the Innkeeper where the player names the crew's motive (flags motive:coin|people|truth|crew: coin, the holds, the truth about the tithe, each other).
  • Boss introductions. Trigger StageStart (Id = stage) plays before that stage's battle, once. Each main-biome finale opens with its boss speaking: Tithe Moors III the Captain (who sold the holds), The Lantern Road III an oni chief on the pass (oni02, GG-T345; placeholder draft text until Prose, GG-T355), Shardfall III a shield-walker (mechaarmor01) guarding the Hierarch's dig, Arkgrave III the Swamp Mistress (the drowned Ark's pilot), Anchor Wastes III a vat-giant (cyclops02) keeping the great Anchor, The Still III the Chronomancer keeping the Still's clocks (GG-T344), Halcyon III a Kiln Guard captain on the spire stair (ceramicknight06, GG-T350; placeholder draft text), The Choir's Cathedral III the Hierarch (its own hierarch class since GG-T350, speaking with the mannequin placeholder art). Each warns that "the rules don't hold here" in general terms; the mechanics themselves are GG-T234's.
  • Ending. campaign.json Ending (CrawlDef + Stage = cathedral-03 since GG-T350, was cityruins-03; backdrop cathedral). The first victory over that stage, after LevelUp and PostBattle as always, turns the results screen's Continue into: the ending crawl ("Still Here") → CreditsScreen in rolling mode (Resources/Credits.txt scrolls up over the ruins at 110 px/s, hold anywhere to fast-forward ×4, Skip ›, a coda line, HeroicAge) → Title. "Next expedition ›" is hidden on that one results screen. The save flag story:ending (Story.EndingFlag) records it; the postgame themes stay open after it and Continue from Title lands in Camp. New Game+ clears the flag, so the ending plays again each cycle. Never on a Test Mode save.
  • Bots play LevelReached/StageStart beats headlessly like every other beat (PlayPendingBeatsHeadless); they never see the prologue, ending or credits.
  • (Tests: StoryArcTests.)
  • Arc summary (GG-T1563). The beat outline is STORY_OUTLINE.md; this section fixes only its shape. Chapters are region-aligned: each chapter crawl opens one or more whole regions and plays once, after the first victory on the last stage before them. The main campaign ends at The Choir's Cathedral III with the Ending crawl and credits; the postgame then runs through the Bloom, the Free Holds, the Underspire, the Drowned Arks, Deep Shardfall and Under the Anchors to Morrow's Shadow, where the player picks the ending and sees its own crawl. When two crawls fall at one stop (a chapter and a region's, or the Prologue and a chapter) they chain into one scroll, the chapter first under its own title. Amended (GG-T1480): campaign.json Chapters now follows the outline's slot table: each chapter's Stage is the last stage of a region (validated: a region's last stage, in campaign order, one per stage; the every-fifth-stage rule above is retired). ch05 shares the Ending's stage and plays at the next arrival at Camp after the credits (Continue from the Title plays a due chapter). Ids and titles are unchanged, so no save migration.

27.1 Dialogue (GG-T117)

Part 7 of 8: 1 · 2 · 3 · 4 · 5 · 6 · 7 · 8