---
name: henchman-adventures
description: Write, convert or update adventures for Henchman, the DM's iPad app, as .lantern.json files. Use when asked to turn a module, PDF, scan or homebrew notes into a Henchman adventure, or to change one that already exists.
---

# Writing adventures for Henchman

Henchman is a DM's iPad app for running a tabletop adventure at the table.
This pack tells an AI (or a careful human) everything needed to write an
adventure the app can run, or to update one, and how to check the work.

Everything here lives at `https://henchman.web.app/ai/`:

| file | what |
|---|---|
| `SKILL.md` | this guide |
| `schema.json` | JSON Schema for the file you will write, generated from the app's own types |
| `ids.json` | every sound, soundscape and recipe id the app ships with; where the monster index is |
| `example.lantern.json` | a complete, valid adventure (Hillside Cult, 7 rooms) to copy the shape from |
| `validate.mjs` | the app's own checker as a command-line tool (`node validate.mjs file.lantern.json`) |
| `from-paper.md` | how to get from page photos or a PDF to an adventure |

Read `example.lantern.json` before writing anything. When this guide and
`schema.json` disagree, the schema wins.

## 1. What the app is

Each adventure has a **front page** (its cover picture full screen, its name,
and Run / Browse / ⋮). Running it, one screen shows a **map** with tappable
**rooms**. Tapping a room opens a panel with read-aloud text, DM notes, the
creatures there (with full stat cards), traps/checks/clues the DM can tick
off, loot, exits to other rooms, and sound effect buttons. There is a
**combat tracker** (initiative, HP, conditions, cards; monsters start at their
average HP and one button rolls their hit dice instead; a monster's attacks,
saving-throw actions and spells are buttons that roll against a chosen target
and apply the damage; it follows each creature's actions, reactions,
legendary actions, daily uses, spell slots, concentration, death saves and
traits like Legendary Resistance and Regeneration), a **mixer** (room
soundscapes, each with an optional Battle version that the BATTLE button
glides into, plus effects), an **overview page** (the briefing a DM reads
before the session), an **NPC list**, and **runs** — the DM's pencil marks on
an adventure (party, HP, loot taken, rooms visited, notes, fog cleared, where
creatures went, and a transcript of everything that happened, in order), kept
apart from the adventure so it can be run again. Party
members can be linked to D&D Beyond characters; their AC, HP, saves and
actions (weapons, spells, class features) come from the sheet and work in the
tracker like a monster's. None of this is in the adventure file.

The DM can put **player screens** on a TV or tablet: the chapter map under
fog the DM clears as the party explores (with a secrets layer for hidden
doors), and the room's player maps and handout pictures. The DM can turn the
map on the screen a quarter, so a long hallway runs along the screen's long
side. In Settings each screen can also be turned as a whole, once, for how it
is mounted (a TV hung sideways, a projector upside down); it remembers that.

An adventure can have several **chapters**, each with its own map.

## 2. How your work gets into the app

You write one JSON file, a `.lantern.json`. The DM gets it in one of two ways:

- **Paste.** On the home screen: **+ → Paste adventure…**, paste the whole
  file, **Import**. This is the normal route when you are working in a chat:
  give the DM the JSON in one code block.
- **File.** Save it as `<name>.lantern.json`; the DM uses **+ → Import file…**.
- **The door.** If the DM gave you a key (made in the app: Settings → Your AI,
  it looks like `hk_…`), send the file yourself and it appears in their
  adventures within moments:

  ```
  POST https://henchman.web.app/api/adventures
  Authorization: Bearer hk_…
  Content-Type: application/json

  <the whole .lantern.json file as the body>
  ```

  The door runs the same check as Paste. `201` means it is in, with the
  adventure's id and a link; `422` lists the problems in plain words (fix
  them and send again); `409` means an adventure with that `id` is already
  there (this door only adds: give yours a new id, or hand the DM the file to
  paste over the old one); `401` means the key is wrong or revoked; `429`
  means more than 20 sends in an hour. Embedded files (`blobs`) are not taken
  at the door — use bundled art and sound recipes, or paste. Keep the key out
  of anything other people can read.

