{randomDungeon}

Substitutes a random dungeon's name into your prose - flavor text only, same as {nearestDungeon}, it doesn't open anything. Unlike {nearestDungeon}, this picks randomly rather than always resolving to the same one.

This is not the same as a real, playable dungeon. For one the DM can actually open and run, author it in your campaign's own dungeons[] array and reference it with {dungeon:your-dungeon-id} instead - see Campaign Structure.

Like {nearestDungeon}, this comes from an optional, hand-authored data/maps/locations.json file - Campaign Cookbook doesn't generate dungeon flavor-text entries the way it does towns. If that file doesn't exist, or nothing matches your filters, this resolves to generic text instead of a literal {randomDungeon}.

Basic Usage

{randomDungeon}

Example

{ "readAloud": "<div class='read-aloud'><p>Rumors speak of treasure in {randomDungeon}.</p></div>" }

Result: "Rumors speak of treasure in The Shadowed Halls." (random dungeon)

Parameters

Combined Parameters

Hard Cave

{randomDungeon:type=Cave,difficulty=hard}

Finds a hard-difficulty cave.

Random Easy Crypt

{randomDungeon:type=Ancient-Crypt,difficulty=easy}

Finds an easy ancient crypt from your locations.json.

Difference from {nearestDungeon}

Feature {nearestDungeon} {randomDungeon}
Selection Closest by distance Random selection
Variety Predictable location Different each time
Use Case Main quest dungeon Side quests, rumors

Complete Example

{ "sceneId": "ep2-scene5", "title": "The Adventurer's Tale", "readAloud": "<div class='read-aloud'><p>A grizzled adventurer in the tavern speaks of {randomDungeon:difficulty=medium}. 'There's treasure there for the taking,' he says, 'if you're brave enough.'</p><p>He also warns of {randomDungeon:type=Ancient-Crypt,difficulty=deadly}, a place no one returns from.</p></div>", "choices": [ { "text": "Ask about the treasure location", "nextScene": "ep2-scene6" } ] }

Best Practices

Use for Side Content

✓ Good: Side quests and rumors
✗ Bad: Main quest critical path

Match Difficulty to Party Level

{randomDungeon:difficulty=easy} // For beginners
{randomDungeon:difficulty=deadly} // For experienced parties

See Also