Condition Block

Condition Block

The Condition block branches to a different chapter based on the current values of your variables. Unlike a Choice, where the player picks, a Condition automatically decides the path based on accumulated state (scores, affection, flags, and so on).

Structure

A Condition block can have multiple branches, each with two fields:

  • Condition Expression (condition) — The expression to test. Example: score >= 80, affection > 10, met_teacher == true.
  • Go to chapter (jumpLabel) — The chapter to move to when the expression is true.

The game evaluates branches top to bottom and moves to the chapter of the first one that is true. Later branches are not checked after a match. If the destination chapter does not exist in the list, play does not stop — it continues with the block after the Condition.

The else Branch

Press [+ Add default branch] in the details under the line to add a branch whose condition is else at the end. It runs when no earlier condition matches. Having an else branch is the safe pattern.

Details-Under-the-Line UI

When you select a Condition line, the details that open right below it give you the following. The Condition block itself is inside [More ▾] on the insert bar.

  • Add Branch button to add a new branch
  • Remove button on each branch to delete it
  • Destination chapter chosen from a dropdown, so typos are impossible. A branch that points to a chapter not in the list appears in red so you can spot it immediately.
  • An arrow icon (Open chapter) next to each branch's destination chapter jumps straight to that chapter. The line you arrive at is briefly highlighted in purple, and the ← Condition (in 'x') chip under the Chapter line brings you back to this Condition line.
  • A warning when an expression is empty (it is then always true) or cannot be read (it is then always false)
  • A list of variables currently used in your story shown as blue tags, for quick reference when writing the expression

Supported Expression Syntax

Condition blocks support the following:

  • Comparison operators: ==, !=, >, <, >=, <=
  • Comparisons between variables and values: score >= 80, player_gender == Female, met_teacher == true
  • Special value: else (default branch)

Keep each branch to a single simple comparison (variable operator value) for maximum reliability. If you need more complex logic, chain multiple Condition blocks or precompute values into another variable.

Examples

Ending Based on Score

Variable: score = 0
...
Condition:
  - score >= 80 → ending_perfect
  - score >= 50 → ending_ok
  - else        → ending_bad

Gender-Based Branch

Condition:
  - player_gender == Female → female_route
  - player_gender == Male   → male_route
  - else                      → neutral_route

Affection Threshold

Condition:
  - affection >= 10 → confess_scene
  - else            → friend_scene

Usage Tips

  • Order matters — Branches are checked top-down, so put more specific conditions first. For example, place score >= 80 above score >= 50.
  • Never skip else — You may not anticipate every case, so add a final else branch as a safety net.
  • Prepare chapters first — Like Choices, the destination chapters must exist before you link to them.
  • Close each branch — If a branch chapter has no Ending or Go to chapter at its end, play continues into the next chapter in the list. Decide where each branch ends.
  • Initialize variables — Make sure every variable referenced in a condition has a sensible initial value set early in the game.
  • Verify in Flow View — Condition branches also show up as arrows in Flow View, which is the easiest way to double-check complex structures.

End of Chapter

That wraps up the Advanced Features chapter.