Game Manual

Build a Better Bot — design pages, rendered from the repo docs.

Story — scenes the circuit owes you, driven by progression

settled decided — build to this page

The game tells you a story, and the battles are its mechanics. You arrive at an arena league’s televised qualifier circuit (the fiction: qualifier-circuit.md) with a TX-5 terminal, and your first bot is chosen at the imprinting station, not on a menu: you wake one of four sleeping chassis by imprinting a thread into it. What you actually chose is a mind: the thread in that chassis is the character, and the story from there is theirs. Slinky, Mini, Talon and Stomper each have a persona you meet, something you discover about them, and a growth that costs something (starter-arcs.md). The circuit and the Sixteen are the ground those arcs are walked over. Characters arrive one at a time, only by speaking; there is no roster screen.

Presence. Who is standing there decides who talks. The engine tells a scene which awakened threads are present where its occasion happened — the crew of the bot at the arena, the one at the shop, or the threads no station has taken — and the scene picks its speaker from them. It lists them longest waiting first: the engine remembers, across the whole game, when each thread was awakened and when its last line played, so threads that have never had a line come first in the order you woke them, then the rest by their last line, oldest first. A line any of them could say goes to the first, and the lead passes around over the game (STY-027, STY-036). Dialog written for a thread you never woke simply does not play. A scene may also declare that it waits for one: a voice-gated scene is no candidate until its character is there, which lets one character’s arc run as a chain of its own without ever holding up the story everyone shares.

Scenes. A scene is a unit of conversation with a gate and an exit. Scenes are content, declared in the story pack the engine resolves (asset-packs.md) and gated the way a level offer is gated: completed levels and how many were won, owned bots and glitches, scenes already played. The engine names at most one pending scene, a pure function of progression state, the moment you are standing in and the occasions still owed. A gating scene must be played to proceed. Level selection refuses in town; during a level the arena and the shop both hold — at a round boundary, as a shift starts, or once the turn that owed the scene has finished — bots in place and the shop’s floor untouched, until you answer. That wait is the story hold, one of the four the engine names, and it refuses every other command the way the rest do (occasions.md § Holds). A non-gating scene is company rather than an instruction: it rides along beside a game that keeps playing, can be missed, and nothing waits on it.

Triggers. A trigger names the occasion a scene plays at — what has just happened, not where the player is standing. A writer picks from nine:

at:just happened
game_starta new game began
game_resumeda saved game was picked back up
level_starta level opened
battle_rounda round of a named level is about to play
level_enda level ended
in_townno fight is running and the player is free
shop_shiftone of your bots is working a running level’s shop
bracket_run_startyou entered the Sixteen
bracket_run_endyour run there ended

These nine are the story’s share of one occasion vocabulary; a scene may also answer scene_complete — another scene reporting its outcome — and every occasion read off the activity log (occasions.md § Occasions).

A level_end trigger narrows the way a battle_round does: by level:, by outcome: (victory / defeat — a stalemate ends as a defeat, and so does recalling the arena bot mid-fight, which forfeits it), or by both, and it must name at least one. “Any defeat” is an outcome and no level. The engine stamps the outcome onto the level-end moment itself, so no progression fact records a loss anywhere and the trigger survives save and resume.

bracket_run_end narrows by the same outcome: and needs nothing else — a season taken is a victory, an elimination a defeat — so one beat answers a championship and another the town’s response to a season ending. No other occasion takes an outcome.

Occasions overlap. A moment answers to more than one occasion, so a writer names the most specific one that says what they mean. A level ending is its own occasion and also the town the player lands in; a new game is both its start and the town it opens on. A station’s occasion joins whichever of those the moment already names rather than replacing it — a shift is worked while you watch a fight, since a shop stands only while a level runs — so shop_shift is owed for exactly as long as one of your bots is at that level’s shop. A season’s boundaries work the same way: a run begins inside the selection that entered it and ends inside the match that ended it, so both ride beside the level occasion they happen within. in_town stays the safety net for a scene whose prerequisites come true while you are elsewhere. Two scenes owed at once are settled by catalog order, so the order in a scene’s front matter is its priority.

A scene plays at the station its occasion happened at, which the engine publishes with the pending scene: a round’s exchange over the live arena, a shift’s over the floor, and an occasion read off the log at the station it happened at (occasions.md § Occasions says which). Everything else plays over the town. A gating scene owed during a level holds the arena and the shop together; a non-gating one stops neither.

