Build a 5e24 monster
vault_build_monsterCreate a complete 5e24 monster character in one call. Replaces the vault_create_character + multiple vault_update_character pattern for monster authoring — fully typed input schema, so structured fields cannot be silently stringified. Caller passes source-text values (final AC, skill bonuses, attack bonuses); gateway computes the stored base values, derives proficient / expertise / misc flags, formats spell-list markdown, creates recharge trackables, generates the Challenge / Legendary Actions / Speed-alternate-form notes. Sets type: 'monster', settings.autoPassiveBonuses: false, and the derived core.experience automatically. The authoring guide at vault_get_authoring_guide({ rulesetCode: '5e24', entityType: 'monster' }) documents every field's source-text meaning and is the conventions reference for what shape to send. Returns the created character document.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ac | Yes | AC block. `total` is the value the sheet should display (source-text value, like '16'). Gateway computes the stored base by subtracting DEX modifier (with medium/heavy armor weight caps) and any shield/magic/misc bonuses. Per the guide Rule 1. | |
| cr | Yes | Challenge Rating. Must be one of the canonical 5e24 values: 0, 0.125 (CR 1/8), 0.25 (CR 1/4), 0.5 (CR 1/2), or any integer 1-30. Gateway looks up XP reward + level-equivalent XP + proficiency bonus. | |
| hp | Yes | Maximum hit points. | |
| gear | No | Gear listed on the stat block ('Greatsword, Splint Armor'). Each becomes an items[] entry with `equipped: false` (monsters don't use equip slots) per Rule 19. Server-side template fill adds the four currency items separately. | |
| name | Yes | Display name. Required. | |
| size | Yes | Size text — single value ('Medium') or variable form ('Medium or Small') per the guide Rule 18. Stored verbatim in `core.size`. | |
| saves | No | Saving throw bonuses for the proficient ones only. Gateway derives `attributes[].proficient = true` and a `misc` adjustment so the sheet's `ability + PB + misc` lands on the source bonus. | |
| speed | Yes | Speed block. `walk` is the base walking speed in feet. Non-walking modes (climb / fly / swim / burrow) become rules[] Ability entries with the listed range. `alternateForm` carries the parenthetical text from lycanthrope-style stat blocks ('40 ft. in boar form') per the guide Rule 5; lands in notes[]. | |
| senses | No | Senses other than passive perception: darkvision, blindsight, tremorsense, truesight. Each becomes a rules[] Ability entry with `name` ('Darkvision') and `detail` ('120 ft.'). Passive Perception is NOT authored — sheet derives it from the Perception skill. | |
| skills | No | Skill bonuses for proficient / expertise skills only. Gateway derives the proficient + expertise flags + misc so the sheet total matches the source bonus per the guide Rule 6. | |
| traits | No | Trait entries (Web-Dweller, Molten Body, Pack Tactics, etc.). Use `summary` for parenthetical usage limits per Rule 14 (e.g. 'Legendary Resistance' name + '3/Day, or 4/Day in Lair' summary + body description). Use `detail` for the kind of short qualifier on entries like Darkvision (but darkvision itself goes under `senses`). | |
| actions | No | Action entries. `type` per the guide Rule 3 (Melee / Range / Special / Reaction / Legendary / Bonus). For attacks, pass `attackBonus` + `attackAttribute` + `damageDice` + `damageType` + `damageAttribute`; gateway back-derives `attack.misc`. For ranged spell attacks (Hurl Flame etc.) use the spellcasting attribute, not strength/dexterity. `recharge: '5-6'` (or '6', '4-6') creates a matching trackables[] checkbox the sheet renders as a cooldown. | |
| ruleset | No | Only '5e24' is supported. The authoring guide and the conversion math are 5e24-specific; other rulesets will land via their own build tools. | |
| abilities | Yes | Six ability scores as numbers. Gateway computes modifiers, attack/damage/save/skill/initiative derivations. | |
| alignment | Yes | Alignment text, e.g. 'Unaligned' or 'Neutral Evil'. | |
| languages | No | Languages text, source-exact (e.g. '—' or 'Common, Draconic, telepathy 60 ft.'). Stored in `core.languages`. | |
| immunities | No | 5e24 combined Immunities text (damage + condition, semicolon-separated): 'Fire, Poison; Frightened, Poisoned'. Use this when the source says 'Immunities'. | |
| hitDiceSize | No | Hit-die size mapped from creature size per 5e24 MM: Tiny d4, Small d6, Medium d8, Large d10, Huge d12, Gargantuan d20. Defaults to d8 when omitted (Medium creatures, by far the common case). | |
| resistances | No | Resistances row, source-exact text. | |
| creatureType | Yes | Creature type — source text, e.g. 'Elemental', 'Humanoid', 'Dragon (Chromatic)'. Preserved verbatim into `core.race` per the guide Rule 16 'preserve original text'. | |
| hitDiceCount | Yes | Number of hit dice (the count, e.g. 12 for a creature with 12d8 listed in HP). | |
| spellcasting | No | Innate spellcasting block per the guide Rule 4. Gateway formats the spell list as markdown with two-space hard breaks between frequency rows and italic spell names: `**At will:** *detect evil and good* \n**1/day each:** *commune*, *raise dead*`. Lands as a single rules[] Ability entry named 'Innate Spellcasting'. | |
| legendaryIntro | No | Legendary Actions intro paragraph (the prose about how legendary actions work for this creature). Per the guide Rule 8, lands in notes[] under name 'Legendary Actions'. Individual legendary action entries go in `actions[]` with `type: 'Legendary'`. | |
| additionalNotes | No | Any free-form notes[] entries the LLM wants to author beyond the auto-generated Challenge / Legendary Actions / Speed-alternate-form rows. Use sparingly — most stat-block content has a dedicated structured field above. | |
| initiativeBonus | No | Override the initiative bonus only if the listed value differs from the DEX modifier. Per the guide Rule 17, gateway sets `offense.initiative.misc = listed − DEX-mod`. | |
| vulnerabilities | No | Vulnerabilities row. | |
| damageImmunities | No | 5e (2014) split form: damage-only immunities. Use only if the source says 'Damage Immunities' as a separate row. | |
| damageResistances | No | 5e split form: damage-only resistances. Use only if the source says 'Damage Resistances'. | |
| conditionImmunities | No | 5e split form: condition-only immunities. Use only if the source says 'Condition Immunities' as a separate row. | |
| damageVulnerabilities | No | 5e split form: damage-only vulnerabilities. | |
| sourceProficiencyBonus | No | Override the PB derived from CR. Use only when the source stat block explicitly lists a non-standard PB (e.g. a CR-low legendary creature with PB +5). For PB +7 and above the high-PB misc compensation per the guide Rule 15 kicks in automatically. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||