Captures the pre-Godot-port state of the codebase. This is the rollback anchor for the Godot port (M0 of theriapolis-rpg-implementation-plan-godot-port.md). All Phase 0 through Phase 6.5 work is included; Phase 7 is in flight. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
32 KiB
Theriapolis — Procedural World Generation
Technical Design Document (High Level)
Executive Summary
The continent of Veldara is procedurally generated each playthrough while preserving the narrative spine of the main quest. The player experiences the same story in a different world every time — settlements shift, roads reroute, dungeons relocate, and the spaces between fixed narrative anchors are always fresh.
The core principle: Geography is authored. Topology is generated.
Meaning: the continental layout (temperate east, plains center, mountains west, tundra north, subtropical south) is fixed as a macro-template. But the specific shape of coastlines, the exact placement of mountain passes, the course of rivers, and the location of every settlement, road, and point of interest within those macro-regions is procedurally determined per seed.
LAYER 0: THE CONTINENTAL TEMPLATE
What Is Fixed (Every Playthrough)
The continental template is a hand-authored macro-biome map — a low-resolution grid (approximately 32×32 cells, each cell representing a large region) that defines the broad strokes:
NORTH
┌──────────────────────────────────┐
│ TUNDRA / BOREAL FOREST │
│ (Polar Ursid, Wolverine-folk) │
├──────────────────────────────────┤
│ TEMPERATE │ NORTHERN │
│ FOREST │ PLAINS │
│ (Mixed Clade) │ (Canid-heavy) │
├────────────────┼─────────────────┤
│ EASTERN │ CENTRAL │ WESTERN
│ INDUSTRIAL │ GRASSLANDS │ MOUNTAINS
│ BELT │ (Bovid/Cervid) │ (Mixed)
│ (Multi-Clade) │ │
├────────────────┼─────────────────┤
│ SOUTHEASTERN │ SUBTROPICAL │
│ COAST │ LOWLANDS │
│ (Trade ports) │ "The Tangles" │
│ │ (Hybrid/fringe)│
└──────────────────────────────────┘
SOUTH
Each macro-cell carries:
- Biome type (tundra, boreal, temperate deciduous, grassland, mountain, subtropical, coastal, wetland)
- Dominant Clade affinity (which Clades historically settled here, influencing population ratios and architecture)
- Development level (industrial, agricultural, frontier, wilderness, urban)
- Covenant enforcement strength (strong, moderate, weak, nominal)
These macro-cells are NOT randomized. They are the authored skeleton that ensures narrative coherence. The main quest expects certain regions to exist in certain relative positions.
What Is Generated (Per Seed)
Everything inside and between those macro-cells:
- Coastline shape, island placement, bay/peninsula formation
- Mountain range contours, pass locations, elevation profiles
- River systems (source to sea, branching, confluence points)
- Forest density and treeline boundaries
- Micro-biome variation within macro-cells (a grassland cell might contain river-bottom woodlands, rocky outcrops, seasonal wetlands)
LAYER 1: TERRAIN GENERATION
Method: Constrained Multi-Octave Noise
Standard Perlin/Simplex noise terrain generation, but constrained by the macro-template.
Step 1 — Elevation Map
Generate a base elevation heightmap using multi-octave Simplex noise. Then apply the macro-template as a constraint mask:
- Cells tagged MOUNTAIN: elevation floor set high (0.7–1.0 range). Noise adds variation within that range (peaks, valleys, ridgelines) but cannot drop below the floor.
- Cells tagged GRASSLAND: elevation ceiling set low (0.1–0.3). Gently rolling terrain. Noise adds subtle hills but cannot spike.
- Cells tagged COASTAL: elevation forced to approach sea level (0.0) at the continent edge. Noise shapes the specific coastline contour.
- Cells tagged TUNDRA: elevation moderate, flatness enforced with low noise amplitude.
- Transition zones between macro-cells use gradient blending over 2–3 cell widths to prevent hard biome edges.
Step 2 — Moisture Map
Second noise layer, independent frequency. Combined with elevation to derive biome detail:
- High elevation + low moisture = alpine desert, rocky peaks
- High elevation + high moisture = alpine meadow, glacier
- Low elevation + high moisture = swamp, wetland, river floodplain
- Low elevation + low moisture = dry grassland, scrubland
- Moderate elevation + moderate moisture = temperate forest (the default)
The moisture map is also constrained: cells tagged SUBTROPICAL get a moisture floor. Cells tagged TUNDRA get a moisture ceiling (frozen, not wet).
Step 3 — Temperature Map
Derived primarily from latitude (north = cold, south = warm) with elevation modifier (higher = colder). This is mostly deterministic from the other two maps, with minor noise for local variation (cold pockets in valleys, warm microclimates on south-facing slopes).
Step 4 — Erosion Simulation (Optional, Performance Budget Permitting)
Hydraulic erosion pass over the heightmap to create natural-looking river valleys, canyon cuts, and sediment plains. This step transforms geometric noise terrain into terrain that looks like water has been flowing over it for millennia. Expensive but dramatically improves visual quality.
If performance is a concern, skip this and use the river placement algorithm in Layer 2 instead (cheaper, less realistic, still functional).
Biome Resolution
After the three maps are generated, each terrain cell (higher resolution now — think 512×512 or 1024×1024 for the full continent) is assigned a micro-biome based on its elevation/moisture/temperature values:
| Biome | Elevation | Moisture | Temperature |
|---|---|---|---|
| Tundra | Low–Med | Low | Cold |
| Boreal Forest | Low–Med | Med | Cold |
| Temperate Deciduous | Low–Med | Med–High | Moderate |
| Temperate Grassland | Low | Low–Med | Moderate |
| Mountain (alpine) | High | Varies | Cold |
| Mountain (forested) | Med–High | Med–High | Moderate |
| Subtropical Forest | Low–Med | High | Warm |
| Wetland/Swamp | Very Low | Very High | Warm |
| Coastal | Sea Level | High | Varies |
| River Valley | Low (carved) | High | Varies |
| Scrubland | Low–Med | Low | Warm–Moderate |
| Desert (cold) | Med | Very Low | Cold |
Each biome carries associated data: traversal cost, encounter tables, resource availability, visual tileset, ambient sound profile, and ambient scent profile (this is Theriapolis — the world smells different in a boreal forest than a swamp, and PCs with scent abilities should experience that).
LAYER 2: HYDROLOGY — RIVERS, LAKES, COASTLINE
Rivers
Rivers are the skeleton of civilization. They determine where settlements form, where trade flows, and where borders harden.
Generation Method: Drainage Simulation
- Identify the highest points on the elevation map (mountain peaks, ridgelines).
- Simulate water flow downhill from multiple source points using gradient descent.
- Water accumulates: streams merge into rivers based on flow volume thresholds.
- Rivers carve into the elevation map slightly (lowering terrain along their path) to create natural valleys.
- Rivers terminate at the ocean (coastline), a lake basin (local elevation minimum), or a swamp/wetland (flat, high-moisture area).
Constraints:
- At least one major river must cross each of the following macro-regions: Eastern Industrial Belt, Central Grasslands, Subtropical Lowlands. The quest expects river crossings and river-based settlements.
- Millhaven (Act I starting town) is always on a river. The generation guarantees a river within the Eastern Temperate Forest macro-cell.
River Classification:
- Stream (narrow, wadeable): traversal cost low, no ferry needed
- River (moderate, bridgeable): settlements form at crossing points, bridges are infrastructure
- Major River (wide, requires ferry or bridge): trade arteries, political borders, major settlement anchors
Lakes
Lakes form at local elevation minimums where river drainage collects. Size varies by drainage basin. At least one large lake exists per playthrough (visual landmark, potential quest location). Lakes in tundra regions freeze seasonally.
Coastline
The continent's edge is generated by the elevation map meeting sea level. Noise amplitude at coastal cells determines complexity: smooth beaches, rocky cliffs, fjord-like inlets (north), mangrove swamp (south), bay harbors (east/southeast).
At least 3 natural harbor sites are guaranteed (the economy needs ports). Harbor sites are identified algorithmically: sheltered bays where depth drops off near shore. Trade cities always generate at harbors.
LAYER 3: SETTLEMENT PLACEMENT
The Rules
Settlements don't appear randomly. They form where biology, geography, and economics demand them. The placement algorithm encodes this.
Step 1 — Identify Settlement Seed Points
Score every terrain cell for habitability:
habitability = (water_proximity × 3.0)
+ (flatness × 2.0)
+ (fertility × 2.0)
+ (trade_route_potential × 1.5)
+ (resource_proximity × 1.0)
- (elevation_extreme × 2.0)
- (hazard_proximity × 1.5)
Where:
water_proximity: distance to nearest river or lake (closer = higher)flatness: inverse of local elevation variance (flatter = higher)fertility: derived from moisture + temperature (good growing conditions)trade_route_potential: centrality score — how many other high-habitability cells are reachable without crossing mountains or deep waterresource_proximity: distance to mineable mountains, fishable coast, timber forestselevation_extreme: penalty for very high or very low (swamp) elevationhazard_proximity: penalty for proximity to wilderness zones with high encounter rates
Step 2 — Place Settlements by Tier
Starting from the highest-scored cells, place settlements with minimum-distance constraints (settlements can't be too close together — they compete for resources).
Tier 1: Capital City (1)
- Placed in the highest-scoring cell in the Eastern Industrial Belt macro-region or at the intersection of the two highest-scoring macro-regions.
- This is Sanctum Fidelis (Act III). Its position shifts per seed but is always a major, central, accessible city.
- Population: 1.5M–2.5M (scaled for narrative, not simulated)
- Must be on or adjacent to a major river AND a rail line (rail is generated later to connect to the capital, not the other way around).
Tier 2: Major Cities (4–6)
- Placed in the next highest-scoring cells, one per macro-region minimum.
- These include: Thornfield (Eastern Industrial), Fort Dustwall (Central Plains), Heartstone (Western Mountains), plus 1–3 additional cities for economy/exploration.
- Population: 30K–200K
- Must be on a river or coast.
Tier 3: Towns (15–25)
- Mid-scoring cells. Regional hubs, market towns, garrison posts.
- Population: 2K–30K
- Must be within 2 days' travel of a Tier 2 city OR on a major trade route.
- This tier includes Millhaven (Act I). Millhaven is always in the Eastern Temperate Forest, always on a river, always at least 1 day from the nearest Tier 2 city. It's small, rural, and accessible.
Tier 4: Villages & Outposts (40–80)
- Lower-scoring cells. Farming communities, mining camps, border outposts, waystations.
- Population: 50–2K
- Minimum distance from Tier 3+ settlements, but otherwise distributed by habitability score.
Tier 5: Points of Interest (100–200)
- Ruins, caves, abandoned mines, hermit dwellings, Imperium-era structures, wild shrines.
- Placed in LOW habitability cells (the interesting stuff is in the places people don't live). Mountain caves, deep forest, swamp islands, tundra ruins.
- Each PoI is tagged with: type (dungeon, ruin, landmark, resource node, secret), level range, and loot table tier.
Settlement Attributes — Generated Per Settlement
Each placed settlement receives procedurally generated attributes:
Demographics:
- Clade population ratio (weighted by macro-region affinity, with noise for variety). A Central Grasslands town is 60% Bovid/Cervid ± 15%. An Eastern Industrial town is more evenly mixed ± 10%. The Tangles skews toward hybrids and fringe populations.
- Hybrid population percentage (0.5%–5% in most places, 10%–30% in The Tangles and progressive urban centers).
Economy:
- Primary industry: farming, mining, manufacturing, trade, military, fishing (derived from terrain resources within the settlement's radius).
- Wealth level: poor, modest, comfortable, wealthy (derived from trade_route_potential and resource_proximity).
- Market tier: determines what equipment is available for purchase. Tier 4 villages have basic goods. Tier 1 capital has everything.
Governance:
- Government type: council, mayor, military commandant, clan elder, corporate, anarchic (weighted by Clade demographics and development level).
- Covenant enforcement: strong, moderate, weak, absent (derived from macro-region + government type + distance from capital).
Culture:
- Dominant cultural flavor: traditional Canid (hierarchical, pack-structured), traditional Cervid (communal, cautious), industrial cosmopolitan (mixed, progressive), frontier independent (libertarian, suspicious), hybrid underground (coded, communal).
- Festival calendar: each settlement has 1–3 local festivals tied to Clade traditions and seasons. These are flavor events that provide bonuses, shopping opportunities, and ambient worldbuilding.
Architecture:
- Size-dominant architecture: whose body the buildings are built for. A Bovid-majority town has wide doors, reinforced furniture, low counters. A Mustelid quarter has narrow corridors and ladder-access upper floors. Multi-Clade cities have adaptive zones.
- This affects gameplay: a Large PC in a Mustelid-scaled building has disadvantage on DEX checks. A Small PC in an Ursid district can't reach standard counters without accommodation.
Scent Profile:
- Each settlement has a generated ambient scent: industrial (coal, metal, chemical), agricultural (grain, livestock, earth), maritime (salt, fish, tar), forest (pine, decay, woodsmoke), urban dense (bodies, food, perfume, sewage).
- PCs with scent abilities experience this on arrival — atmospheric worldbuilding delivered through a sense most games ignore.
LAYER 4: INFRASTRUCTURE — ROADS, RAIL, TRADE
Road Network
Generation Method: Minimum Spanning Tree + Noise
- All Tier 1–3 settlements become nodes in a graph.
- Edge weights = terrain traversal cost between settlements (mountains expensive, plains cheap, rivers require bridge infrastructure).
- Generate a Minimum Spanning Tree to ensure all settlements are connected.
- Add 20–40% additional edges (shortcuts, alternate routes) weighted toward high-trade-potential connections.
- Route each edge through the terrain using A* pathfinding (cheapest traversable path), creating actual road paths that follow valleys, cross rivers at narrow points, and wind through mountain passes.
Road Types:
- Footpath: connects Tier 4–5 locations. Narrow, unpaved. No wagon access.
- Dirt road: connects Tier 3–4 locations. Single-width, seasonal mud.
- Post road: connects Tier 2–3 locations. Maintained, way-stations every day's travel.
- Highway: connects Tier 1–2 locations. Paved (cobble or macadam), wide, patrolled.
Rail Network
Rail technology exists in the Late Reconciliation Era. The rail network is sparser than the road network — it represents major capital investment.
- Capital (Tier 1) is the rail hub.
- Rail lines extend to each Tier 2 city via the lowest-cost terrain route.
- One additional rail line connects the easternmost port to the westernmost Tier 2 city (the transcontinental line — essential for Act IV's journey).
- Rail does NOT extend to Tier 3 or lower settlements. Getting off the rail means switching to road, horse, or foot.
Rail stations generate at each rail-connected settlement. Stations are travel hubs: shops, inns, information boards, and pickpocket encounters.
Trade Routes
Trade routes overlay the road/rail network with economic flow:
- Each settlement produces goods based on its economy (grain from agricultural, ore from mining, manufactured goods from industrial, fish from coastal).
- Each settlement demands goods it can't produce locally.
- Trade routes are generated by matching supply to demand along the transport network, weighted by distance and transport cost.
- Active trade routes generate: merchant caravans (mobile shops, encounter opportunities), bandit activity (proportional to route wealth), and economic modifiers (settlements on busy routes are wealthier).
LAYER 5: ENCOUNTER AND CONTENT DISTRIBUTION
Overworld Encounters
The space between settlements is not empty. Encounters are distributed using a density map layered over the terrain:
Density Factors:
- Distance from settlement: closer = safer (lower encounter rate), farther = wilder
- Terrain type: deep forest, mountain, and swamp have higher base encounter rates
- Road proximity: on-road encounters are social/economic (merchants, patrols, travelers); off-road encounters are environmental/hostile
- Macro-region hostility level: frontier and poorly-governed regions have higher rates
Encounter Types:
| Type | Examples | Frequency |
|---|---|---|
| Wildlife | Non-sentient predators, herd animals, dangerous fauna | Common (wilderness) |
| Traveler | Merchants, pilgrims, other adventurers, refugees | Common (roads) |
| Hostile | Bandits, Clade-nationalist paramilitaries, Maw agents (post Act I) | Moderate |
| Environmental | Weather events, terrain hazards, river crossings, cave-ins | Moderate |
| Social | Stranded NPC, roadside dispute, broken-down wagon, lost kit | Common (roads) |
| Scent Event | Unusual scent trail, predator territorial markers, fear-scent on the wind | Uncommon (flavor) |
| Rare Discovery | Hidden ruin entrance, Imperium artifact, wild Howl-stone, injured hybrid | Rare |
Encounter Scaling: Encounters are level-scaled to the PC's current level ± 2. Wilderness encounters in high-danger zones can exceed this by +3 (the world doesn't care what level you are — wander into the deep tundra at level 3 and face consequences).
Procedural Dungeons / Points of Interest
Tier 5 PoIs (the 100–200 scattered locations) are generated using modular room templates:
Dungeon Types:
- Imperium Ruin: stone corridors, coliseum-adjacent architecture, old traps, undead or feral non-sentient occupants. Loot: Imperium-era artifacts, historical documents.
- Abandoned Mine: tunnels, cave-ins, mineral deposits, possible Mustelid or Ursid former inhabitants. Loot: ores, gems, mining equipment, occasionally alchemical reagents.
- Cult Den: Clade-nationalist hideout, rawfang cult lair, or black-market lab. Sentient hostiles. Loot: intelligence, contraband, pheromone compounds.
- Natural Cave: wildlife dens, geological features, underground rivers. Loot: natural resources, rare herbs, fossils.
- Overgrown Settlement: abandoned village reclaimed by wilderness. Environmental storytelling — why did they leave? Loot: domestic goods, letters, cultural artifacts.
Modular Room Templates: Each dungeon type has 30–50 pre-designed room templates (authored, not generated) that are assembled procedurally:
- Select dungeon type based on PoI's terrain and macro-region.
- Determine dungeon size based on level range (small: 3–5 rooms, medium: 6–10, large: 11–20).
- Select entry room template.
- Connect rooms using a graph — linear for simple dungeons, branching for complex. Dead-ends contain loot or lore. Branches reconnect for loop options.
- Populate rooms from encounter tables appropriate to dungeon type and level.
- Place loot using tier-weighted random tables.
- Assign one room as "narrative room" — contains environmental storytelling (letters, journals, scent-traces, bodies arranged to tell a story) that enriches worldbuilding even without connecting to the main quest.
Clade-Responsive Design: Dungeon architecture reflects who built it. Mustelid tunnels are tight (Large PCs squeeze). Ursid ruins are vast (Small PCs feel exposed). Cervid-built spaces have high ceilings and wide corridors. Bovid structures are reinforced, heavy, low. This isn't decoration — it affects traversal mechanics and forces PCs to engage with the body-diversity premise of the world.
LAYER 6: NARRATIVE ANCHOR SYSTEM
The Problem
The main quest (The Reckoning of Mouths) has fixed story beats that expect specific locations: Millhaven, Thornfield, Fort Dustwall, The Tangles, Sanctum Fidelis, Heartstone. But the world is procedurally generated. How do we guarantee the story works while the map changes?
The Solution: Narrative Anchors
Narrative Anchors are abstract requirements that the settlement placement system must satisfy. They are NOT fixed coordinates — they are constraints.
| Anchor | Requirements | Assigned To |
|---|---|---|
| MILLHAVEN | Tier 3 town. Eastern Temperate Forest. On a river. 1–2 day travel from nearest Tier 2. Rural, agricultural, multi-Clade but Canid-leaning. | Act I start |
| THORNFIELD | Tier 2 city. Eastern Industrial Belt. On a river or rail line. Industrial economy. Dense population. Mustelid-heavy workforce. | Act II (Name 1) |
| FORT_DUSTWALL | Tier 2–3 settlement. Central Grasslands, near border of a Clade-majority zone. Military. On a road, not necessarily rail. Bovid/Cervid region. | Act II (Name 2) |
| THE_TANGLES | Macro-region (not a single settlement). Subtropical Lowlands. Low Covenant enforcement. Contains 2–4 Tier 4 settlements + Thornback Hollow (Tier 4, hybrid community). | Act II (Name 3) |
| SANCTUM_FIDELIS | Tier 1 capital. Central-eastern continent. Major river + rail hub. Maximum multi-Clade diversity. Contains: Fang & Claw Hall, Scent Market district, Hybrid Quarter (The Splits). | Act III |
| HEARTSTONE | Tier 2 city. Western Mountains. High elevation. Ancient architecture. Not on rail (must be reached by road for final leg). Neutral ground. | Act V |
Placement Priority: Narrative Anchors are placed FIRST, before general settlement distribution. The algorithm:
- Identify all terrain cells matching each Anchor's requirements.
- Score matching cells by how well they satisfy requirements.
- Place Anchors at highest-scoring cells, with minimum-distance constraints between Anchors (they can't cluster — the story needs continental span).
- Generate remaining settlements around the Anchors, treating Anchor settlements as pre-placed nodes in the settlement graph.
Internal Content: Each Anchor settlement has hand-authored internal content (quest-relevant NPCs, specific buildings, story-critical locations) that generates inside the settlement regardless of the procedural exterior. The slaughterhouse in Sanctum Fidelis exists every playthrough — but its address in the city changes. The observatory above Heartstone exists every playthrough — but which peak it sits on depends on the mountain generation.
Think of it as: the rooms are authored, but the building's floor plan is generated.
Quest Path Generation
The main quest requires travel between Anchors. The path the PC takes is generated by the road/rail network:
- Act I → Act II: Millhaven to Thornfield (road + possible rail).
- Act II (open order): Thornfield ↔ Fort Dustwall ↔ The Tangles. Three-hub travel. Road and rail connections vary per seed. Some playthroughs, Fort Dustwall is a short rail trip from Thornfield. Others, it's a 4-day overland trek. This variance is a feature — different playthroughs feel different in pacing and encounter exposure.
- Act III: Any Hub → Sanctum Fidelis. Rail is likely available for at least part of this journey.
- Act IV: Sanctum Fidelis → Heartstone. Cross-continent. This is always a long journey because Heartstone is in the western mountains and rail doesn't reach it. The "Long Road West" is long by design — the procedural system guarantees this by placing Heartstone beyond rail terminus.
- Act V: Already at Heartstone.
Travel Events: The content the PC encounters between Anchors is procedurally populated from the encounter system (Layer 5). Each journey segment generates: road encounters, off-road discoveries, settlement stops (for resupply, side quests, rest), and terrain challenges (river crossings, mountain passes, weather events).
LAYER 7: FACTION TERRITORY
Dynamic Faction Presence
Three factions (Inheritors, Thorn Council, Covenant Enforcers) have procedurally generated territorial influence:
Faction Influence Map: Each faction has a set of seed points (placed at appropriate settlements and PoIs) that radiate influence outward, decaying with distance. Influence maps overlay the world map, creating zones of control:
- Covenant Enforcers: Strongest near the capital, Tier 1–2 cities, and military outposts. Decays toward frontier regions.
- Inheritors: Strongest in predator-Clade-majority zones, rural regions, border territories. Anti-correlated with Covenant enforcement (strong where law is weak).
- Thorn Council: Strongest in prey-Clade-majority zones and progressive urban centers (paradoxically — they recruit from the educated and frightened). Moderate presence in The Tangles.
Gameplay Effect:
- In Enforcer zones: law is present, crimes are investigated, Covenant violations are prosecuted. Hostile encounters are rarer. Authority can be leveraged.
- In Inheritor zones: predator-Clade NPCs are more aggressive, prey-Clade NPCs are more fearful, black-market goods are available, Clade-nationalist propaganda is visible.
- In Thorn Council zones: prey-Clade NPCs are organized and suspicious of predators, hybrid NPCs face extra scrutiny, separatist rhetoric is mainstream.
- In unclaimed zones (frontier, wilderness): no faction dominates. Encounters are more random, law is self-made, and the PC's Clade identity matters more for individual interactions.
Dynamic Shift: Faction influence changes based on story progress. After Act II's Fort Dustwall events, Inheritor influence expands in the central plains (emboldened by the incident). After Act III's slaughterhouse raid, Enforcer presence tightens in the capital (crackdown). After Act IV choices, influence maps shift to reflect political outcomes. This gives the procedural world a sense of responding to the narrative.
LAYER 8: WEATHER AND SEASONAL SYSTEMS
Seasonal Cycle
The game spans approximately 3–4 months of in-world time (autumn through early winter). Seasons affect:
- Temperature: northern regions grow colder, travel becomes harder, tundra becomes impassable by late game. Southern regions remain mild. Clade-specific effects (Polar Ursid advantage, lion-folk heat lethargy becomes irrelevant in cold).
- Daylight: northern regions lose daylight hours, affecting visibility and encounter types (nocturnal predators more active). Southern regions maintain longer days.
- Precipitation: autumn rains swell rivers (crossing difficulty increases), mountain passes accumulate snow (Act IV's westward journey gets harder as the story progresses — built-in narrative pressure).
- Shedding cycles: relevant for thick-coated species. Narrative flavor, minor mechanical effects (Stealth disadvantage from shed fur trails if not groomed).
- Antler shed: Cervid characters experience the 2-month shed window during the game timeline. Mechanical impact per species rules.
Weather Generation
Daily weather generated per region using Markov chains seeded by season and biome:
| Biome | Autumn Weather Probabilities |
|---|---|
| Temperate Forest | Clear 30%, Overcast 30%, Rain 25%, Storm 10%, Fog 5% |
| Grassland | Clear 40%, Windy 25%, Overcast 20%, Rain 10%, Storm 5% |
| Mountain | Clear 20%, Overcast 20%, Rain 15%, Snow 25%, Storm 15%, Fog 5% |
| Subtropical | Clear 25%, Humid 25%, Rain 30%, Storm 15%, Fog 5% |
| Tundra | Clear 15%, Overcast 20%, Snow 35%, Blizzard 20%, Fog 10% |
Weather affects: visibility, travel speed, encounter rates, scent range (rain suppresses scent, dry cold amplifies it), and combat conditions (mud, wind, snow).
LAYER 9: SEED SYSTEM AND REPRODUCIBILITY
World Seed
A single integer seed generates the entire world deterministically. Same seed = same world, every time. This allows:
- Sharing seeds between players ("Try seed 47291 — the mountain pass in Act IV is brutal")
- Speedrun consistency (fixed seed category)
- Bug reproduction
- "Daily challenge" seeds
Seed → Generation Pipeline
SEED
│
├─ Terrain Gen (elevation, moisture, temperature)
│ └─ Uses seed directly for noise generation
│
├─ Hydrology (rivers, lakes, coastline)
│ └─ Derived from terrain + seed offset for drainage sources
│
├─ Settlement Placement
│ └─ Narrative Anchors first (deterministic from terrain)
│ └─ General settlements (seed-based selection from scored candidates)
│
├─ Infrastructure (roads, rail, trade)
│ └─ Derived from settlement graph + terrain costs
│
├─ Encounter Distribution
│ └─ Seed-based density + level scaling
│
├─ Dungeon Generation
│ └─ Seed offset per PoI for room selection and population
│
├─ Faction Influence
│ └─ Derived from settlement demographics + seed-based variation
│
└─ Weather
└─ Seed-based Markov chains per region per day
Performance Budget
World generation should complete in under 60 seconds on target hardware. Heaviest operations: terrain generation (noise computation), erosion simulation (if included), and road pathfinding (A* over large graph). All are parallelizable.
Streaming: The full continent does not need to be fully detailed at boot. Generate at low resolution first (macro-regions, Tier 1–2 settlements, rail network), then detail regions as the player approaches them (Tier 3–5 settlements, encounter placement, dungeon generation). This amortizes the cost across play sessions.
SUMMARY: WHAT CHANGES VS. WHAT STAYS
Always the Same (Authored)
- Continental macro-biome layout (east/west/north/south character)
- Narrative Anchor requirements (Millhaven is always rural eastern forest, etc.)
- Main quest structure (5 acts, same story beats)
- Quest-critical NPC roster and their roles
- Internal content of Anchor settlements (quest buildings, NPCs, events)
- Clade-to-biome affinity rules
- Room templates for dungeons
Always Different (Procedural)
- Exact coastline, mountain contours, river courses
- Specific placement of all settlements (including Anchors — they move within their allowed macro-region)
- Road and rail network topology
- Distance and travel time between quest locations
- Overworld encounter content between Anchors
- Dungeon layouts (assembled from templates)
- Settlement demographics (within weighted ranges)
- Weather sequences
- Faction influence boundaries
- Trade route patterns and economic modifiers
- Points of Interest placement and content
The Player Experience
First playthrough: "I traveled two days by rail from Thornfield to reach the capital, crossing a river valley full of Cervid farmland."
Second playthrough: "The rail didn't connect Thornfield to the capital this time — I had to ride overland through a mountain pass I'd never seen before, and got ambushed by Inheritor scouts in a snowstorm."
Same story. Different world. That's the goal.
Document Version 1.0 — Theriapolis Procedural World Generation Design Compiled by ENI for LO