Outcomes. A conversation ends by reporting one declared outcome — an id and parameters from closed domains — and the engine applies its effects through the operations progression already owns: grant a token, recruit a bot, awaken a thread, unlock or lock a building, research a node, unlock a chassis specialization, grant a glitch, or record a flag. Beside the outcome, a scene reports which threads’ lines played, in order, and the marks its @remember lines wrote down, which the story build declares under the scene’s remembers. The engine refuses a voice no awakened thread speaks as, or a mark the scene does not declare, with nothing changed; once the outcome applies, each line becomes its thread’s last, and later scenes read the marks as the remembered briefing fact (STY-036, STY-037). A walk reports neither. Nothing else crosses the boundary, and every story fact (scenes played, flags recorded, last lines, marks remembered) lives on progression and rides its save; a progression reset forgets them. The exit is all-or-nothing: an outcome whose effects cannot all apply to the state they meet applies none of them and leaves the scene pending, so the retry that follows is safe. A gating scene left pending forever holds the game, so the catalog refuses at load a scene declaring an effect that can refuse without the gate proving the state unapplied — unlock_building against locked_buildings, awaken_thread against dormant_threads, recruit_bot against unowned_bots, unlock_glitch against unowned_glitches, and a bare research_node against unpowered_nodes. A recruit_bot that names the pilot thread it awakens answers to dormant_threads for that thread as well, since the bot’s negative says nothing about a thread the player woke another way. One that names no thread flies the bot on its own primary, which the declaration never promised — so that awakening tolerates a primary already awake rather than refusing, and the writer owes no gate for a pick they did not make. A recruit_bot naming a bot the stable already holds refuses, in the rehearsal and live (OTC-015). lock_building locks an unlocked building and writes one BUILDING_LOCK entry; it tolerates a building already locked, writing none, so it joins no gate (OTC-014). Two declarations need no gate: an ensure-shaped effect, which tolerates the state rather than refusing it — research_node or unlock_building with ensure, the form shop-opens takes so it replays after a progression reset that left the shop open — and a field written $name in a scene briefed on the fact reporting that state, where the script picks a value no fixed gate could have named. Most choices record flags — tone and allegiance the writing can pick up later; the outcomes that change what you own are the rarer kind. The starter is recruited by its wake scene at the imprinting station, and the story is the only thing that awakens a thread — the stable places them and never trades them.

Two effect kinds ensure rather than do, for a hand-over that cannot know what you already hold: a recruit arrives with its first two starting stars unlocked and their mods researched, so the machine can work the moment it is placed, and a researched node powers every node behind it. Each mints exactly the tokens it spends, so a step you already have is a no-op rather than a refusal and no pool of yours moves.

Hand-overs. The scenes that open a building or grant a glitch are plain stubs — a statement of what they grant or open, with no speaker — until the maintainer writes their story, and none asks the player anything. In the Base Levels, base-opens after T1 opens the Stable and workshop-opens after T2 the Workshop; the-conduit, mid-T3 when the starter throws the conduit switch, grants the first hand slot and hotwire, and the-station-opens at T3’s win opens the Power Station’s building only; the-salvage-yard right after it says a salvage pet is needed and offers T4; shop-opens, at yard-rescue’s win (T4), recruits hermit as your shop bot and opens the shop, and shop-kit right after it researches hermit’s first shop mod; demand-arrives and scrub-arrives, after T5 and T7, grant a hand slot holding one glitch each; gate-opens, after T9, opens the ring road; wipe-order, at the Imprinting Station after T6, locks it for good; grand-loop-opens and hill-9-opens, after T10 and T11, open the faction bases behind those roadblocks; and bridge-ahead, after T12, grants a hand slot holding maglock and opens Persephone. The Base Levels’ § Scenes lists each one’s trigger, gates and effects.

Anchors. A scene may name the one interface element its lines are about in anchor:, and while it plays that element wears the halo (landscape stage § 11). The names are a closed registry, adminui/src/lib/anchors.js, so scene data holds no selector: a fixed name (start, hand, hand.point, shop.tickets, research.node and the rest), a family and its parameter (row:<building>, town:<building>, hand.glitch:<glitch>, machine:<x>,<y>), or $actor or $target. The catalog refuses any other name, a building or glitch the world lacks, and a machine: cell that is not two whole numbers (STY-038). The pending scene publishes its anchor, with $actor and $target resolved to bot:<serial> for the bots the occasion that owed it names, or no anchor when that occasion names none (STY-039). The three scenes that tell the player what to do point this way: pick-a-stall at Point’s slot (hand.point) in the first round of stable-hopper, assign-tickets at the shop’s tickets (shop.tickets) at T5 yard-scavengers’ first shop shift, during its opening, and pick-a-level, riding along in town, at the level ahead’s row (ahead.row).

Authoring. Scenes are written in a first-party dialog format, one file each (adminui/story/<name>.scene.md, writer’s guide in that directory’s README): prose, choices, and — as YAML front matter — the gate, the exit, and the artwork the scene wears (story-artwork.md). The body is line-oriented and indentation is its only structure, so a choice’s consequences, a conditional’s branch and one thread answering another are all one indent in. just story compiles each into the script the client plays and the declaration the engine gates on, both into the story pack. The source is what lives in git; the artifacts ship separately, so rewriting a scene rebuilds neither service and invalidates no saved game — the client fetches its script from the pack the engine resolved. Scripts are deterministic: the same briefing and the same cast always read the same. The format’s design is story-format.md.

