reset_table
Wipe a database table except chosen IDs to start authoring your own RPG Maker MZ database. Preview changes with dryRun, keep core records, avoid dangling references.
Instructions
Clear a whole database table (actor, class, skill, item, weapon, armor, enemy, troop, state, or common_event) except the ids in keep — e.g. reset_table('skill', { keep: [1, 2] }) wipes the RTP skills but keeps Attack/Guard, the usual first step before authoring your own database with batch_create. Kept records stay at their own id; the rest become null and trailing empty slots are trimmed (the table is [null] when nothing is kept). Like delete_record it REFUSES, writing nothing, when the removal would leave references dangling (map events giving removed items, troops of removed enemies, …) unless force: true; use dryRun: true first to see what disappears and what would break. Returns { type, kept[], removedCount, removed[], referenceCount, references[], coverage } (lists are capped at 100).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keep | No | Ids to keep (each must exist); omitted = remove every record | |
| type | Yes | Which database table: actor, class, skill, item, weapon, armor, enemy, troop, state, or common_event | |
| 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. |