screen
Shows or hides a screen defined in screens.json from the story — any role (hud, modal, scene).
{ "type": "screen", "value": "minimap" }
{ "type": "screen", "value": "minimap", "show": false }
{ "type": "screen", "value": "credits", "mode": "replace" }
In script.txt:
[screen minimap]
[screen minimap hide]
[screen credits replace]
Usually you need
| Field | Type | Default | Effect |
|---|---|---|---|
value | string | — | Screen id (required) |
show | bool | true | true pushes the screen; false removes that id from the stack |
All fields
| Field | Type | Default | Effect |
|---|---|---|---|
value | string | — | Screen id from screens.json |
show | bool | true | Show or hide |
mode | "push" | "replace" | "push" | How to show. "replace" pops the current top screen, then pushes. Ignored when show is false |
when | expression | — | Skip the command when falsy (JSON / Mode B meta) |
Unknown ids error at runtime (same path as a bad screen:id button). Hiding an id that is not stacked is a no-op.
Auto HUD vs this command
game.json → session.hud_screen (default "hud") still auto-shows one HUD when a play session starts. Use screen to show extra HUDs, modals, or scene boards mid-story, or to hide them again.
Several role: "hud" screens can stay up together; each push is independent. Persistent HUDs with the same id replace themselves on push.
Related
- Screens — roles, stack, auto HUD
- Save and session —
hud_screenauto-show - Planes and slots —
roleand planes - Screen object — screens.json API
- Button / hook action
"screen:<id>"— same stack; still valid for UI chrome