FolioTier 1
choice
Player decision — present a list of options that branch the story.
Parameters
| Parameter | Kind | Required | Default | Notes |
|---|---|---|---|---|
| prompt | string | no | — | Optional prompt rendered above the option list. Omit for a bare option list (the canonical 'silent menu' shape — Ren'Py creators sometimes use this as a quick branch). |
| option label (per child line) | string | yes | — | Each child line is `option "<label>"` followed by an optional `-> <scene-target>`. The label is the button text the player sees. With a scene target, picking the option jumps the story to that scene; without one, the option records the pick and execution advances to the next step in the same scene (the Folio shape for a decorative Ren'Py menu whose branches are `pass`). |
| option guard (`if <cond>` tail per option) | expression | no | — | Optional per-option `if <cond>` tail (after the scene target if one is present) hides the option when the condition is false. The condition is a Folio expression (`flag`, `not flag`, `count >= 3`, `a and b`, etc.). Hidden options never render in the player; they don't count against the visible option list and the player never sees them. |
Canonical example
choice "What do you do?":
option "Go inside" -> living-room
option "Stay on the porch" -> porch-wait if mood >= 3
option "Glance around"
option "Leave" -> endmenu:
"What do you do?"
"Go inside":
jump living_room
"Stay on the porch" if mood >= 3:
jump porch_wait
"Glance around":
pass
"Leave":
returnchoice is Folio's menu — the branching primitive. The header line
opens the block (choice [prompt]:); each indented option line is
one button. Two shapes are supported per option: with -> <target>
the option routes the story to that scene; without it the option
records the pick and execution advances inline to the next step in
the same scene.
Notes
Options are rendered in source order. Each option line can carry an
if <cond> tail (after the scene target if one is present) so the
option only appears when the condition is true — that's the supported
way to do a conditional choice. The condition follows the same Folio
expression grammar as a top-level if verb (bare identifier, not <ident>, comparison, and / or). Hidden options never render in
the player. Don't try to wrap option lines in an outer if; the
parser doesn't support nesting choice options inside other block
constructs.
choice "Pick one":
option "Always visible" -> a
option "Only after first run" -> b if visited
option "High mood only" -> c if mood >= 3
Target-less (inline-advance) options
An option line without -> <target> records the player's pick and
then advances to the next step in the same scene — no scene jump, no
episode end. This is the Folio shape for a decorative Ren'Py menu:
a menu: whose if/elif branches are pass, where the menu exists
to give the player a moment of agency but the next line of dialogue
plays regardless of which option was picked.
choice "":
option "I'm just looking around"
option "Your bra is showing a little"
p "Get out of my room right now!"
Inline-advance options accept the same do <effects> and if <cond>
tails as routing options; they just omit the -> clause.
Importer behaviour
The importer maps Ren'Py's menu: to choice: 1:1 for the simple
shape above, including Ren'Py's "text" if <cond>: guarded options
(the condition lowers from Ren'Py syntax — True → true, False →
false — when the shape is a bare identifier, negated identifier, or
a comparison with a bool/numeric literal; anything else falls through
to AI translation). Menus with embedded code (Python in option
bodies, non-jump actions, set between options) lower into a
choice plus a small per-option scene that runs the body before the
routing — see the migration report for the per-fragment translation.
The decorative-choice pattern (call screen my_menu(...) followed by
an if/elif chain whose every branch is pass) lowers to inline
target-less options. The migration report's AI translator recognises
this shape and emits the target-less form.
See also
jump— direct routing without a player decisionif— conditional routing on a state expressionscene-flow—next ->,option ->and the rest of the routing vocabulary