{randomBurg}

References a random town from your party's generated roster (see {nearestBurg} for how that roster comes to exist). Supports filtering to control which town gets picked.

Basic Usage

{randomBurg}

Example

{ "readAloud": "<div class='read-aloud'><p>The bandits fled toward {randomBurg}.</p></div>" }

Result: "The bandits fled toward Millhaven." (or any other randomly selected settlement)

Parameters

Use parameters to filter which town can be selected. Combine multiple parameters for precise control.

Honestly: sameState and withinRange don't currently do anything. Both were written for the sibling product's live map (which tracks each settlement's state/province and its position in a distance-computable coordinate graph). Neither Campaign Cookbook's generated towns nor its hand-authored data/maps/locations.json format (plain x/y pixel positions, no state field) supply that data, so these two parameters silently match everything rather than filtering. minPopulation/maxPopulation are the ones that actually work today - use those.

Combined Parameters

You can combine multiple parameters by separating them with commas. No spaces allowed.

Example: A Small Village

{randomBurg:maxPopulation=300}

Result: Selects a town with ≤300 population from your party's generated roster.

Example: A Medium Town

{randomBurg:minPopulation=500,maxPopulation=2000}

Result: Selects a town with 500-2000 population.

Consistency & Caching

Important: Each unique placeholder + parameters combination is cached per campaign. Once resolved, it will always return the same location.

Caching Example

Scene 1: {randomBurg:sameState=true} → "Millhaven"

Scene 5: {randomBurg:sameState=true} → "Millhaven" (cached)

Scene 7: {randomBurg:withinRange=50} → "Eastport" (different parameters, new selection)

Fallback Behavior

If no settlements match your criteria, the placeholder will resolve to generic fallback text:

"a nearby settlement"
Tip: If you're getting fallback text, your filters may be too strict. Try relaxing one or more parameters.

Complete Example

{ "sceneId": "ep1-scene4", "title": "Following the Trail", "readAloud": "<div class='read-aloud'><p>The tracks lead away from {nearestBurg} toward {randomBurg:sameState=true,withinRange=50}. Based on the direction, the bandits are likely heading to {randomBurg:sameState=true,maxPopulation=300}, a small village known for its lack of guards.</p></div>", "choices": [ { "text": "Follow the tracks immediately", "nextScene": "ep1-scene5-chase" }, { "text": "Return to {nearestBurg} to gather supplies first", "nextScene": "ep1-scene5-resupply" } ] }

Best Practices

Keep Adventures Local

Use sameState=true to prevent low-level parties from globetrotting:

{randomBurg:sameState=true} ✓ Good
{randomBurg} ✗ May send party across the world

Control Travel Distance

Use withinRange to ensure realistic travel times:

{randomBurg:withinRange=100} ✓ Good for a day's travel
{randomBurg:withinRange=500} ✗ May be too far for low-level party

Match Settlement Size to Story

Use population filters to match your narrative:

{randomBurg:maxPopulation=200} ✓ Small village, few resources
{randomBurg:minPopulation=2000} ✓ Large city, lots of shops/NPCs

Layer Multiple Filters

Combine parameters for precise control:

{randomBurg:sameState=true,minPopulation=800,withinRange=75}

This finds a medium-sized town that's local and nearby.

See Also