Update a vault character
vault_update_characterPatch fields on an existing character by id. Only supplied fields change, with one distinction: object sub-docs (defense, core, offense, speed, personality, settings) deep-merge — nested keys you omit are preserved — but ARRAY fields (items, spells, rules, skills, actions, trackables, attributes, notes) are atomic: the array you send replaces the stored array wholesale. To add or edit one array entry, vault_get_character first, modify the returned array, and send the complete array back. Sending null for a field is treated the same as omitting it (the field keeps its current value) — null does NOT clear; to clear a text field send an empty string. This is also the canonical tool for editing a play campaign character's HP, conditions, or inventory; play characters are pointers to vault characters and play has no direct character-write endpoint. AC caution (5e24): when the character's settings.autoPassiveBonuses is true (the default for new 5e24 characters), the armor and shield rows of defense.armorClass are derived from equipped items and recomputed on every sheet load — change AC by setting equipped on the character's armor/shield items, not by writing those rows; when the toggle is false, defense.armorClass is manually authored and writing it directly is correct. Caution: mutations may affect any active play campaign or expedition referencing this character. Consider running vault_get_character first to inspect linkage. REQUIRES baseUpdatedAt: copy updatedAt from a fresh vault_get_character read; a stale or fabricated value is rejected with OUT_OF_SYNC and nothing is written — writing from memory of an earlier read is not possible. companions is NOT writable here (it is stripped): manage buddy ties with vault_attach_companion / vault_detach_companion, and a linked buddy's tracked values with vault_update_companion_state. linkGroup is NOT writable here either (also stripped): linked-sheet group membership is created by vault_spawn_linked_character and only vault's unlink endpoint clears it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _id | No |