The front door. A visitor lands on a title splash — never silently costing a game by arriving — and leaves it into a fresh game, which opens on its prologue, or back into the game their browser holds, exactly where it was put down. Once the prologue ends, the town map is free to explore and its story marker stands over the imprinting station (DOR-001).

The imprinting station. The building a new game boots with (exams, the Imprinting Station) holds four bays under one screen, each bay a chassis asleep: Stomper, Talon, Slinky and Mini. The player file’s imprinting block names the bays’ chassis in bay order, the screen’s line and the name of the TX-5 key that imprints, Epoch (IMP-001). The bays are offered while the stable holds none of their chassis, and the station waits in the snapshot’s waiting_at meanwhile, so the map’s story marker stays on it (IMP-004). Entering it plays the-imprinting-station. Selecting a bay lights it and the screen and owes that chassis’s bay scene (stomper-bay, talon-bay, slinky-bay, mini-bay); as that scene closes, the Epoch key rises into the top of the right column, where Point’s slot stands in a battle. Pressing the key recruits nothing: it owes the chassis’s wake scene (stomper-wakes and its three siblings), and that scene’s one outcome recruits the chassis, which withdraws the bays (IMP-003). The imprinted bay then stands empty and the others sleep. select_bay and start_imprint are refused during a level, under any hold, for a chassis no bay holds and once the bays are withdrawn; the key is refused for a bay not selected; and the selected bay is saved (IMP-002).

Waiting at a building. A scene whose trigger is a building’s surface_opened waits until the player enters that building. The snapshot’s story block names each surface whose opening would start a scene now (STY-034), and the town map draws the story marker over each such building (town-map.md). While the engine is still starting the splash says “Loading…” in place of its doors, and its sound flip appears only once there is music to switch on. The town lives at /town.

Scene lifecycle emits to the activity log (STORY_PENDING, STORY_COMPLETE); dialogue lines are conversation-internal and never emit.

Quick start. A quick start walks the prologue and recruits the starter itself, which withdraws the bays, so none of the imprinting station’s scenes plays (RST-007). It then walks the gating scenes owed at its moment in catalog order and applies each one: with its declared default outcome, each parameter the first value of its one_of whose effects rehearse, or, declaring none, with its one outcome where that takes no parameters and its effects rehearse. It stops at the first scene that does not gate or that asks the player something it cannot answer, and leaves that scene owed (RST-011). Quick start also records every tutorial level won and walks the level_end scenes those wins owe by the same rule (RST-012). That is how a quick-started game arrives past the thirteen base levels with the Power Station open, the hand graduated holds (RST-013), the bench cleared, and the shop staffed by shop-opens’s default: the first starter the player does not field (OTC-015). A level quick start or the checkpoint walk records won was never fought, so the walk also spends, in catalog order, each gating scene whose trigger is an in-level occasion naming that level, level_start, a switch thrown or a bot exhausted alike: each is played with the walk’s answer, or recorded played where the walk has none, and a later start of that level owes none of them. A scene whose voices the threads present do not admit is passed over. The level’s level_end scenes are left to the walk’s end, which plays them with the victory outcome, so a scene on a defeat is never spent (STY-033).

A scene file may also carry stub: { plays, must, gates }, three strings for the writer: when the scene plays, what must happen in it, and what its result gates. The story build keeps the notes out of the script and the scene declaration, and the /editors/story design seam carries them as written (STY-032).

Derived specs — engine/bbsb_engine/test/story/story_spec.yaml · STY gating & resolution · OTC outcomes · NAR narrative events · DOR the front door · IMP the imprinting station · ART scene art. Quickstart’s stand-in for skipped scenes is RST-007 and RST-011 in progression_spec.yaml. The design decisions: narrative-engine.md.

Terms

TermMeaning
story stubA scene’s stub: when it plays, what must happen in it, and what its result gates, as notes for the writer.
default outcomeA scene’s default: the outcome quick-start and the checkpoint walk apply in the player’s place.
anchorA scene’s anchor: the interface element its lines are about, named from the closed registry in adminui/src/lib/anchors.js (STY-038).
imprinting stationThe building exams, named the Imprinting Station: four bays under one screen, offered until the stable holds one of their chassis (IMP-004).
bayOne place at the imprinting station holding one chassis asleep; selecting it owes the chassis’s bay scene.
imprintPress the TX-5’s imprint key on the selected bay: it owes the chassis’s wake scene, which recruits the chassis (IMP-003).