add_event_commands
Adds multiple commands to an RPG Maker MZ event page by converting human-readable command objects into engine codes, with optional append or replace mode.
Instructions
Add commands to an event page. Commands use human-readable format that gets converted to RPG Maker MZ codes.
Supported command types:
show_text: { type: "show_text", face: "Actor1", faceIndex: 0, text: "Hello!" }
show_choices: { type: "show_choices", choices: ["Yes", "No"] }
transfer_player: { type: "transfer_player", mapId: 1, x: 5, y: 5 }
control_switches: { type: "control_switches", startId: 1, value: 0 } (0=ON, 1=OFF)
control_variables: { type: "control_variables", startId: 1, operationType: 0, operand: 0, value: 100 }
control_self_switch: { type: "control_self_switch", key: "A", value: 0 }
conditional_branch: { type: "conditional_branch", conditionType: 0, param1: 1, param2: 0 }
common_event: { type: "common_event", eventId: 1 }
change_gold: { type: "change_gold", operation: 0, value: 100 }
change_items: { type: "change_items", itemId: 1, operation: 0, value: 1 }
play_bgm: { type: "play_bgm", name: "Town1", volume: 90 }
play_se: { type: "play_se", name: "Decision1" }
wait: { type: "wait", duration: 60 }
fadeout_screen, fadein_screen, erase_event, game_over, return_to_title
comment: { type: "comment", text: "This is a comment" }
label/jump_to_label: { type: "label", name: "start" }
And many more (change_hp, change_exp, battle_processing, shop_processing, etc.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapId | Yes | Map ID | |
| append | No | If true, append to existing commands. If false, replace all commands. | |
| eventId | Yes | Event ID | |
| commands | Yes | Array of command objects with "type" field | |
| pageIndex | No | Page index (0-based) |