How do I add an 'else' or 'else when' branch?

Last reviewed Thu Sep 24 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

Short answer: Select your when event and use its editor. Else when adds another condition that is checked only when the conditions above it are false; Otherwise adds a final else that plays when no condition in the chain is true. 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:

  • Else when inserts a new arm with no condition yet and a starter line, placed before the otherwise branch if you have one. Until you pick a condition the arm never plays: its timeline row shows a "needs a condition" chip and the Problems panel lists "Branch needs a condition". Choose a variable with the same condition editor the when uses (headed "Else, plays if…") and both go away.
  • Otherwise appends the final else with a starter line. The row only appears while the chain doesn't have one yet.

Both are dashed add rows under the Branches list, on the when and on every else when arm. The otherwise row itself has nothing to configure - conditions live on the when and its else when arms.

The Branches list

The editor of a when or an else when shows the chain as a numbered ladder: the when is 1, each else when the next number, and the otherwise branch sits at the bottom with a down arrow. Each rung prints its condition on one line (hover it, or open it, to see all of it); the branch you are editing is highlighted and tagged editing. Click a rung to open that branch.

Some branches can never play, and the ladder says so:

  • An arm that still needs a condition reads "needs a condition" and is tagged Never.
  • An arm that an earlier branch always catches is tagged Can't play, with the reason under it - for example, trust >= 5 and has_lantern below a branch 2 of trust >= 3 reads "Branch 2 is true whenever this one is, and it is checked first." Move it above, or narrow the earlier branch.
  • An arm that compares a variable with the wrong kind of value (a true/false compared as a number, say) is tagged Can't play too, because that comparison is never true.

This check reads only the conditions as written, never the values in a preview, and it only speaks up when it is sure. The Problems panel lists an arm an earlier branch catches as "Branch can't play" (a warning; it never stops the scene saving), and a wrong-typed comparison as "Type mismatch".

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.

To change which condition is checked first, reorder the else when arms with the up and down arrows in the Branches list; each arm carries its lines with it. The when itself always stays first and the otherwise branch always stays last, and a branch row cannot be dragged out of its chain on the timeline.

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.

Was this helpful?

Still stuck?

Open a ticket at vizno.com/contact and someone on the team will help.

More in Authoring