Either way the app **checks the file first** and lists every problem in plain
words (a monster id that does not exist, an exit to a room that is not there…).
Nothing is imported until it passes. Run the same check yourself before handing
over (§8) so the DM never sees that list.

### Updating an adventure that already exists

1. Ask the DM for the current version: tap the adventure in the library to
   open its front page, then **⋮ → Export to file…** (it is the same file
   format). Do not work from memory or from an old copy —
   the DM may have edited it in the app.
2. Change what was asked. **Keep every existing `id` exactly as it is** —
   rooms, chapters, loot, features, exits, the adventure itself. The DM's runs
   (HP, loot ticked, notes) hang off those ids; a changed id silently loses
   them. Rename freely, re-id never.
3. Hand the whole file back. Import replaces the adventure with the same `id`
   (the app asks the DM first) and keeps their runs.

Partial patches ("just add room 9") are not a thing: always return the whole
adventure.

## 3. The file

```json
{
  "$schema": "https://henchman.web.app/ai/schema.json",
  "help": "https://henchman.web.app/ai/SKILL.md",
  "format": "lantern-adventure",
  "version": 1,
  "exportedAt": 0,
  "adventure": { …Adventure… },
  "soundscapes": [ …Soundscape… ],
  "sounds": [ …Sound… ],
  "monsters": [ …Monster… ],
  "encounters": [ …EncounterTable… ],
  "blobs": []
}
```

- `$schema` and `help` are pointers back to this pack so the next reader of
  the file finds the rules; always include them.
- `soundscapes`, `sounds`: only what the adventure needs that is **not built
  in**. Built-in ids (in `ids.json`) need no entry. Usually both are `[]`.
- `monsters`: the cards you wrote (`user_…` ids). Library ids need no entry.
- `encounters`: random encounter tables the chapters use (see *Random
  encounters*). Leave it out, or `[]`, if the adventure has none.
- `blobs`: binary files (map pictures, audio) as base64 — `{ id, mime, name,
  size, data }`. Leave it `[]` and let the DM load pictures in the editor
  unless you really have the bytes.
- On import, library items the DM already has are **kept** (their edits win);
  the adventure is replaced if its `id` exists.

## 4. The objects

```
Adventure
 ├─ chapters[]   one map each, and their random encounters (a table, how often)
 ├─ rooms[]      every room belongs to a chapter (chapterId)
 │    ├─ creatures[]   references into the monster library
 │    ├─ loot[]        tickable items
 │    ├─ features[]    checks, traps, obstacles, clues
 │    ├─ exits[]       links to other rooms (any chapter)
 │    └─ sound and light: soundscapeId, sfxIds[], lightId?
 ├─ overview[]   briefing sections (background, hooks, how to run it…)
 ├─ npcs[]       people with stat blocks who are not standing in a room
 └─ cover, summary, credits, startRoomId, battleLightId?
```

### Adventure

| field | what to put |
|---|---|
| `id` | `adv_<slug>` — stable; re-importing the same id replaces the adventure |
| `name`, `tagline` | title and one line |
| `summary` | the synopsis at the top of the overview page; 2–4 short paragraphs |
| `overview[]` | `{id, title, text}` sections; see §6 |
| `npcs[]` | `{monsterId, count, label?, note?}` for NPCs outside rooms |
| `rating` | who it's for, as the source says: `{ "players": { "min": 4, "max": 6 }, "levels": { "min": 10, "max": 14 } }` shows as "For 4–6 characters, levels 10–14" (either part can be left out; a single level is `{ "min": 3, "max": 3 }`). Scaled random encounters are built for the middle of it |
| `level` | the levels as words (`"10–14"`), kept for older versions of the app; match `rating.levels` |
| `author`, `credits` | strings; credits must name the source and say the text is paraphrased |
| `cover` | the adventure's picture: full screen on its front page and on its library card. `null` (the first chapter's map stands in), or `{kind:'svg', svg}` with your own SVG; see *Pictures* |
| `chapters[]` | `{id, name, intro, map:{image, width, height, playerImage?, squarePx?}, encounters?, music?}`; see *Random encounters*; `music` is the chapter's own music (same shape as the adventure's, see *Sounds*), only meaningful with more than one chapter |
| `rooms[]` | see below |
| `startRoomId` | the first room the DM should open |
| `battleLightId` | optional smart-light look while BATTLE is on (`ids.json` → `lightLooks`); leave it out for the red `lt_battle` |
| `createdAt`, `updatedAt` | `0` is fine; the app sets them |

