Write a row the player can hold or cast
make_itemCreate or rewrite an RPG Maker MZ Items, Weapons, Armors or Skills row, compiling named effects and traits into valid engine JSON and checking type ids.
Instructions
An Items, Weapons, Armors or Skills row in one call, with the effects and equipment rules spelled in words. The effect shape is the whole reason this exists: MZ stores an item effect as {code, dataId, value1, value2} — 11 recovers HP as mhp × value1 + value2, 12 MP, 13 TP, 21 and 22 add and remove a state, 31 and 32 add a buff and a debuff (dataId is the parameter, value1 the turns), 33 and 34 remove them, 41 is the special (0 = escape), 44 runs a common event — while a trait on the same row is {code, dataId, value} with one key. Send the trait's value to an effect and the engine computes mhp × undefined, floors it to NaN, and adds NaN to the actor's HP: a number the bar cannot draw and the save file now has to carry. This compiles the words into the two shapes and refuses a state, parameter or common event the project does not have. The type ids are the other quiet failure: an item whose itypeId is not 1 or 2 is never listed — MZ has no item-type name list, the menu reads those two numbers and $dataSystem.itemCategories decides whether the tab is open at all — and a weapon whose wtypeId matches no weapon type cannot be equipped by anyone, so both are checked against System.json and said out loud. Idempotent by name, like the rest of the layer: re-running a build script rewrites the same row instead of adding one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Rewrite this row instead of making one | |
| icon | No | Index into img/system/IconSet.png | |
| name | No | ||
| note | No | ||
| price | No | ||
| scope | No | 0 none, 1 one enemy, 2 all enemies, 3 random, 7 self, 8 one ally, 9 all allies, 10 party, 11 dead ally | |
| speed | No | Action order bonus, the engine's own field | |
| table | No | Default Items | |
| damage | No | ||
| dryRun | No | ||
| mpCost | No | Skills only | |
| params | No | Weapons and armors: the flat parameter change when equipped | |
| tpCost | No | Skills only | |
| tpGain | No | ||
| traits | No | Weapons and armors: the engine's own {code, dataId, value}, single value | |
| atypeId | No | Armors: System.armorTypes | |
| effects | No | ||
| etypeId | No | Weapons and armors: the equipment slot, System.equipTypes | |
| itypeId | No | Items: 1 for the Item tab, 2 for the Key Item tab. MZ keeps no item-type name list, so any other number leaves the row out of the menu | |
| repeats | No | ||
| stypeId | No | Skills only: the type from System.skillTypes, by name or id | |
| wtypeId | No | Weapons: System.weaponTypes — a row nothing names cannot be equipped | |
| copyFrom | No | ||
| message1 | No | Skills only: the battle log line, `X uses …` | |
| message2 | No | Skills only: the second battle log line | |
| occasion | No | 0 any time, 1 menu only, 2 battle only, 3 never — never is not the same as unbuyable | |
| consumable | No | ||
| animationId | No | ||
| description | No | ||
| successRate | No |