create_common_event
Create a reusable event-command list as a new common event in an RPG Maker MZ project. Validates the command list before saving; use force to override structural errors.
Instructions
Create a new common event (reusable event-command list) in data/CommonEvents.json. Only name is required; omitted fields use the editor's new-slot defaults (empty command list, trigger 0 = call-only, switchId 1). Allocates and returns the next unused id. A structurally invalid command list refuses the write (nothing is saved) — pass force: true to override.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| list | No | Event-command list { code, indent, parameters }; must end with code 0 | |
| name | Yes | Common event name shown in the database | |
| force | No | Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless. | |
| dryRun | No | Preview only: return a diff of what would change without writing to disk. | |
| trigger | No | How it runs on its own: 0 None (call-only), 1 Autorun, 2 Parallel | |
| verbose | No | Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool. | |
| switchId | No | Switch that gates an Autorun/Parallel trigger (ignored when trigger is 0) |