### Chapter and map

`map.image` is the **DM's map** (numbers, secret doors and all): `null` (no
picture yet — the DM loads one in the editor with **Load DM's map…**), or
`{ kind: 'svg', svg: '<svg …>' }` for a diagram you drew yourself.
`width` and `height` are the picture's pixel size; with no picture use
`1000 × 700`. **Room hotspots are percentages of this picture**, so they
survive any resizing. The DM can unlock the map and drag badges, so a
roughly right spot is fine.

The chapter map is also the players' map on the table's screen, under fog the
DM clears as the party explores. Two optional fields serve that, and both are
usually left out (the DM sets them in the editor): `playerImage`, the
**Players' map**, a clean version of the same picture with the same framing
(then `image`, the DM's map, becomes a secrets layer the DM can reveal piece
by piece, e.g. a found secret door), and `squarePx`, one grid square in
pixels of `image`, so the screen can show the map at table scale (the DM
marks it with **Mark the scale…**). Only set `squarePx` if you measured it
on the actual picture.

Pictures: `kind: 'bundled'` only works for files already on the site (the
built-in adventures use it). `kind: 'blob'` needs the bytes in `blobs`. If
you have neither, `null` and good `exits` is the right answer.

### Random encounters

When the source has wandering monsters, give the chapter a **random encounter
table**. The table, in the file's `encounters`, says what may turn up. The
chapter's `encounters` picks the table by `tableId` and says how often and how
likely, as the source has it. In play, Henchman reminds the DM when a check is
due, rolls it for the DM alone, and puts monsters that come into the fight.

```json
"encounters": [{
  "id": "enc_temple_sewers",
  "name": "The sewers",
  "about": "The tunnels under the temple",
  "rating": { "players": { "min": 4, "max": 6 }, "levels": { "min": 4, "max": 7 } },
  "entries": [
    { "id": "ence_sewers_rats", "weight": 2, "monsters": [{ "monsterId": "srd_giant-rat", "count": "2d4" }],
      "text": "scavenging", "sign": "Squeaking ahead, and droppings everywhere" },
    { "id": "ence_sewers_guards", "monsters": [{ "monsterId": "srd_guard", "count": "1d4 + 1", "label": "Temple guard" }],
      "text": "a patrol; they talk first" },
    { "id": "ence_sewers_marks", "monsters": [], "text": "Deep claw marks in the mud: something big came this way" },
    { "id": "ence_sewers_ghouls", "monsters": [{ "monsterId": "srd_ghoul", "count": "scaled" }],
      "text": "hungry, and following the smell of the living" }
  ],
  "defaults": { "chance": { "in": 1, "of": 6, "signs": 1 }, "remind": { "everyMin": 30, "rest": true }, "outdoors": false, "difficulty": "moderate" },
  "createdAt": 0, "updatedAt": 0
}]
```

