Files
vanity-delve/foundry-module
tevansandClaude Opus 5 ded836d4c8 Deal area names; fix the scene-control hook for Foundry v13+
Two bugs the first real button-press exposed.

The ⛏ never appeared. getSceneControlButtons was written for the old array
shape, but v13+ passes a record keyed by name and the token group is `tokens`,
plural — so the hook silently added nothing. Every earlier test had gone through
the API, which masked it completely. It now handles both shapes.

Area names were picked per-area from a small per-role list, so two areas sharing
a role could collide: a generated dungeon shipped with two scenes both called
"The Lesser Vault". Names are now dealt globally without replacement, falling
back to other roles' lists before ever repeating. This is the same bug already
fixed for features, decisions, temptations and situations — missed for names
because names were assigned in beat.mjs rather than dealt in delve.mjs.

A test now generates 180 delves at 6, 9 and 12 areas and asserts no two areas
in one delve share a name. Tests 38 -> 39.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 09:44:53 +01:00
..

DELVE — Foundry module

Install by copying this directory to Data/modules/vanity-delve/, then copying the generator into it:

cp -R ../core foundry-module/module/core

module/core/ is a verbatim copy of core/. It is not vendored in git because the standalone generator is the source of truth — if the copy ever needs editing to run inside Foundry, the portability claim in DESIGN.md §4 is false.

Using it

The ⛏ button in the token controls opens the Forge. Set the parameters, press Raise the dungeon, and it builds — in one folder per document type:

  • one scene per area, walls and lighting placed, via the VANITY Forge
  • encounter actors, foldered rather than scattered
  • a JournalEntry: GM truth, one page per area, the ending — this is the adventure

Every document is stamped with a dungeonId, so the 🗑 button removes a whole dungeon and nothing else.

Requires the VANITY system 0.10.5+ for quiet output; on older versions the Forge posts its own cards over DELVE's and the module says so on startup.