Engineering, operations & design history
Mutable terrain and the building library
Full repository source: docs/terrain-and-buildings.md
Technical documentation includes historical decisions, proposals and verification reports. For playing instructions and practical rules, open Gameplay.
No matching entry. Try a shorter phrase or clear the search.
Mutable terrain and the building library
Design extension, 9 September 2026. Refines the MMO design and living-world architecture. Status: specification plus a local compatibility planner; persistent terraforming is not implemented yet.
Core rule
Most ordinary tiles can change. Players and AI can construct buildings, clear or plant vegetation, improve soil, reshape ground, change water conditions, demolish structures and restore damaged land. Biomes create starting opportunities and constraints, not permanently locked classes of land.
Without terraforming, buildings must fit the tile's current biome and physical conditions. A woodcutter needs harvestable trees. A conventional field cannot be placed directly in a desert. Transforming land changes what becomes possible, but placing a building never silently performs that transformation for free.
The strategic choice is: use this land as it is, invest in transforming it, or obtain what we need through trade. All three remain viable.
1. Origin, terrain, land use and buildings
| Layer | Example | Mutability |
|---|---|---|
| Generated origin | Desert climate, original elevation, basin, underlying geology | Retained as provenance and reconstruction baseline |
| Effective physical terrain | Irrigated fertile soil, tree cover, slope, water table, shoreline | Changes through validated simulation projects |
| Land use | Wilderness, managed forest, cropland, settlement, industry, preserve | Changes subject to rights and capacity |
| Structures and networks | Farmstead, woodcutter, well, road, mill, port | Build, expand, repair, convert, abandon, demolish |
Use biome in the interface (the user's “biodome”). Evaluate actual conditions, not merely a label or visible painting. Burned forest no longer provides harvestable trees. Desert-origin ground supports conventional crops only after completed works establish viable cultivated terrain with soil and reliable water. The regional arid climate and ongoing water costs remain.
“Immutable natural geography” in earlier documents now means generated origin, not permanently immutable gameplay geography. Apply durable terrain patches to that origin. Construction, navigation, ecology, production and artwork must read the same effective state. A real canal changes routes; a picture of one does not.
2. Eligibility and operation
Every building definition declares reusable conditions:
- Surveyed footprint and actor's build rights.
- Suitable foundation: land/water, stability, slope and available area.
- Required local resources: trees, fertile soil, deposit, fish stock, wind or water flow.
- Required adjacency: navigable shore, river, road, district or supply network.
- Technology, trained labor, delivered materials, funding, upkeep and legal permissions.
- No conflicting project, protected feature or incompatible occupied footprint.
Show failed requirements and remedies. Classify terrain as suitable, needs transformation, not feasible, or unknown pending survey. Suitable terrain does not mean funds, tenure or labor are already available.
Installation and operating conditions are separate. A sawmill can import timber; a woodcutter extracts local trees. A foundry can import ore; an iron mine needs a surveyed iron deposit. A warehouse or climate-adapted house can stand on stable desert ground; a crop field cannot use that exception. Rice paddies additionally need managed shallow water; a grain field may need drainage instead.
When conditions deteriorate, output falls or pauses. A woodcutter loses production after forest depletion; an irrigated field loses yield if water fails. Buildings remain as idle, damaged or abandoned structures instead of disappearing immediately.
3. Transformation projects
| Project | Prerequisites | Result | Costs and consequences |
|---|---|---|---|
| Clear woodland | Trees, logging rights, labor and access | Cleared ground without harvestable trees | Tools, habitat loss; bounded salvage once; soil may still need preparation |
| Prepare cropland | Cleared/grass ground, viable soil, rain or irrigation | Cultivable ground before a separate field project | Soil improvement, water allocation, erosion and seasonal labor |
| Afforest / reforest | Plantable soil, suitable species, water, seed stock | Saplings → young woodland → mature forest | Long growth time and upkeep; woodcutter unlocks only at harvestable maturity |
| Irrigate and restore arid soil | Sustainable source, water rights, conveyance, suitable slope, soil amendments | Maintained fertile irrigated terrain in an arid climate | High initial cost, water and maintenance; salinity and reversion risk |
| Drain and stabilize wetland | Outlet, hydrological approval, fill/foundation works | Drained stable ground; fertility separately assessed | Flood displacement, habitat loss, subsidence and drainage upkeep |
| Restore wetland | Suitable low ground, water source, affected-owner agreement | Wetland habitat and flood storage | Removal of incompatible land uses; fish/reed opportunities |
| Terrace hills | Feasible slope, engineers, retaining materials, stable geology | Stable terraces with lower local slope | Retaining-wall maintenance and runoff; does not create fertile soil or ore |
| Excavate / level | Feasible volume, tools, hauling, disposal destination | Changed local elevation and foundation | Spoil transport, erosion, landslide risk; mountains require major works |
| Canal / local channel diversion | Connected watershed, gradient, water budget, downstream rights | Real channel/edge with capacity and navigability | Locks/pumps/bridges where needed; changed trade and flood risk |
| Dredge / reclaim shallows | Surveyed shallow water, fill/spoil budget, coastal engineering permission | Navigable berth or stabilized reclaimed ground | High upkeep and habitat cost; deep ocean is not ordinary reclamation |
| Restore damaged land | Surveyed burned, polluted or exhausted ground | Recovering soil/habitat over time | Remediation costs; contamination and depleted ore never reset by repainting |
| Demolish / convert building | Authority, relocation/eviction resolution, safe work plan | Vacant or repurposed footprint | Partial salvage, debris, displaced jobs/population; no full refund farming |
Most tiles are mutable at some scale, but transformations are not equally feasible or affordable. Terraforming cannot manufacture deposits, instantly change regional climate, or freely swap any biome for any other. Major mountain removal, deep ocean works and watershed engineering are later megaprojects where feasible. Only a small explicit set of world-critical anchors is permanently protected; ordinary tiles are not protected merely because their art is special.
Example journeys
Desert → cultivated region: survey source → negotiate water rights → build conveyance/storage → stabilize and amend soil → complete irrigation → verify fertile soil and reliable water → construct fields → maintain waterworks. A promised irrigation job or decorative oasis painting does not unlock farming. Water failure warns, reduces yield, then degrades terrain.
Forest → farming district: compare timber income with crops → clear chosen cells → credit limited timber salvage once → improve soil → build fields. Forestry jobs and habitat are lost. Replanting is possible, but mature woodland takes time to recover.
Plains → timber region: nursery and planting → sapling care → young woodland → harvestable maturity → woodcutter. Planting cannot immediately create saleable timber.
Mountain → industrial center: terrace/cut foundation → connect food and road supply → build foundry and workshops. Mining additionally needs a verified deposit. Excavating barren rock never creates iron.
4. An expandable building catalog
Breadth should create different economies and places, not hundreds of identical percentage upgrades. These are design families; the prototype represents a subset.
| Family | Building types | Placement and purpose distinctions |
|---|---|---|
| Food and farming | Grain field, vegetable plot, rice paddy, orchard, vineyard, pasture, apiary, mill, granary | Soil, water and grazing constraints; processors can use delivered crops |
| Forestry and ecology | Woodcutter, forester lodge, nursery, plantation, hunting lodge, herbalist, ranger station | Living habitat and maturity; nurseries create seedlings rather than instant timber |
| Extraction | Quarry, clay pit, iron/copper/coal/gold/gem mine, peat works, salt works | Verified local resources, quality, depletion and hauling |
| Craft and industry | Sawmill, charcoal kiln, smithy, foundry, toolmaker, pottery, brickworks, tannery, weaver, brewery, glassworks, armorer | Importable inputs, workers, emissions, water and transport |
| Housing and services | Cottage, tenement, manor, inn, tavern, bathhouse, well, cistern, bakery, communal kitchen | Climate-specific materials; density, affordability and water needs |
| Health and sanitation | Clinic, hospital, apothecary, sewer works, waste yard, quarantine station, cemetery | Population access, clean water and separation from harmful uses |
| Trade and finance | Market, caravanserai, warehouse, bonded depot, trading post, exchange, bank, mint, tollhouse | Transport access; banks need reserves; tolls require legal jurisdiction |
| Transport and water | Road station, bridge, ferry landing, river dock, harbor, shipyard, lighthouse, canal lock, aqueduct, pump, reservoir | Real topology, depth, gradient, connection capacity and water rights |
| Military and security | Watchtower, barracks, archery range, stable, armory, supply depot, fort, citadel, wall, naval arsenal | Supply burden, defense geography, real maritime access |
| Government | Council hall, courthouse, embassy, tax office, governor residence, archive, prison, assembly square | Institutions enable bounded authority; a building alone cannot grant office or treaties |
| Knowledge and culture | School, library, university, observatory, academy, temple, theater, monument, museum | Specialists, civic demand, sight lines, cultural and heritage constraints |
| Frontier and rare sites | Survey camp, expedition lodge, rescue station, excavation camp, research outpost, preserve, arcane observatory, mana refinery | Appropriate discoveries, habitats, rare resources and funded expeditions |
Buildings also have terrain/climate variants and lifecycle tiles: timber longhouse, desert courtyard house, highland stone cottage, stilt dwelling, insulated tundra lodge; foundations, working, upgraded, damaged, abandoned and ruined. Variants may change inputs and upkeep. A watermill needs flowing water; a windmill needs wind exposure; an animal mill consumes animal labor.
Extensive activities occupy cells or districts. Compact buildings use limited settlement slots/footprints. Large works span multiple cells. Roads, canals and walls use connected edges. A hex need not contain only one building, but total area, access, hazards and incompatible land uses constrain density. A foundry cannot share its footprint with crops.
BuildingDefinition:
id, family, purpose, stages, variants
footprint, placementLayer, terrainPredicates, adjacencyPredicates
localResourceRequirements, districtCompatibility
constructionInputs, laborSkills, constructionWork
productionInputs, outputs, capacity, upkeep
operatingRequirements, emissions, hazards, influenceEffects
unlocks, repairs, conversions, demolitionSalvage
visualRecipesByTerrainClimateAndStage
Predicates include harvestable tree cover, fertility, reliable water versus demand, maximum slope, verified deposit kind, navigable shore and stable foundation. “Forest-only” is a UI summary, not a hardcoded substitute for real conditions.
5. Screens and interactions
S24 Buildings & biome fit: selected plot → building family/search → purpose, inputs/outputs → current conditions → failed requirements and remedies → suitable now versus possible after conversion. Include unavailable buildings so players can discover future options. Construction preview includes footprint and recurring burden.
S25 Terraforming planner: current versus proposed terrain → steps/costs/work time → upkeep → affected cells and downstream consequences → displaced uses → buildings enabled and disabled → legal approval and project review.
Flow: select plot → Buildings or Terraform → compare conversion → review neighbors/rights and cost → queue transformation → complete and verify effective terrain → separately accept construction. Drafted dependent buildings cannot start early; failed or cancelled conversion leaves them blocked with an explanation.
The current prototype uses labeled sample plots and a hypothetical completed-terrain preview. Selecting a conversion does not change the actual Gonz map or execute an order. Projected suitability does not grant construction rights before completion. The planner evaluates terrain fit only; stock, labor, offices and permits need the future server.
6. Shared-world and AI consequences
Hydrology, clearing, excavation and pollution can affect neighbors. Disclose affected area, notice, consent/water-right requirements and dispute jurisdiction. A permit for one private tile cannot silently authorize draining a neighbor's river. Infrastructure removal requires safe rerouting. Interrupted works retain physical progress and can be stabilized/restored.
AI obeys identical terrain predicates, stages, scarce water/material budgets and knowledge limits. Governors may automate low-impact transformations inside a district mandate. Major waterways, displacement and protected-site removal require explicit authority. Death stewards preserve lawful ongoing works; they cannot initiate major reconstruction outside the inherited mandate.
Approval consumes strategic attention per coherent project; physical costs scale with area, earth volume, difficulty, access and external works. Repeated clearing/replanting or demolition/rebuilding must not mint materials. Conservation, trade, restoration and leaving land untouched remain useful alternatives.
7. Durable state and incoming tiles
Add sparse TerrainPatch state: effective elevation/slope, substrate, fertility, soil condition, tree cover/maturity, water regime, salinity/pollution, foundation stability, project ID and revision. Separate land use, structures and network edges. Watershed owners coordinate water changes; publish coherent revisions to affected areas.
Lifecycle: draft → surveyed → permitted → materials reserved → working stages → completed → maintaining/recovering. Alternatives: blocked, cancelled, stabilized partial works, failed or reverted. Record salvage, disposal, withdrawals and spending once. Revalidate at acceptance, construction start and operation; stale plans never bypass changed terrain.
Artwork depicts current terrain, building variant and project stage. Converted desert gains a cultivated patch while surrounding arid land remains. New art adds approved recipes; it cannot change water, deposits, terrain rules or completed projects. Missing assets use semantic footprints/stage badges. Mask/replace baked-in old scenery: new fields cannot retain mature trees underneath.
Earlier blanket protection of landmark art is narrowed to explicit world-critical or legally protected sites. Ordinary illustrated forests, settlements, farms, mines and landmarks need replaceable, damageable or removable states.
8. Acceptance scenarios
- Woodcutter fits mature woodland; desert, saplings, burned forest and cleared land reject it without spending.
- Fields reject untreated desert. Queued irrigation does not unlock them; completed suitable soil/water does.
- Irrigation needs a real sustainable source and rights; upkeep failure reduces yields and eventually degrades terrain.
- A desert sawmill can process imported timber, while a local woodcutter cannot extract nonexistent trees.
- Terracing barren rock creates neither fertile soil nor a mineable deposit.
- Clearing credits salvage once and disables forestry; reforestation must mature before extraction resumes.
- Failed irrigation blocks dependent fields; cancellation returns only unused reservations, not free reversal of earthworks.
- Competing conversions cannot reserve the same footprint; downstream owners receive notice and actual water effects.
- Restart preserves stages, costs, water changes and revisions across affected cells.
- Incoming paintings leave eligibility, resources, jobs and terrain history unchanged.
9. Existing asset utilization and dynamic building rollout
Asset review updated 16 September 2026. The active Atlas v2 expansion contains 243 illustrated-place identities and 584 companion paintings. These are mostly opaque RGB landscape plates. They give excellent terrain palettes, finished place identities and regional silhouettes, but a building painted into them cannot be independently removed. The separate Hero-connector motif library contains 32 transparent 256 × 256 RGBA cutouts and is the immediate prototype source for individually placed objects.
Implementation note, 16 September 2026: the woodland, clay/brick, iron/fuel/smithing, horse/logistics, coastal-fishing and fortified-center foundations are live across Greywood Stewardship and Tidebreak Coast. Their 18 authoritative definitions are in src/living-world/catalog.js, semantic lifecycle recipes are in public/dynamic-recipes.json, and execution is owned by src/living-world/zone-engine.js. Opaque Hero paintings have not been misrepresented as removable objects; matched production lifecycle packs, broader terrain projects and world-wide mutable zoning remain future work.
Requested places and structures
| Requested item | Existing useful art | What it can do now | Missing for authoritative build/destroy |
|---|---|---|---|
| Tower | fortification/watchtower Heroes for grasslands/hills; watchtower RGBA motif; ruins/fallen-tower; ruin-arch | Prototype an individually placed working tower and show a macro watchtower place | Matched foundation/frame, damaged and ruined tower in the same scale/palette; fallen-tower Hero is mountain terrain and is not a valid automatic swap |
| Smithy | Industrial City work shelter/fuel-bin companion; generic sheds and cottages | Live semantic structure using a generic shed motif; consumes ore and charcoal to produce iron and tools | Distinct forge structure, damaged/ruined silhouettes, anvil/fuel storage, restrained smoke/forge live effect |
| Stables | Market Town trade shed/hitching rail; cottages | Live feed-and-horse logistics structure using a generic shed motif; produces construction haulage | Stable silhouette, yard/trough decal, matched damaged/ruined states and climate variants |
| Town house | small-cottage, cottage-pair RGBA motifs; hamlet and citadel cottage companions; many village/town Heroes | Good prototype housing objects and low-zoom settlement vocabulary | Construction, damaged and ruin states; dense urban and climate variants; occupancy/upgrade presentation |
| Castle | fortification/stone-castle, ruined-castle, hillfort, keeps and citadels | Live seven-cell semantic castle with procedural footprint/structure fallback; opaque scenes remain macro references | Matched multi-cell operational/damaged/ruined set on one terrain family and modular wall/gate pieces; existing Stone Castle and Ruined Castle are different terrain profiles and compositions |
| Clay pit | resource/clay-pit Heroes and detail/ground paintings for mountain, grasslands and desert | Live semantic extractor on the surveyed Greywood clay bed; an honest procedural pit replaces inappropriate opaque scene reuse | Work equipment cutouts, exhausted/flooded projection, damage/closure and restored-ground states |
| Forest lodge | Lumber Village and forest-town Heroes; cottage/timber-shed companions | Prototype with a cottage plus woodland motifs | A distinct remote lodge pack with construction, occupied, damaged and ruin states |
| Forester | Cottage, sapling/tree and woodland-brush RGBA motifs | Prototype a forester's lodge/nursery composition | Distinct nursery beds, seedling/management decals and lifecycle states. “Forester” is an occupation; the placeable structure is a forester's lodge or nursery |
| Lumbermill | Lumber Village Hero and its timber rack/open lean-to/log-stack companion | Strong macro lumber settlement; usable prototype lumber yard | Identifiable mill machinery or sawpit, working/damaged/ruined states, log input and timber output dressing; watermill only where flow exists |
| Iron mine | resource/iron-deposit for forest/desert; mine-entrance RGBA motif; ruins/abandoned-mine | Live surveyed/depleting deposit with a generic operational entrance and full shared structure lifecycle | Iron-specific working equipment, spoil/haul decals and matched collapsed/exhausted projections |
| Fishery | marsh-fisher-hut; Fishing Village net shelter; Port Town jetty; Harbor City cargo shed/landing | Live extractor on renewable Tidebreak stocks using a procedural fisher-hut fallback | Temperate/wetland/tundra cutouts, boats/nets, matched storm damage and ruined/abandoned states |
| Fishing town | Fishing Village, Port Town and Harbor City Heroes and companions | Live emergent Tidebreak stage derived from fisheries, landing, housing, smokehouse and market | Production district-level overview texture and more constituent building variants; it remains a specialization, not one building definition |
Legacy SVG/runtime-raster variations remain useful for catalog thumbnails, fallbacks and art reference. They must not be interpreted as five lifecycle stages: the variation number is visual variety, not construction or condition.
Production dependencies
The catalog needs a few supporting structures that were not in the requested list:
- a manual sawpit or starter conversion ability so the first lumbermill is not self-dependent;
- kiln/brickworks between clay pit and brick construction;
- charcoal kiln or another fuel supply between woodland and smithy;
- warehouse or stockyard for physical inputs and outputs;
- landing, smokehouse or cold storage between fishery and fishing-town growth;
- rubble/salvage yard for safe demolition and reconstruction.
These support structures should remain modest. Their purpose is to make resource chains physical and interruptible, not to create repetitive building chores.
First woodland catalog
Implement these definitions first:
| Definition | Footprint | Installation conditions | Operation | Failure/land consequence |
|---|---|---|---|---|
| Town house | One compact settlement footprint | Stable buildable ground, access, materials and residential right | Houses residents and contributes available labor; consumes water/fuel/food through settlement services | Damage displaces capacity; ruins retain cellar/foundation and debris |
| Forest lodge | One forest-edge footprint | Accessible woodland district, stable clearing and use right | Supports workers, scouts, hunters and fire response; may store limited supplies | No mature forest pauses forestry benefits but not shelter; fire can damage it |
| Forester's lodge/nursery | One compact footprint plus managed nursery area | Plantable soil, water, seed stock and forestry right | Schedules planting, tending and selective thinning; improves survival/detection within bounded range | Neglect lowers survival; it cannot mature trees instantly |
| Lumbermill | One industrial footprint plus stockyard | Stable ground, road/track access and delivered construction materials | Converts delivered logs into timber; flow-powered variant additionally needs real water flow | Missing logs/labor pauses output; fire and debris risk rise with stock |
| Watchtower | One compact defensive footprint | Stable foundation, sight line, legal authority and access | Staffed detection/control radius; consumes wages/supplies | Unstaffed tower gives no active watch; damage reduces range before ruin |
The starter settlement may use manual felling and a sawpit at low efficiency. The first goal is to build a sustainable chain, not to receive free mature timber from planting.
Stateful art recipe
Dynamic assets use a separate manifest from place-selection art:
DynamicVisualRecipe:
id, definitionId, projectionRole
stage, conditionBand, terrainProfiles, climateTags
footprintCells, anchor, orientationMode, worldScale
sourcePath, runtimePath, alphaMode
contactMask, shadowMask, occlusionBounds
overviewSymbol, fallbackRecipe, artVersion
Individual buildings use transparent cutouts. Terrain replacements such as cleared or burned ground may use opaque full-bleed material under a feathered world-space mask. Ground state renders below landmarks and structures; buildings render above protected landmark art only when their legal footprint permits it; smoke, fire, workers and selection remain live effects.
Initial generic stages are shared across definitions: site preparation, timber frame, stone foundation/scaffold, rubble and salvage. Each first-slice building then needs operational, damaged and ruined silhouettes. This avoids commissioning a complete custom construction sequence for every definition while ensuring destruction does not look like simple disappearance.
Command set for the slice
Use one revision-bound, idempotent command path:
START_CLEARING,START_PLANTING,SET_FOREST_MANAGEMENT;START_CONSTRUCTION, withdefinitionId, anchor, orientation and footprint quote;ASSIGN_STRUCTURE_STAFFand bounded inventory transfer jobs;START_REPAIR,START_DEMOLITION,START_SALVAGE,START_REBUILD;- conflict events apply damage through the combat/siege rules; there is no unrestricted remote
DESTROY_STRUCTUREcommand.
Every command resolves to jobs and domain events. Examples include VegetationCleared, LogsCreated, SaplingsPlanted, StructureStageChanged, StructureDamaged, StructureRuined, SalvageRecovered and StructureRebuilt. Material creation and salvage are recorded exactly once.
Economic-line rollout
After the woodland slice is restart-safe, add complete small chains instead of isolated buildings:
- Implemented foundation: clay deposit → clay pit → kiln/brickworks → bricks. Masonry housing/walls remain;
- Implemented foundation: iron deposit → iron mine plus logs → charcoal kiln → smithy → iron/tools. Tool bonuses and a separate toolmaker remain;
- Implemented foundation: pasture → feed plus commissioned horses → stables → haulage that shortens construction and rebuilding. Route carts/travel bonuses remain;
- Implemented at Tidebreak: renewable fish stock → fishery → landing/smokehouse/market/housing → fishing settlement specialization with destruction regression;
- Implemented foundation: watchtower → three-cell keep → seven-cell castle using timber, bricks, iron, tools and food, with full-footprint ruins, salvage and rebuild.
Each line must include suitable, idle, damaged, ruined, exhausted where applicable, demolition, and rebuild behavior before the next broad catalog wave begins.