Add a database row
create_database_entryClaim a blank slot in an RPG Maker MZ database table, mirroring the editor's add button. Creates a new row when none is free and merges the given fields.
Instructions
Claim a row in a database table the way the editor does. MZ keeps these as 1-based arrays in which the row's id is its array index, and it never removes one: a fresh project ships unused slots as complete rows with an empty name, and those names are what keeps an id from being reused under a saved game. So this takes the first blank slot, and only grows the table when none is left — pass no id and it behaves like the editor's add button. The field shape comes from the blank slot itself, else from a blank sibling, else from copyFrom (or the last row, which the reply reports as basedOn because you have just copied a real entry's stats, icon and all). fields is then merged over that, shallowly, exactly as patch_database_entry does. System.json has no rows and MapInfos is the map tree, so those two refuse; use patch_database_entry and create_map. There is no delete: blanking a name is what removal means here, and it is a patch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Row to claim (default: the first blank slot, else a new one at the end) | |
| table | Yes | Actors, Classes, Skills, Items, Weapons, Armors, Enemies, Troops, States, Animations, Tilesets or CommonEvents | |
| fields | No | Fields to set on the new row, e.g. {name, iconIndex, description} | |
| copyFrom | No | Copy this existing row's fields as the starting point |