WORLD OF GONZ WIKIOpen game ↗

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.

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

LayerExampleMutability
Generated originDesert climate, original elevation, basin, underlying geologyRetained as provenance and reconstruction baseline
Effective physical terrainIrrigated fertile soil, tree cover, slope, water table, shorelineChanges through validated simulation projects
Land useWilderness, managed forest, cropland, settlement, industry, preserveChanges subject to rights and capacity
Structures and networksFarmstead, woodcutter, well, road, mill, portBuild, 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:

  1. Surveyed footprint and actor's build rights.
  2. Suitable foundation: land/water, stability, slope and available area.
  3. Required local resources: trees, fertile soil, deposit, fish stock, wind or water flow.
  4. Required adjacency: navigable shore, river, road, district or supply network.
  5. Technology, trained labor, delivered materials, funding, upkeep and legal permissions.
  6. 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

ProjectPrerequisitesResultCosts and consequences
Clear woodlandTrees, logging rights, labor and accessCleared ground without harvestable treesTools, habitat loss; bounded salvage once; soil may still need preparation
Prepare croplandCleared/grass ground, viable soil, rain or irrigationCultivable ground before a separate field projectSoil improvement, water allocation, erosion and seasonal labor
Afforest / reforestPlantable soil, suitable species, water, seed stockSaplings → young woodland → mature forestLong growth time and upkeep; woodcutter unlocks only at harvestable maturity
Irrigate and restore arid soilSustainable source, water rights, conveyance, suitable slope, soil amendmentsMaintained fertile irrigated terrain in an arid climateHigh initial cost, water and maintenance; salinity and reversion risk
Drain and stabilize wetlandOutlet, hydrological approval, fill/foundation worksDrained stable ground; fertility separately assessedFlood displacement, habitat loss, subsidence and drainage upkeep
Restore wetlandSuitable low ground, water source, affected-owner agreementWetland habitat and flood storageRemoval of incompatible land uses; fish/reed opportunities
Terrace hillsFeasible slope, engineers, retaining materials, stable geologyStable terraces with lower local slopeRetaining-wall maintenance and runoff; does not create fertile soil or ore
Excavate / levelFeasible volume, tools, hauling, disposal destinationChanged local elevation and foundationSpoil transport, erosion, landslide risk; mountains require major works
Canal / local channel diversionConnected watershed, gradient, water budget, downstream rightsReal channel/edge with capacity and navigabilityLocks/pumps/bridges where needed; changed trade and flood risk
Dredge / reclaim shallowsSurveyed shallow water, fill/spoil budget, coastal engineering permissionNavigable berth or stabilized reclaimed groundHigh upkeep and habitat cost; deep ocean is not ordinary reclamation
Restore damaged landSurveyed burned, polluted or exhausted groundRecovering soil/habitat over timeRemediation costs; contamination and depleted ore never reset by repainting
Demolish / convert buildingAuthority, relocation/eviction resolution, safe work planVacant or repurposed footprintPartial 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.

FamilyBuilding typesPlacement and purpose distinctions
Food and farmingGrain field, vegetable plot, rice paddy, orchard, vineyard, pasture, apiary, mill, granarySoil, water and grazing constraints; processors can use delivered crops
Forestry and ecologyWoodcutter, forester lodge, nursery, plantation, hunting lodge, herbalist, ranger stationLiving habitat and maturity; nurseries create seedlings rather than instant timber
ExtractionQuarry, clay pit, iron/copper/coal/gold/gem mine, peat works, salt worksVerified local resources, quality, depletion and hauling
Craft and industrySawmill, charcoal kiln, smithy, foundry, toolmaker, pottery, brickworks, tannery, weaver, brewery, glassworks, armorerImportable inputs, workers, emissions, water and transport
Housing and servicesCottage, tenement, manor, inn, tavern, bathhouse, well, cistern, bakery, communal kitchenClimate-specific materials; density, affordability and water needs
Health and sanitationClinic, hospital, apothecary, sewer works, waste yard, quarantine station, cemeteryPopulation access, clean water and separation from harmful uses
Trade and financeMarket, caravanserai, warehouse, bonded depot, trading post, exchange, bank, mint, tollhouseTransport access; banks need reserves; tolls require legal jurisdiction
Transport and waterRoad station, bridge, ferry landing, river dock, harbor, shipyard, lighthouse, canal lock, aqueduct, pump, reservoirReal topology, depth, gradient, connection capacity and water rights
Military and securityWatchtower, barracks, archery range, stable, armory, supply depot, fort, citadel, wall, naval arsenalSupply burden, defense geography, real maritime access
GovernmentCouncil hall, courthouse, embassy, tax office, governor residence, archive, prison, assembly squareInstitutions enable bounded authority; a building alone cannot grant office or treaties
Knowledge and cultureSchool, library, university, observatory, academy, temple, theater, monument, museumSpecialists, civic demand, sight lines, cultural and heritage constraints
Frontier and rare sitesSurvey camp, expedition lodge, rescue station, excavation camp, research outpost, preserve, arcane observatory, mana refineryAppropriate 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

  1. Woodcutter fits mature woodland; desert, saplings, burned forest and cleared land reject it without spending.
  2. Fields reject untreated desert. Queued irrigation does not unlock them; completed suitable soil/water does.
  3. Irrigation needs a real sustainable source and rights; upkeep failure reduces yields and eventually degrades terrain.
  4. A desert sawmill can process imported timber, while a local woodcutter cannot extract nonexistent trees.
  5. Terracing barren rock creates neither fertile soil nor a mineable deposit.
  6. Clearing credits salvage once and disables forestry; reforestation must mature before extraction resumes.
  7. Failed irrigation blocks dependent fields; cancellation returns only unused reservations, not free reversal of earthworks.
  8. Competing conversions cannot reserve the same footprint; downstream owners receive notice and actual water effects.
  9. Restart preserves stages, costs, water changes and revisions across affected cells.
  10. 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 itemExisting useful artWhat it can do nowMissing for authoritative build/destroy
