delete_record
Delete an RPG Maker MZ database record by nulling its slot, checking for dangling references and refusing if any exist. Use force to override or dryRun to preview.
Instructions
Delete one database record (actor, class, skill, item, weapon, armor, enemy, troop, state, or common_event) by nulling its slot — ids never shift, so nothing else is renumbered. Reports every reference the deletion would leave dangling (an actor's class, a troop member, a Change Items / Shop / Battle Processing command, a skill effect, the starting party, …; found with the same audit validate_references runs, see coverage in the response) and REFUSES, writing nothing, when there are any — pass force: true to delete anyway, or dryRun: true to preview the references without throwing. Deleting skill 1 (Attack), skill 2 (Guard) or state 1 (Knockout) is always reported, since the engine hard-codes them. Returns { type, deleted: { id, name }, referenceCount, references[], coverage }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The id of the record to delete | |
| 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. |