Short answer: Select your when event and use its editor. + Add else-when branch adds another condition that is tested only if the conditions above it failed; + Add otherwise branch adds a final else that runs when every condition in the chain fails. The chain checks top to bottom and plays the first branch that passes - so at most one branch ever runs, and with an otherwise branch, exactly one always does.
How a chain works
A when block on its own plays its lines only while its condition holds. Adding branches turns it into a chain:
else when- another condition, checked only if everything above it failed. Add as many as you need.else(the otherwise branch) - no condition; it runs when every condition above failed. A chain has at most one, and it always comes last.
Reading order is the rule: top to bottom, first match wins. The reader never sees two branches from the same chain.
Adding branches
Insert the when itself from the insert palette (it lives in the Logic category). Then, with the when selected:
- + Add else-when branch inserts a new arm with a placeholder condition and a starter line, placed before the otherwise branch if you have one. Edit its condition with the same condition editor the
whenuses. - + Add otherwise branch appends the final
elsewith a starter line. The button only appears while the chain doesn't have one yet.
The otherwise row itself has nothing to configure - conditions live on the when and its else when arms.
What it looks like in the timeline
The whole chain renders as one amber container: the when header on top, each branch inside it behind its own rail, so you always see which lines belong to which branch - even when chains nest inside each other, the rails stack and stay readable. Each branch has its own collapse chevron with a count of the lines inside, so a long chain folds down to its headers.
A Folio example
In the Script view, the same chain looks like this:
when courage >= 3:
narrate "You step forward and knock."
else when has_key:
narrate "You let yourself in through the side door."
else:
narrate "You wait in the hallway, listening."
Each else when sits at the same depth as its when, with its own indented lines; the else comes last.
Editing, moving, and deleting
The chain moves and deletes as a unit where that keeps your story safe: dragging the when carries every branch with it, and deleting the when removes the whole chain. Deleting a single else when or else row removes just that branch and its lines. Branch rows never travel alone - they only ever move with their when.
Importing from Ren'Py
If you imported a Ren'Py project, if / elif / else chains arrive as when / else when / else automatically, as one container - no rebuilding needed.