level_up_character
Increase a character's level in D&D 5e campaigns, handling HP calculation, class features, spell slots, ability score improvements, and multiclassing automatically.
Instructions
Level up a character by one level.
Increments level, calculates HP increase, adds class features, updates spell slots for casters, handles ASI at appropriate levels, and manages subclass selection. Requires a rulebook to be loaded.
Multiclass: if class_name is a class the character doesn't have yet, this acts as a multiclass dip — adding that class at level 1.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name_or_id | Yes | Character name, ID, or player name | |
| class_name | No | Which class to level up (for multiclass characters). If omitted, levels up primary class. | |
| hp_method | No | HP increase method: 'average' (default, PHB standard) or 'roll' | average |
| asi_choices | No | JSON dict for ASI: {"strength": 2} or {"strength": 1, "dexterity": 1} | |
| subclass | No | Subclass to select (at subclass level, typically 3) | |
| new_spells | No | JSON list of new spells learned: ["fireball", "counterspell"] | |
| player_id | No | Player ID for permission check (omit for single-player DM mode) |