Take the events off a map
clear_eventsBulk-delete all events on an RPG Maker MZ map in one transaction, or filter by name, event ID, or character sheet. Preview with dryRun before rebuilding to prevent partial maps and duplicate NPCs.
Instructions
Remove every event on a map in one transaction, or only the ones whose name or character sheet you name. This is the call that makes a rebuild script possible: without it, re-painting a map's event layer means one remove_event per event and a half-finished map if the script dies halfway, and a build that runs twice ends up with two of every NPC. dryRun answers with what would go, which is also the quickest way to see a map's cast. The map is rendered in the reply, so you can look at the empty room rather than trust the count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Only events with this exact name | |
| mapId | Yes | ||
| dryRun | No | ||
| eventId | No | Only this one event | |
| characterName | No | Only events drawn from this character sheet, e.g. "!Crystal" |