Add TOML reference docs for all world data types

- world/MANIFEST.md: manifest.toml and directory layout
- world/races/RACES.md: race schema (stats, body, natural, resistances, etc.)
- world/classes/CLASSES.md: class schema (base_stats, growth, hidden, guild)
- world/guilds/GUILDS.md: guild schema and [growth]
- world/spells/SPELLS.md: spell schema and types
- world/town/REGION.md: region.toml
- world/town/rooms/ROOMS.md: room schema and exits
- world/town/npcs/NPCS.md: NPC schema, race/class resolution
- world/town/objects/OBJECTS.md: object schema and [stats]

Made-with: Cursor
This commit is contained in:
AI Agent
2026-03-14 16:40:09 -06:00
parent 7b6829b1e8
commit e5e7057650
9 changed files with 588 additions and 0 deletions

33
world/town/rooms/ROOMS.md Normal file
View File

@@ -0,0 +1,33 @@
# Room TOML Reference
Each file in a regions `rooms/` folder (e.g. `world/town/rooms/`) defines one room. The room ID is `"<region>:<filename_stem>"` (e.g. `town_square.toml` in region `town``town:town_square`). Exits reference these full IDs.
## Top-level fields
| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `name` | string | Yes | — | Room title shown to players. |
| `description` | string | Yes | — | Room description. Can be a multi-line string (`"""..."""`). |
| `exits` | table | No | `{}` | Map of direction → room ID. Direction keys are lowercase (e.g. `north`, `south`, `east`, `west`, `up`, `down`). Values are full room IDs (e.g. `"town:tavern"`). |
## Example
```toml
name = "Town Square"
description = """\
You stand in the heart of Thornwall. A worn stone fountain sits at the \
center, water trickling quietly. Cobblestone paths branch in every \
direction."""
[exits]
north = "town:tavern"
east = "town:market"
west = "town:temple"
south = "town:dark_alley"
```
## Notes
- NPCs and objects are placed in rooms via their own TOML: NPCs have a `room` field, objects have a `room` field. The server builds room contents from those references.
- Exits can point to rooms in other regions; use the full ID (e.g. `"dungeon:entrance"`).
- The world `manifest.toml` must list a valid `spawn_room` ID that exists.