build_conditional_branch
Builds a conditional branch block (condition + then/else commands) for RPG Maker MZ event insertion, supporting switch, variable, gold, item, actor, and self-switch conditions.
Instructions
Build a Conditional Branch block (111 condition + then-branch + optional 411 Else + 412 closer, each branch terminated like the editor) for insertion via insert_event_commands. Condition types: switch, self_switch, variable, actor_in_party, gold, item. Provide thenBranch/elseBranch as EventCommand[] (e.g. from other builders). Read-only: returns { commands }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indent | No | Indentation level of the block (default 0) | |
| condition | Yes | Conditional branch condition | |
| elseBranch | No | Commands for the Else branch; presence (even empty) adds the 411 Else block | |
| thenBranch | No | Commands to run when the condition is true (default empty) |