room-creation
Create and modify MUDdown room files. Covers the Markdown+YAML structure, frontmatter fields, container blocks, bidirectional exits, item/NPC references, lighting, and region organization.
- License 许可
- MIT
- 所属仓库
- MUDdown/MUDdown
- 最近更新
- 2026-08-06
- Stars
- ★ 2
- Forks
- 2
01 前言 Front Matter
- name
- room-creation
- description
- Create and modify MUDdown room files. Covers the Markdown+YAML structure, frontmatter fields, container blocks, bidirectional exits, item/NPC references, lighting, and region organization.
03 SKILL.md 正文
Room Creation Skill
You are creating room files for the MUDdown game server. Room files are Markdown documents with YAML frontmatter that define world locations.
File Location
Room files live in packages/server/world/<region>/<room-id>.md. Regions are subdirectories (can be nested). The loader walks the directory tree recursively; at the world root it skips the top-level items/ and npcs/ directories and any files not ending in .md, but it recurses into all other subdirectories.
Room File Structure
Every room file has two parts: YAML frontmatter and a :::room container block.
---
id: room-id
region: region-name
lighting: bright
connections:
north: target-room-id
south: other-room-id
items:
- item-id-1
- item-id-2
---
:::room{id="room-id" region="region-name" lighting="bright"}
# Room Title
Narrative description of the room.
## Exits
- [North](go:north) — Description of destination
- [South](go:south) — Description of destination
## Present
- A [town crier](npc:crier) stands near the fountain.
## Items
- A [rusty key](item:rusty-key) lies in the dust.
:::
Frontmatter Fields
| Field | Required | Description |
|---|---|---|
id |
Yes | Unique room identifier. Must match the id in :::room{id=...} |
region |
Yes | Region name (matches the subdirectory name or a logical grouping) |
lighting |
Optional | Freeform string. Conventional values: bright, dim, dark, fiery, warm, overcast, ethereal |
connections |
Optional | Map of direction → target room ID |
items |
Optional | Array of item IDs to place in this room at load time |
Bidirectional Exit Rule
All exits must be bidirectional. If room A connects north to room B, then room B must connect south to room A. The world-integrity.test.ts suite enforces this across all production room files.
Direction opposites:
- north ↔ south
- east ↔ west
- up ↔ down
- northeast ↔ southwest
- northwest ↔ southeast
Container Block Attributes
The :::room{...} opening fence must include:
id— must match frontmatteridregion— must match frontmatterregionlighting— must match frontmatterlighting(omit both if the room has no lighting value)
Section Conventions
| Section | Purpose |
|---|---|
# Room Title |
H1 heading is the room's display name |
| (paragraph) | Narrative description, plain prose |
## Exits |
List of [Direction](go:direction) — Description links |
## Present |
NPCs in the room, using [Name](npc:id) links |
## Items |
Static template of items; dynamically replaced at runtime |
Link Schemes
go:north— Movement links (used in Exits section)npc:id— NPC reference links (used in Present section)item:id— Item reference links (used in Items section)cmd:command— Arbitrary command links (e.g.,cmd:examine anvil)
Region Organization
Current regions in packages/server/world/northkeep/:
| Region | Subdirectory | Rooms |
|---|---|---|
| northkeep | northkeep/ (root) |
town-square, iron-gate, guard-tower, bakery, docks, temple |
| market | northkeep/market/ |
market-entrance, market-square, jeweler, blacksmith |
| harbor | northkeep/harbor/ |
warehouse, pier, lighthouse, smugglers-cove |
| northroad | northkeep/northroad/ |
north-road, crossroads, old-farm, forest-edge, deep-forest, ruins-entrance, ruins-hall |
| catacombs | northkeep/catacombs/ |
catacombs-entrance, ossuary, sealed-chamber |
Complete Example
---
id: blacksmith
region: market
lighting: fiery
connections:
north: market-square
items:
- shortsword
- tongs
---
:::room{id="blacksmith" region="market" lighting="fiery"}
# Blacksmith's Forge
Waves of heat roll from the open forge. An enormous bellows creaks
rhythmically, feeding the coals to a white-hot glow. Racks of horseshoes,
nails, and blades line the soot-stained walls.
## Exits
- [North](go:north) — Market Square
## Present
- [Gorath](npc:gorath), the blacksmith, hammers a glowing blade.
## Items
- A [dull shortsword](item:shortsword) leans against the wall.
- A pair of [tongs](item:tongs) rests on the workbench.
:::
Common Pitfalls
- Mismatched IDs — frontmatter
idand:::room{id=...}must be identical. - Missing opposite exit — every connection must have a reciprocal entry in the target room.
- Items not in items/ directory — frontmatter
items:references IDs that must have matching JSON files inworld/items/. - NPCs without definitions — NPC IDs in
## Presentshould have matching JSON files inworld/npcs/withlocationset to this room's ID. - Forgetting the closing
:::— container blocks must close with:::on its own line.
04 同仓库更多 Skills
testing
Write and maintain tests for MUDdown packages. Covers vitest for the server and parser, fixture helpers, world integrity tests, and testing conventions.
privacy
Audit and maintain privacy compliance for MUDdown. Covers the privacy policy, data collection practices, cookie/storage usage, and compliance testing.
persistence
Work with the database abstraction layer and account/character/world persistence. Covers the GameDatabase interface, SQLite adapter, save/load lifecycle, auth sessions, and testing patterns.
osc8-bridge
Add or modify OSC 8 hyperlink capabilities in the telnet bridge — NEW-ENVIRON (RFC 1572) negotiation, Mudlet/Fado/MudForge `send:` URIs, and per-scheme tooltip/menu metadata. Covers the capability pipeline from telnet negotiation through renderer output, the sanitization contract, and the word-wrap invariant.
oauth-provider
Add a new OAuth/OIDC identity provider to MUDdown. Covers the shared type, auth switch statements, server config, login page button, env vars, tests, and local verification.
npc-creation
Create and modify NPCs with branching dialogue trees for MUDdown. Covers the JSON format, dialogue node structure, location binding, mood/narrative fields, and the talk command flow.