create_class
Create a character class in RPG Maker MZ's Classes.json and get the next unused class ID. Only the name is required; omitted fields use editor defaults, preventing missing traits that break combat.
Instructions
Create a new character class in data/Classes.json. Only name is required; omitted fields use the editor's new-class defaults (EXP curve [30,20,30,30], no traits/learnings, a linear param curve to maxLevel). Allocates and returns the next unused class id. NOTE: a class with no Hit Rate trait (xparam id 0: trait { code: 22, dataId: 0, value: 0.95 }) makes its actors always miss physical actions — pass one in traits for a combat-ready class. Likewise every learned skill's stypeId needs an Add Skill Type trait ({ code: 41, dataId: stypeId, value: 1 }) or the skill-type command never appears (warned, never blocked).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Class name shown in the database | |
| note | No | Note field | |
| dryRun | No | Preview only: return a diff of what would change without writing to disk. | |
| params | No | 8 param growth curves, each maxLevel+1 long: [maxHP,maxMP,atk,def,mat,mdf,agi,luk] | |
| traits | No | Trait objects { code, dataId, value } | |
| maxLevel | No | Highest level the param curve covers (default 99); sizes the params matrix | |
| expParams | No | EXP curve: [basis, extra, accelerationA, accelerationB] | |
| learnings | No | Learned-skill entries { level, skillId, note } |