bg(id: string, transition: string?) → Step
Background / place id. Any id from game.stage.Places (attic_room,
market_street, tavern, ...) or Rules.BACKGROUNDS; the Director falls back to
the nearest existing painting while a place's art is missing.
| arg | type | description |
|---|
| id | string | |
| transition | string? | |
show(castId: string, slot: string, expression: string?, enter: string?, flip: boolean?, pose: string?) → Step
Show a cast member in a slot (left/center/right/farLeft/farRight).
pose: a pose id from game.stage.Cast (nil = the cast member's default pose).
| arg | type | description |
|---|
| castId | string | |
| slot | string | |
| expression | string? | |
| enter | string? | |
| flip | boolean? | |
| pose | string? | |
hide(castId: string, exit: string?) → Step
| arg | type | description |
|---|
| castId | string | |
| exit | string? | |
expr(castId: string, expression: string) → Step
| arg | type | description |
|---|
| castId | string | |
| expression | string | |
pose(castId: string, pose: string, expression: string?) → Step
Switch a cast member's pose in place (keeps the expression unless given).
| arg | type | description |
|---|
| castId | string | |
| pose | string | |
| expression | string? | |
react(castId: string, kind: string) → Step
A little body reaction: "hop" | "shake" | "nod" | "recoil" | "sigh" | ...
(whatever game.stage.Stage.react knows; skipped before the stage has it).
| arg | type | description |
|---|
| castId | string | |
| kind | string | |
mood(id: string) → Step
Lighting mood / time of day ("dawn" "day" "dusk" "night" "candle" "royal" ...).
| arg | type | description |
|---|
| id | string | |
weather(id: string) → Step
Weather / atmosphere ("rain" "snow" "petals" "fog" "embers" "clear" ...).
| arg | type | description |
|---|
| id | string | |
transition(style: string) → Step
A one-shot scene transition ("glitch" "iris" "wipe" "flashback" ...).
| arg | type | description |
|---|
| style | string | |
say(speaker: string, a: string?, b: string?, id: string?) → Step
say(speaker, text) | say(speaker, expression, text) |
say(speaker, expression|nil, text, lineId). lineId is the stable voice id
"<chapter>.<nnn>"; game/story/tools/number_lines.luau fills missing ones.
| arg | type | description |
|---|
| speaker | string | |
| a | string? | |
| b | string? | |
| id | string? | |
n(text: string, id: string?) → Step
| arg | type | description |
|---|
| text | string | |
| id | string? | |
choice(prompt: string?, options: { any }) → Step
options: { { id, text, flag?, value?, steps?, requiresFlag?, affect? } }
affect = { mercy = n, mira = n } nudges the route meters (game.story.Routes).
| arg | type | description |
|---|
| prompt | string? | |
| options | { any } | |
ifFlag(name: string, value: any, thenSteps: { Step }, elseSteps: { Step }?) → Step
value nil = "flag is set and not false". value may also be a table
{ atLeast = n } / { below = n } for numeric meters.
| arg | type | description |
|---|
| name | string | |
| value | any | |
| thenSteps | { Step } | |
| elseSteps | { Step }? | |
setFlag(name: string, value: any) → Step
| arg | type | description |
|---|
| name | string | |
| value | any | |
affect(meter: string, delta: number) → Step
Nudge a route meter ("mercy" | "mira") by delta, with a small toast.
| arg | type | description |
|---|
| meter | string | |
| delta | number | |
music(cue: string?, fade: number?) → Step
| arg | type | description |
|---|
| cue | string? | |
| fade | number? | |
sfx(id: string, volume: number?) → Step
| arg | type | description |
|---|
| id | string | |
| volume | number? | |
ambience(id: string?) → Step
| arg | type | description |
|---|
| id | string? | |
voice(id: string) → Step
A voiced line (game.audio.Audio.voice); plays as the next say starts.
| arg | type | description |
|---|
| id | string | |
shake(strength: number?, duration: number?) → Step
| arg | type | description |
|---|
| strength | number? | |
| duration | number? | |
pushIn(amount: number?, duration: number?) → Step
| arg | type | description |
|---|
| amount | number? | |
| duration | number? | |
resetCam(duration: number?) → Step
| arg | type | description |
|---|
| duration | number? | |
flash(color: string?, duration: number?) → Step
| arg | type | description |
|---|
| color | string? | |
| duration | number? | |
fx(name: string) → Step
| arg | type | description |
|---|
| name | string | |
ambient(preset: string?) → Step
| arg | type | description |
|---|
| preset | string? | |
wait(seconds: number) → Step
| arg | type | description |
|---|
| seconds | number | |
fade(toBlack: boolean, duration: number?) → Step
| arg | type | description |
|---|
| toBlack | boolean | |
| duration | number? | |
card(title: string?) → Step
Full-screen chapter card (defaults to the chapter's title).
| arg | type | description |
|---|
| title | string? | |
cg(art: string) → Step
A full-screen event CG (game.ui.UI.cg): "exile", "finale" or a texture
path. Waits for the player to continue; seeing it unlocks it in the GALLERY.
| arg | type | description |
|---|
| art | string | |
scene(name: string, title: string?) → Step
A scene start: a silent checkpoint (save slots and CONTINUE resume here).
title is the human label a save slot shows ("Ren's attic room").
| arg | type | description |
|---|
| name | string | |
| title | string? | |
checkpoint(name: string) → Step
A resume point: saves the game here; CONTINUE restarts from it.
| arg | type | description |
|---|
| name | string | |
label(name: string) → Step
| arg | type | description |
|---|
| name | string | |
whisper(puzzleId: string, difficulty: number) → Step
A Software Whisper. Saves a checkpoint "whisper:<puzzle>" first, retries on
System Error, then grants Rules.whisperReward(difficulty, ...) via State.
| arg | type | description |
|---|
| puzzleId | string | |
| difficulty | number | |
reward(key: string, r: { xp: number?, gold: number?, renown: number?, text: string? }) → Step
One-time story reward (keyed so replays and resumes never pay twice).
| arg | type | description |
|---|
| key | string | |
| r | { xp: number?, gold: number?, renown: number?, text: string? } | |
toast(kind: string, text: string) → Step
| arg | type | description |
|---|
| kind | string | |
| text | string | |
complete( ) → Step
Marks the chapter (or side quest) complete, pays its bonus once, and saves.
decideRoute( ) → Step
Decides the ending route (game.story.Routes) and stores it in flag "route".
ending( ) → Step
The ending / credits screen (records the ending unlock for this player).