Towerfortification/watchtower Heroes for grasslands/hills; watchtower RGBA motif; ruins/fallen-tower; ruin-archPrototype an individually placed working tower and show a macro watchtower placeMatched foundation/frame, damaged and ruined tower in the same scale/palette; fallen-tower Hero is mountain terrain and is not a valid automatic swap
SmithyIndustrial City work shelter/fuel-bin companion; generic sheds and cottagesLive semantic structure using a generic shed motif; consumes ore and charcoal to produce iron and toolsDistinct forge structure, damaged/ruined silhouettes, anvil/fuel storage, restrained smoke/forge live effect
StablesMarket Town trade shed/hitching rail; cottagesLive feed-and-horse logistics structure using a generic shed motif; produces construction haulageStable silhouette, yard/trough decal, matched damaged/ruined states and climate variants
Town housesmall-cottage, cottage-pair RGBA motifs; hamlet and citadel cottage companions; many village/town HeroesGood prototype housing objects and low-zoom settlement vocabularyConstruction, damaged and ruin states; dense urban and climate variants; occupancy/upgrade presentation
Castlefortification/stone-castle, ruined-castle, hillfort, keeps and citadelsLive seven-cell semantic castle with procedural footprint/structure fallback; opaque scenes remain macro referencesMatched 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 pitresource/clay-pit Heroes and detail/ground paintings for mountain, grasslands and desertLive semantic extractor on the surveyed Greywood clay bed; an honest procedural pit replaces inappropriate opaque scene reuseWork equipment cutouts, exhausted/flooded projection, damage/closure and restored-ground states
Forest lodgeLumber Village and forest-town Heroes; cottage/timber-shed companionsPrototype with a cottage plus woodland motifsA distinct remote lodge pack with construction, occupied, damaged and ruin states
ForesterCottage, sapling/tree and woodland-brush RGBA motifsPrototype a forester's lodge/nursery compositionDistinct nursery beds, seedling/management decals and lifecycle states. “Forester” is an occupation; the placeable structure is a forester's lodge or nursery
LumbermillLumber Village Hero and its timber rack/open lean-to/log-stack companionStrong macro lumber settlement; usable prototype lumber yardIdentifiable mill machinery or sawpit, working/damaged/ruined states, log input and timber output dressing; watermill only where flow exists
Iron mineresource/iron-deposit for forest/desert; mine-entrance RGBA motif; ruins/abandoned-mineLive surveyed/depleting deposit with a generic operational entrance and full shared structure lifecycleIron-specific working equipment, spoil/haul decals and matched collapsed/exhausted projections
Fisherymarsh-fisher-hut; Fishing Village net shelter; Port Town jetty; Harbor City cargo shed/landingLive extractor on renewable Tidebreak stocks using a procedural fisher-hut fallbackTemperate/wetland/tundra cutouts, boats/nets, matched storm damage and ruined/abandoned states
Fishing townFishing Village, Port Town and Harbor City Heroes and companionsLive emergent Tidebreak stage derived from fisheries, landing, housing, smokehouse and marketProduction 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:

DefinitionFootprintInstallation conditionsOperationFailure/land consequence
Town houseOne compact settlement footprintStable buildable ground, access, materials and residential rightHouses residents and contributes available labor; consumes water/fuel/food through settlement servicesDamage displaces capacity; ruins retain cellar/foundation and debris
Forest lodgeOne forest-edge footprintAccessible woodland district, stable clearing and use rightSupports workers, scouts, hunters and fire response; may store limited suppliesNo mature forest pauses forestry benefits but not shelter; fire can damage it
Forester's lodge/nurseryOne compact footprint plus managed nursery areaPlantable soil, water, seed stock and forestry rightSchedules planting, tending and selective thinning; improves survival/detection within bounded rangeNeglect lowers survival; it cannot mature trees instantly
LumbermillOne industrial footprint plus stockyardStable ground, road/track access and delivered construction materialsConverts delivered logs into timber; flow-powered variant additionally needs real water flowMissing logs/labor pauses output; fire and debris risk rise with stock
WatchtowerOne compact defensive footprintStable foundation, sight line, legal authority and accessStaffed detection/control radius; consumes wages/suppliesUnstaffed 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, with definitionId, anchor, orientation and footprint quote;
  • ASSIGN_STRUCTURE_STAFF and 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_STRUCTURE command.

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:

  1. Implemented foundation: clay deposit → clay pit → kiln/brickworks → bricks. Masonry housing/walls remain;
  2. Implemented foundation: iron deposit → iron mine plus logs → charcoal kiln → smithy → iron/tools. Tool bonuses and a separate toolmaker remain;
  3. Implemented foundation: pasture → feed plus commissioned horses → stables → haulage that shortens construction and rebuilding. Route carts/travel bonuses remain;
  4. Implemented at Tidebreak: renewable fish stock → fishery → landing/smokehouse/market/housing → fishing settlement specialization with destruction regression;
  5. 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.