create_enemy
Create a new enemy in RPG Maker MZ by supplying just a name; unused fields get editor defaults, next ID is auto-assigned, and skill/drop references are validated.
Instructions
Create a new enemy in data/Enemies.json. Only name is required; omitted fields use the editor's new-enemy defaults (100 HP, one Attack action, no drops). Allocates the next unused enemy id and returns { enemy, warnings? } (warn-by-default: a battlerName not found in img/enemies is flagged, never blocked). Throws if an actions[].skillId or a dropItems[].dataId (item/weapon/armor by kind) references a record that does not exist. NOTE: an enemy with no Hit Rate trait (xparam id 0: trait { code: 22, dataId: 0, value: 0.95 }) always misses physical actions — pass one in traits if the enemy should land basic attacks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| exp | No | EXP granted when defeated | |
| gold | No | Gold granted when defeated | |
| name | Yes | Enemy name shown in battle and the database | |
| note | No | Note field | |
| dryRun | No | Preview only: return a diff of what would change without writing to disk. | |
| params | No | 8 base params: [maxHP, maxMP, atk, def, mat, mdf, agi, luk] | |
| traits | No | Trait objects { code, dataId, value } | |
| actions | No | Action patterns { skillId, conditionType, conditionParam1, conditionParam2, rating } | |
| dropItems | No | Drop-item objects { kind, dataId, denominator } | |
| battlerHue | No | Battler hue rotation 0-360 | |
| battlerName | No | Battler graphic filename (img/enemies) |