build_show_choices
Generate RPG Maker MZ Show Choices event commands with per-choice branches and optional cancel handling for direct insertion into events.
Instructions
Build a Show Choices block (102 opener + a 402 branch per choice + optional 403 When-Cancel branch + 404 closer, each branch terminated like the editor) for insertion via insert_event_commands. Pass per-choice branches (each an EventCommand[] — e.g. from build_show_text) to fill the branch bodies. Read-only: returns { commands }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indent | No | Indentation level of the block (default 0) | |
| choices | Yes | The choice labels shown to the player | |
| branches | No | Commands per choice (same order as choices); omitted/short = empty branches | |
| position | No | Choice window position (default right) | |
| background | No | Choice window background (default window) | |
| cancelType | No | Without a cancelBranch: 0-based choice index the Cancel button maps to, or -1 Disallow (default -1) | |
| defaultType | No | 0-based default (highlighted) choice, or -1 none (default 0) | |
| cancelBranch | No | Commands for a "When Cancel" branch (adds a 403 block; cancel routes here) |