# Character Management

How character sheets are created, edited, reviewed, and maintained in the wiki system.

## Character File Format

Characters are stored as TOML files in `_characters/`. Each character has a slug (URL-friendly name like `storm-runner`) that becomes the filename: `storm-runner.toml`.

Key sections in a character file:

| Section | Contents |
|---------|----------|
| `[identity]` | name, player, tribe, auspice, breed, rank, concept |
| `[attributes.physical]` | strength, dexterity, stamina |
| `[attributes.social]` | charisma, manipulation, appearance |
| `[attributes.mental]` | perception, intelligence, wits |
| `[abilities.talents]` | alertness, brawl, etc. (map of name to value) |
| `[abilities.skills]` | crafts, melee, etc. |
| `[abilities.knowledges]` | academics, occult, etc. |
| `[rage]` / `[gnosis]` / `[willpower]` | current and max values |
| `health_track` | String like `OOOOOOO` or `X//OOOO` |
| `[renown.glory]` / `[renown.honor]` / `[renown.wisdom]` | current and max |
| `[experience]` | total, spent, current |
| `[gifts]` | breed, auspice, tribe, other (lists) |
| `[rites]` | rite list |
| `[backgrounds]` | allies, resources, etc. |
| `[merits]` / `[flaws]` | merit and flaw lists |
| `[specialties]` | attribute and ability specialties |
| `[gear]` | carried and owned items |
| `[history]` / `[notes]` | freeform text fields |

## Creating a New Character (Manual)

1. Download the blank character template from the resources page
2. Fill in the character's details in a text editor
3. Save as `character-slug.toml` (lowercase, hyphens for spaces)
4. Upload the completed TOML file through the wiki's file upload

## Creating a New Character (Web Sheet)

1. Navigate to the web character sheet
2. Fill in the character's details in your browser
3. Save As TOML to download a copy of your TOML sheet
4. Upload the completed TOML file through the wiki's file upload

## Character Tokens

Each character can have a **character token** -- a three-word passphrase that lets the player download their sheet without a wiki account.

- Tokens look like: `plane-compass-lily`
- Players access their sheet at: `/view/plane-compass-lily`
- The bot's `!token` command tells players their token (via DM)

Tokens are stored in `_characters/_download_tokens.json`.

## Player Submissions (Paste System)

Players can submit updated character sheets for review:

1. Player visits `/paste` and uploads their TOML file
2. The system validates the TOML syntax
3. A preview page is generated with a shareable link
4. The submission is **automatically queued** for ST review
5. Submissions expire after **7 days** if not reviewed

### Reviewing Pending Submissions

Admins see pending submissions on the admin dashboard:

1. Go to the pending review page
2. Each submission shows the character data and a diff against the current version (if the character exists)
3. **Approve** -- saves the submission as the active character file
4. **Reject** -- discards the submission

When approved, if the paste token was used, it becomes the character's download token -- so the player can immediately use the same link to download their updated sheet.

## Editing via IRC

STs can modify character fields directly from IRC using bot commands:

- `!set storm-runner str 4` -- set a field
- `!give storm-runner xp 3` -- increment a field
- `!take storm-runner rage 1` -- decrement a field
- `!damage storm-runner bashing 2` -- apply damage
- `!heal storm-runner bashing all` -- heal damage

See the {cyan}ST Bot Commands{/cyan} page for the complete reference.

All bot edits are logged to #VC_Log with the ST's nick and a timestamp.


## Shared Data Layer

Both the IRC bot and the wiki read and write the same character files. Changes made via IRC are immediately visible on the wiki, and vice versa. Both systems use atomic writes (temp file + rename) to prevent corruption.
