create_item
Creates a new RPG Maker MZ item in Items.json with an auto-assigned id, supporting optional fields for price, scope, damage, and effects while validating references.
Instructions
Create a new item in data/Items.json. Only name is worth passing; omitted fields use the editor's new-item defaults (Regular Item, consumable, no effects). Allocates and returns the next unused item id. An effect referencing a missing record throws: Add/Remove State (code 21/22) → state, Learn Skill (43) → skill, Common Event (44) → common event.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Item name | |
| note | No | Note field | |
| price | No | Buy price (sells for half) | |
| scope | No | Target scope (0 none, 1 one enemy, 7 one ally, …) | |
| damage | No | Damage object { type, elementId, formula, variance, critical } | |
| dryRun | No | Preview only: return a diff of what would change without writing to disk. | |
| tpGain | No | User TP gained on use | |
| effects | No | Effect objects { code, dataId, value1, value2 } | |
| hitType | No | 0 certain, 1 physical, 2 magical | |
| itypeId | No | Item type: 1 Regular, 2 Key Item, 3 Hidden A, 4 Hidden B | |
| repeats | No | Number of hits/repeats | |
| occasion | No | Usable: 0 always, 1 battle, 2 menu, 3 never | |
| iconIndex | No | Icon index (IconSet.png) | |
| consumable | No | Consumed on use | |
| animationId | No | Animation id shown on use | |
| description | No | In-game description text | |
| successRate | No | Success rate percent |