and on the chapter (its own copy of the rules, usually the table's):

```json
"encounters": { "tableId": "enc_temple_sewers", "chance": { "in": 1, "of": 6, "signs": 1 }, "remind": { "everyMin": 30, "rest": true }, "outdoors": false, "difficulty": "moderate" }
```

- **`rating`** (optional) says who the table is for, as an adventure's
  does; give it the levels of the adventure you write it for. The editor warns
  when a chapter of an adventure for other levels picks it.
- **Entries** are rolled in order; each takes `weight` faces of the die
  (missing = 1), so a d12 table with a common entry of 3 faces is twelve
  faces in all. **`dice`** (optional, 1–3) rolls that many dice added up, a
  bell curve: with `"dice": 2` the weights share the totals 2–12 of 2d6
  (eleven in all, the middle likeliest), the first entry taking the lowest. `monsters` are library ids (or your `user_…` cards) with a
  `count` as text: dice (`"2d4"`, `"1d6 + 1"`), a number (`"3"`), or
  `"scaled"`; `label` names them in the fight. **`"scaled"`** means as many
  as make a fair fight for the adventure's `rating` (its middle: "4–6
  characters, levels 10–14" is 5 characters of level 12), as hard as the
  chapter's `difficulty` says, by the D&D rules the table plays. A fixed count
  in the same entry comes first and the scaled ones fill the rest. Keep the
  source's own numbers where it gives them; use `"scaled"` where it says "a
  band of" or where you write a table yourself. An entry with `monsters: []` is words alone
  (tracks, a traveller, a cave-in): `text` says what happens. With monsters,
  `text` says what they're doing, and `sign` (optional) what the party
  notices before they arrive.
- **`chance`** is the check, on a d`of`: 1 to `in` brings an encounter, and
  the next `signs` faces a sign of one (what comes next is then that
  entry). `in` equal to `of` means always, no check. A module's "1 in 6
  every two turns" is `{ "in": 1, "of": 6 }`.
- **`remind`**: any of `everyMin` (minutes of real play), `rest` (each rest),
  `onceAfterMin` (once, that long into the chapter), `afterFight` (the noise
  of a fight draws them). Turn module turns into real minutes sensibly: a
  check every two turns is about every 20–30 minutes at the table.
- **`outdoors`**: how far off they are when met, 4d6 × 30 ft outdoors,
  otherwise 2d6 × 10 ft.
- **`difficulty`**: how hard a fight a scaled count makes: `"low"`,
  `"moderate"` (the default) or `"high"` (2024 rules: Low, Moderate, High;
  2014: Easy, Medium, Hard), or `"deadly"` (2014 Deadly; High under 2024). A
  deeper or more dangerous chapter can be harder than the table's default.
- A chapter with no wandering monsters has no `encounters`. Several chapters
  may share one table.

### Room

| field | what to put |
|---|---|
| `id` | `rm_<adv>_<code>` |
| `chapterId` | the chapter whose map it sits on |
| `code` | the short label on the map: `C2`, `T16b`, `S9` — match the source |
| `name` | the room's title |
| `hotspot` | `{x, y, w, h}` in percent of the chapter map, or `null`. The room's code badge is drawn with its top-left corner at `(x, y)`, so put that on the room, beside its number on the map; `w`/`h` can be small (6 × 6) |
| `readAloud` | the boxed text, **in your own words** (§7) |
| `notes` | everything the DM needs: who is here and what they do, triggers, timers, the original stats in brackets, what is in the chests |
| `creatures[]` | `{monsterId, count, label?, note?, starts?, ac?, resist?}`; `label` overrides the shown name ("Cultist (knife)"); `note` is a one-liner beside it; `starts` are effects it begins a fight with (see below); `ac` its AC here if not the card's (a ring of protection); `resist` damage types it resists here besides its card's (`["fire"]` for a ring of fire resistance). This is where they **start**: during a run the DM can send a creature to another room, add more, or take one out, and that changes only the run, never the adventure |
| `loot[]` | `{id, text, where?}` one line each; coins and items separately |
| `features[]` | `{id, kind, title, readAloud?, text, label?, at?, roomWide?, images?, creatures?}`; `kind` ∈ `check`, `trap`, `obstacle`, `clue`, `other`. These are the room's points of interest: the DM sees the title until they tap it, so make the title a short label and put the detail in `text` (the DM's notes). `readAloud` = boxed text the DM reads to the players when they find it (only when the module gives one for this spot). `label` = what the dot says (up to 6 characters, e.g. the module's own `3A`); leave it out for the room's code and a letter in list order (`24A`, `24B`). `at` = `{x, y}`, percent of the chapter map, for the dot's spot; leave it out and the dot rings the room's badge. `roomWide: true` when the point is about the whole room, not one spot in it (a gas that fills it, a song heard everywhere, how its defenders behave, a rule of the place): its dot gets a dotted edge. Leave it out for a point at one spot (a chest, a door, a lever). `creatures` = the same list as a room's `creatures[]`, for creatures waiting at this spot rather than in the room at large (a guard behind the secret door, a mimic that is the chest): they're a place of their own, left out of the room's fight and fought from the point. Leave it out when none wait there |
| `exits[]` | `{id, toRoomId, label, note?}`; `toRoomId` is a room id or `null` for "off the map"; if a link is a guess say so in `note` |
| `soundscapeId` | a soundscape id or `null` |
| `lightId` | optional smart-light look for the room (`ids.json` → `lightLooks`, e.g. `lt_torch`, `lt_crypt`), or `"none"`; leave it out and the room matches its soundscape |
| `sfxIds[]` | effects worth a button in this room |
| `maps[]` | `{id, image, caption?}` player-facing maps for the TV; the first goes up when the room is played |
| `images[]` | `{id, image, caption?}` handouts and scenes sent to the Images screen on a tap |
| `reveals[]` | `{id, name, layer, shapes}`: ready-made reveals for the players' map, each a button in play (`name` is its label: "Room", "Alcove", "Secret door"). `layer` is `map` (clears the fog) or `secrets` (shows the DM's map there, only on a chapter with a Players' map). `shapes[]` are `{pts, size, rect?}` in **percent of the chapter map**: a box is `rect: true` with `pts: [x1, y1, x2, y2]` and `size: 0`; a brush line is `pts: [x, y, x, y…]` with `size` its width in percent of the map's width. Only add them if you know where the room sits on the map image (boxes over each room work well); otherwise leave them out and the DM paints them in the editor |

**Starting effects** (`creatures[].starts`): what a creature already has when the
fight begins, e.g. the module says it is hasted, invisible, or has cast prayer.
Each is `{name, lasts, maybe?}`: `name` is a condition (`Invisible`, `Prone`…),
a buff the tracker knows (`Hasted`, `Slowed`, `Blessed`, `Baned`, `Prayer`,
`Shield of Faith`, `Shield`, `Protected from Evil and Good`, `Resistant to fire`)
or any name with a `note` saying what it does; `lasts` is `{"kind":"open"}` for
the whole fight or `{"kind":"rounds","rounds":10}`; `maybe` is a short "only if
…" ("only if warned") and makes it unticked until the DM ticks it when the
fight starts. Example: `"starts": [{"name": "Hasted", "lasts": {"kind": "open"}}]`.

Every `id` in the file must be unique. Readers never see ids.

## 5. The libraries

### Game system

Henchman runs **D&D 5e** only (for now). Leave `adventure.system` out, or
set it to `"dnd5e"`; other values are refused on import. Monster cards are
5e cards; leave their `system` out too.

### Monsters

`monsterId` must exist. Three sources:

1. **The bundled library**: 3,541 D&D 5e cards (Open5e). The index is at
   `https://henchman.web.app/monsters/index.json` — a JSON file whose
   `monsters` list has `{ id, n (name), cr, crv (CR as a number), t (type),
   s (size), src (source) }`.
   **Search it by name before inventing anything.** Ids look like
   `srd_<slug>` (SRD 5.1), `srd-2024_<slug>` (SRD 5.2), `tob_<slug>`,
   `ccdx_<slug>`, `a5e-mm_<slug>`, `bfrd_<slug>`. Common ones: `srd_orc`,
   `srd_ghoul`, `srd_zombie`, `srd_skeleton`, `srd_harpy`, `srd_stirge`,
   `srd_basilisk`, `srd_ogre`, `srd_troll`, `srd_giant-rat`, `srd_commoner`,
   `srd_guard`, `srd_bandit`, `srd_bandit-captain`, `srd_thug`, `srd_veteran`,
   `srd_priest`, `srd_acolyte`, `srd_cult-fanatic`, `srd_cultist`, `srd_mage`,
   `srd_minotaur`.
2. **Cards the DM made** in the app. You cannot see these unless the DM tells
   you; do not guess at them.
3. **Cards you write**, with `id: 'user_<slug>'` and the full `Monster` shape
   (see `schema.json` and the two cards in `example.lantern.json`). Write them
   in your own words, 5e style, and put the original system's numbers in
   `notes`. A card may carry `sfxIds` — effects it brings into a fight.
   Give it both `hp` (the average) and `hpDice` (`"2d8+2"`): a fight starts
   every monster at `hp`, and the tracker's **Roll monster HP** rolls
   `hpDice` instead (keeping any fixed bonus). With no dice in `hpDice`
   the monster just keeps `hp`.
   **Word actions the standard 5e way** so the tracker can roll them: attacks as
   `Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2)
   slashing damage.` (add `plus 3 (1d6) fire damage` for a second type), and
   saving throws as `… must make a DC 13 Dexterity saving throw, taking 10 (3d6)
   fire damage on a failed save, or half as much damage on a successful one.`
   Put `(Recharge 5–6)` in the action's name if it recharges. Anything worded
   differently still shows, as text the DM reads.
   **Effects** are read from the same words, so keep them standard too: the
   condition by its name (`the target is grappled (escape DC 13)`, `be poisoned
   for 1 minute`, `knocked prone`, `has the Frightened condition`), how long
   (`for 1 minute`, `until the end of its next turn`, `until this grapple
   ends`), and how it ends (`The target can repeat the saving throw at the end
   of each of its turns, ending the effect on itself on a success`). The
   tracker puts them on the target with a timer and runs the repeat saves.
   **What it can do in a turn** comes from the card too: one action, or its
   `Multiattack` worded the standard way (`The mummy can use its Dreadful Glare
   and makes one attack with its rotting fist.`, `makes three attacks: one with
   its bite and two with its claws`) so the tracker greys out what's used up.
   Put bonus actions, reactions and legendary actions in `bonusActions`,
   `reactions` and `legendaryActions` (`(Costs 2 Actions)` in a legendary
   action's name), not in `actions`. Hasted adds one weapon attack.
   Limited uses go in the name: `(1/Day)`, `(3/Day)`, `(Recharge 5–6)`,
   `(Recharges after a Short or Long Rest)`; the tracker counts them. A
   legendary action that repeats an attack says so (`The dragon makes a tail
   attack.`), and lair actions go in `lairActions`.
   **Traits** are read by their standard names and wording, so keep them:
   `Magic Resistance` (advantage on saves against spells), `Legendary
   Resistance (3/Day)`, `Regeneration` (`regains 10 hit points at the start of
   its turn… If the troll takes acid or fire damage, this trait doesn't
   function`), `Undead Fortitude` (`a DC of 5 + the damage taken`), `Pack
   Tactics`, `Charge` (`an extra 9 (2d8) piercing damage`), a trait that does
   something when it dies (`When the mephit dies, … DC 11 Dexterity saving
   throw`), one that hurts whoever hits it in melee, and reactions like `Parry`
   (`adds 2 to its AC against one melee attack`).
   **Spellcasting** (a trait, or a 2024-style action) lists its spells the
   standard way, with its DC: `(spell save DC 15, +7 to hit with spell
   attacks)` then lines like `Cantrips (at will): fire bolt, light`,
   `1st level (4 slots): magic missile, shield`, `At will: detect magic`,
   `3/day each: fireball, fly`. Spells from the SRD (and Level Up and Kobold
   Press books) become buttons that roll at that DC, with their slots or daily
   uses counted; concentration spells are tracked.

Mapping an older edition's "class and level" NPC to a 5e card: pick the
nearest CR and say so in the room notes ("1e: 4th-level fighter → Veteran").

### Sounds and soundscapes

All built-in ids are in `ids.json`, with each sound's `type` (`ambience`,
`music`, `combat`, `sfx`) and a brief of what it is. Every one is a real
recording that ships with the app; you only pick ids.

- Music comes in four levels, each overriding the one above: the DM's house music, the adventure's `music` (`{soundscapeId, levels?, battleLevels?, ambience?}`, same maps as a room mix; plays on the adventure's pages and in rooms with no `soundscapeId`), a chapter's `music` (same shape; in an adventure with more than one chapter, plays with that chapter's map on show and in its rooms with no `soundscapeId`), and each room's `soundscapeId` + `mix`. Usually leave `music` out and give rooms soundscapes; a chapter's `music` suits an adventure whose chapters each have a mood (a town, then the dungeon beneath it). Every level (the adventure's and a chapter's `music`, a room's `mix`) has a battle half too: `battleSoundscapeId` names the piece a fight there swaps to (its stems play over the beds of whatever was playing; the place's own music comes back after), `battleLevels` its levels for that piece, `battleLightId` its light. The lowest level that set a battle piece wins (room over chapter over adventure); a level that set none fights to the one above's, else to its own piece at its battle levels.
- A room may carry `mix`: its own levels over its soundscape, so a few soundscapes serve many rooms. `levels` and `battleLevels` map sound ids (and `"$master"` for the music master) to 0–1, keeping only what differs from the soundscape; `battleLevels` present = the room has its own battle version. `ambience` maps the soundscape's four ambience slots ("0"–"3") to another looping sound, or null to empty the slot; leave a slot out to keep the soundscape's.
- A soundscape's `layers` are its music tracks and ambience beds: `{soundId, gain, part?, battleGain?, label?, slot?}` (`label` names the fader, e.g. "Drums"; `slot` 0–3 places an ambience bed in one of the four ambience slots). `part` is `music` (stems of one piece: they start together, loop in step and share the soundscape's `master`, 0–1) or `ambience` (up to four looping beds); left out, music/combat sounds count as music. Set `battle: true` with a `battleGain` per layer (and `battleMaster`) to give the soundscape a Battle state: BATTLE then glides the same mix there. Fight music lives only in soundscapes: there is no separate combat track, and a soundscape without a Battle state keeps playing as it is during a fight.
- A room's `soundscapeId` points at a soundscape (`ss_dungeon`, `ss_cave`,
  `ss_sewer`, `ss_night_outdoors`, `ss_horror`, `ss_ruined_temple`, …).
- Fifteen soundscapes are songs in stems with a Battle state built in: band pieces
  (`ss_song_tavern`, `ss_song_road`, `ss_song_dungeon`, `ss_song_crypt`, `ss_song_rite`,
  `ss_song_undercity`, `ss_song_keep`, `ss_song_glade`, `ss_song_battle`, `ss_song_camp`)
  and film-score pieces for orchestra and choir (`ss_song_village`, `ss_song_quest`,
  `ss_song_elven`, `ss_song_deep`, `ss_song_siege`). Good for an adventure's `music`,
  or a room that wants music.
- `sfxIds` are `sfx` sounds (`sfx_sword_clash`, `sfx_scream`, `sfx_roar`,
  `sfx_door`, `sfx_thud`, `sfx_spell_burst`, `sfx_coins`, …).

To add a soundscape: `{id:'ss_<slug>', name, mood, layers:[{soundId, gain 0–1}]}`
in `soundscapes`, using existing sound ids. To add a sound of your own, name one
of the `recipes` in `ids.json` (`source: {kind:'placeholder', recipe}`): it
plays that built-in recording until the DM loads a file. Write it a `brief` — what
the sound is, which the DM reads when choosing a recording of their own.

## 6. The overview: what a DM needs that isn't in a room

Write sections with these jobs (names are up to you):

1. **What is going on** — the truth behind the adventure, in two or three paragraphs.
2. **Getting the party there** — hooks; the module's own start(s).
3. **Rules of the place** — wandering monster tables, construction notes
   (ceilings, doors, light), hazards that recur (sewage, collapses, alarms).
4. **Who is who** — the factions and named NPCs, and which rooms they are in.
5. **Running it** — alarm chains across rooms, timers, things that change
   depending on the party's choices, edition notes.
6. **Treasure summary** — where the big items are.
7. **Scaling** if the module gives guidance or you can offer sensible defaults.

Anything the DM would otherwise need to flip pages for belongs here.

## 7. Writing rules

- **Paraphrase.** Never copy the source's prose. Keep every fact (numbers,
  names, DCs, HP, treasure, triggers) and rewrite the sentences. Say in
  `credits` that it is a paraphrase, and name the author and publisher.
