Files
mudserver/world/town/rooms/ROOMS.md
AI Agent e5e7057650 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
2026-03-14 16:40:09 -06:00

34 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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.