Manages OSE adventure lifecycle: set up new adventures from module PDFs, build party rosters, resume sessions with recaps, and save session state. Use when starting a new adventure, continuing an existing one, or saving/ending a session.
Manages the full adventure lifecycle: setting up new adventures from B/X module files (PDF or Markdown), resuming sessions with recaps, and saving state.
The referee's constitution governs all behavior. Read it before beginning play if it is not already in context. Additionally:
plugins/bx-referee/skills/referee/scripts/roll.pyplugins/bx-referee/skills/referee/references/srd_map.md (rules, classes, equipment, treasure)plugins/bx-referee/skills/referee/references/srd_monsters.mdplugins/bx-referee/skills/referee/references/srd_spells.mdThe game directory (<game-root>) is passed as part of the arguments (e.g. new /Users/player/osr-games). If not provided, you must use AskUserQuestion to ask the player where their game files are stored before doing anything else. Do not search the filesystem for game files — always ask. Suggest ~/osr-games as a default.
All adventures/ and characters/ paths are relative to this game root. Never write game files to the plugin cache directory.
Triggered by /adventure new or routed from referee.
AskUserQuestion: path to the adventure module file (PDF or Markdown).
AskUserQuestion: adventure name (used as directory slug, e.g. keep-on-borderlands).
mkdir -p <game-root>/adventures/<name>
Read the module file to survey its structure. B/X modules typically have:
1. MAIN GATE:, 7a. TOWERS:, 14a. THE CHAMBER OF THE MAGI. Record each with its page number.Format:
# Location index
- **Module:** `<absolute path to the module file (PDF or Markdown)>`
- **Intro:** p. <start>-<end> or section name (player background, rumors, setting, NPCs)
## <Section name> (e.g., AREAS OF THE KEEP)
- 1. Main Gate (p. 8 or line/section ref)
- 2. Flanking Towers (p. 8)
- 3. Entry Yard (p. 8)
...
The module file path must be recorded at the top of LOCATIONS.md so that any skill can locate the source material during play.
This file helps with navigation during play. Include section groupings where the module uses them (e.g., KEY TO TIER 1, PART 2: WEST WING).
Page number verification (PDF modules only): PDF page numbers often differ from the printed page numbers in the book — cover pages, OGL pages, or front matter can shift everything by one or more pages. After building LOCATIONS.md, verify the page numbers are correct:
All page numbers in LOCATIONS.md must be PDF page numbers (the number you pass to the Read tool's pages parameter), not printed book page numbers.
Write an empty party file:
# Party
Before creating new characters, check for existing ones:
<game-root>/adventures/*/PARTY.md for parties from other adventures. If any exist, read each and build a list of candidates. Rank them by:
STATUS: DEAD)<game-root>/characters/*.md for individual character files.PARTY.md. Reset current HP to max and clear any temporary conditions — this is a fresh adventure.Skill "character" "<game-root>". Append each completed character to <game-root>/adventures/<name>/PARTY.md.Write from template (see SESSION.md format below), filling in:
This step is critical — it's the first thing the player experiences. Read the module's intro pages (recorded in LOCATIONS.md) and present the player-facing introductory material. Every module handles this differently:
The goal is to give the player everything their characters would know at the start of the adventure — setting, hook, context — without revealing DM-only information. Then present the opening situation as the module describes it and stop.
Remember the constitution: describe the scene and stop. Do not narrate character actions.
MANDATORY: Call Skill "exploration" now. Do not narrate exploration, describe rooms, resolve actions, or continue play without invoking the exploration skill first. The adventure skill's job ends here.
Triggered by /adventure continue or routed from referee.
The game root is passed as part of the arguments (e.g. continue /Users/player/osr-games). If not provided, you must use AskUserQuestion to ask the player for their game directory before proceeding. Do not search the filesystem.
Once you have the game root, Glob <game-root>/adventures/*/SESSION.md to find adventures with saved state.
AskUserQuestion: which adventure to continue?
Read SESSION.md and PARTY.md from the selected adventure directory.
Present a brief recap to the player:
MANDATORY: Call Skill "exploration" now. Do not narrate exploration, describe rooms, resolve actions, or continue play without invoking the exploration skill first. The adventure skill's job ends here.
Triggered by /adventure save or when the player asks to stop.
Use Edit to sync current state:
HP current/max)| STATUS: DEAD to their first lineUse Edit to add/update:
Report what was saved: adventure name, location, turn, party status.
# Session state - <Adventure name>
## Adventure
- Game root: `<absolute path to game directory>`
- Module: `<absolute path to module file>`
- Started: <date>
## Party
See [PARTY.md](PARTY.md) for current roster and stats.
## Current status
- **Location:** [location-id] — [in-world name]
- **Turn:** [n] | **Hour:** [n]
- **Light:** [source] ([turns remaining])
## Session log
### Session 1 — <date>
[Summary: locations explored, encounters, treasure, notable events]
## Casualties
| Name | Class | Cause of death | Session |
| ---- | ----- | -------------- | ------- |
## Current situation
[Player-known state only: where the party is, what they can see. NEVER include DM-only info like target numbers, hidden contents, trap mechanisms, or module background the players haven't discovered yet.]
# Party
- BLARG | Fighter | Level 1 | Neutral | He/Him
- STR 14 (+1) | INT 10 | WIS 11 | DEX 14 (+1) | CON 15 (+1) | CHA 11
- AC 1 [18] | HP 7/7 | THAC0 19 [0] | XP 0/2,000 (+5%)
- SAVES: Death 12 | Wands 13 | Paralysis 14 | Breath 15 | Spells 16
- EQUIPMENT: Plate mail, shield, sword (1d8), dagger (1d4), torches x12, tinder box, backpack
- MONEY: 10 gp, 2 sp
- ENC 670/1,600 cn | MV 90'(30')
- LANGUAGES: Common (broken), Neutral
current/max| STATUS: DEAD to their first line<game-root>/
├── adventures/<adventure-name>/
│ ├── LOCATIONS.md
│ ├── PARTY.md
│ └── SESSION.md
└── characters/
└── <name>-<class>.md
The module file stays at its original location on disk. SESSION.md records both the game root and the module path.