- **Keep the original numbers** when converting between systems:
  "(1e: AC 6, HD 1, hp 4,3,6,7,1,4)". The DM may run the old rules.
- **Read-aloud is what the players perceive; notes are what the DM knows.**
  Do not leak the secret into the read-aloud box.
- **Triggers and timers go in `features`** (kind `trap`) as well as in the
  notes, so they show as coloured cards the DM can tick off.
- **Exits are facts from the map.** If you did not see the map, say the
  link is assumed.
- **Codes match the source** (`T12`, `S19b`) so the DM can find things in the book.
- **Counts:** `count` is how many stand in the room. For "2d4 if…" put the
  maximum reasonable number and explain in `note`.
- **Don't invent lore** the source doesn't have. If the intro pages were
  missing, say the background is reconstructed.
- **Sub-areas** (16a/16b) become separate rooms when they have their own
  inhabitants or traps, and stay one room when they are just a nook.

## 8. Check it before handing over

Run the app's own checker — it is exactly what Import runs:

```bash
curl -sO https://henchman.web.app/ai/validate.mjs
node validate.mjs my-adventure.lantern.json
```

It fetches `ids.json` and the monster index from the site and prints every
problem (stops the import) and warning (worth a look). Fix until it says
`OK`. Offline: `--ids ids.json --monsters index.json` with local copies.

If you cannot run code, validate against `schema.json` by hand and go through
this list:

- [ ] every `monsterId` exists (library index, DM's cards, or your `user_` cards in `monsters`) and is for the adventure's system
- [ ] your `user_` cards have `hp` and, where the system has them, `hpDice`
- [ ] every `exit.toRoomId` is a room in this adventure or `null`
- [ ] every room has a `chapterId` that exists; every chapter has rooms
- [ ] `startRoomId` is set
- [ ] every `soundscapeId` / `sfxId` exists and has the right type
- [ ] all ids unique; no two rooms share a `code` within a chapter
- [ ] read-aloud text is paraphrased; credits name the source
- [ ] overview has background, hooks, rules of the place, who's who, running notes, treasure
- [ ] traps and timers appear as `features` of kind `trap`
- [ ] points about the whole room (not one spot) have `roomWide: true`
- [ ] if no map image: tell the DM, and make `exits` rich enough to find the way room to room
- [ ] updating an existing adventure: no `id` changed

## 9. Working from paper

Photographed pages, scans and PDFs: see `from-paper.md` for the pipeline
(OCR, reading the failures by eye, the digest, mapping creatures, reading
hotspots off a map with a percent grid) and the lessons from a real conversion.
