{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
Example
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.
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.
-
sameState
boolean
Intended to limit selection to settlements in the same state/province as the starting location. Not currently functional - see note above.{randomBurg:sameState=true}
-
withinRange
number
Intended to limit selection to settlements within N distance units. Not currently functional - see note above.{randomBurg:withinRange=50}
-
minPopulation
number
Only selects settlements with population greater than or equal to N. Works with both generated towns and a hand-authored
locations.json. Use this to find cities instead of villages.{randomBurg:minPopulation=1000} -
maxPopulation
number
Only selects settlements with population less than or equal to N. Works with both generated towns and a hand-authored
locations.json. Use this to find villages instead of cities.{randomBurg:maxPopulation=500}
Combined Parameters
You can combine multiple parameters by separating them with commas. No spaces allowed.
Example: A Small Village
Result: Selects a town with ≤300 population from your party's generated roster.
Example: A Medium Town
Result: Selects a town with 500-2000 population.
Consistency & Caching
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:
Complete Example
Best Practices
Keep Adventures Local
Use sameState=true to prevent low-level parties from globetrotting:
{randomBurg} ✗ May send party across the world
Control Travel Distance
Use withinRange to ensure realistic travel times:
{randomBurg:withinRange=500} ✗ May be too far for low-level party
Match Settlement Size to Story
Use population filters to match your narrative:
{randomBurg:minPopulation=2000} ✓ Large city, lots of shops/NPCs
Layer Multiple Filters
Combine parameters for precise control:
This finds a medium-sized town that's local and nearby.
See Also
- {nearestBurg} - Closest settlement (no randomness)
- {capitalCity} - Capital city (highest population)
- Parameter Syntax - Complete guide to parameter formatting
- Scope Control - Detailed guide to keeping adventures local