Read a character's 5e24 level-up plan
vault_get_levelup_optionsRead the level-up plan for a 5e24 character — the same computation vault's web wizard renders. Without classRuleId: the CHOOSER (the character's class entries with stored levels, the multiclass candidates each with warn-only prerequisite warnings[], xp.minimumForNext, atMaxLevel). A character with NO class entries (a hand-made sheet) gets RECORD mode instead: needsClassRecord: true plus recordOptions[] (every usable base class with subclasses[] and its subclassLevel) — record the existing classes with vault_record_pc_classes first, then re-read; the target plan and vault_level_up_pc reject a class-less character. With classRuleId: the TARGET PLAN for advancing that class one level — features[] (gained at the new level) / subclassFeatures[] / growth[] (held rules whose choice counts grew; their counts are DELTAS, "pick N more") each carrying its open choice blocks in the creation-option shape, plus multiclassGrants (entering a new class: fixed proficiency lines + skill/tool pickers), hitPoints {hitDie, average, conModifier}, prerequisiteWarnings[] (multiclass entry is warn-only, the player may proceed), spellSlots (combined multiclass pool preview when 2+ classes contribute), and xp {current, minimumForNewTotal}. Add subclassRuleId (at a subclass level, before committing the pick) to preview that candidate's features. ruleChoice pools arrive prerequisite-FILTERED — every listed option is one the character qualifies for at the level being gained. Read this before vault_level_up_pc and key every pick off what it returns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| characterId | Yes | `_id` of the character to level (must belong to the calling user). | |
| classRuleId | No | Omit for the CHOOSER (the character's class entries with their stored levels, the multiclass candidates with warn-only prerequisite warnings, the XP floor for the next level, atMaxLevel). Supply a base Class rule `_id` — one of the chooser's `classEntries[].classRuleId` to advance a held class, or a `multiclassOptions[]._id` to enter a new class at level 1 — for the TARGET PLAN: `features[]` / `subclassFeatures[]` / `growth[]` (each feature in the creation option shape with its open choice blocks: `choice` {label,count,options}, spellChoices (each block carries `prepared` — true = its spells land always-prepared and are EXCLUDED from the preparedSpellPicks pool), spellListChoices (same `prepared` flag), preparedSpells, proficiencyChoices, abilityScoreBump; `growth[]` entries are already-held rules whose counts grew this level — their `count`s are DELTAS, "pick N more"), `multiclassGrants` (when entering a new class), `hitPoints` {hitDie, average, conModifier}, `prerequisiteWarnings[]` (warn-only), `spellSlots` (the combined multiclass pool preview, null unless 2+ contributing casters), `openPickCount`, and `xp` {current, minimumForNewTotal}. ruleChoice pools arrive PREREQUISITE-FILTERED (an unqualified pick is also rejected on apply). | |
| subclassRuleId | No | With classRuleId, previews a tentative subclass pick before committing: the candidate's features (and their open choices) resolve into `subclassFeatures[]`. The pick itself still travels in `vault_level_up_pc.abilityChoices`, keyed by the class's subclass-choice ability. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||