add_event_command
Insert a command into an RPG Maker XP event page. Supports all standard event codes and correctly handles branch indentation.
Instructions
Add a single command to an event page (for Show Text prefer add_show_text). Common XP codes: 101=Show Text first line (401=continuation lines), 102=Show Choices [[texts...],cancelType] (each 402 branch repeats its choice text and must stay in sync), 111=Conditional Branch, 121=Control Switches, 122=Control Variables, 123=Control Self Switch [ch,0=on/1=off], 125=Change Gold, 126=Change Items, 201=Transfer Player, 209=Set Move Route (509=continuation), 223=Change Screen Color Tone, 355=Script. indent must increase by 1 inside branch blocks; the trailing code-0 terminator is preserved automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapId | Yes | ||
| command | Yes | ||
| eventId | Yes | ||
| position | No | Insert position in the command list (default: end) | |
| pageIndex | Yes |