- 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
34 lines
1.4 KiB
Markdown
34 lines
1.4 KiB
Markdown
# Room TOML Reference
|
||
|
||
Each file in a region’s `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.
|