Skip to main content

Roadmap and Follow-ups

This page records the numbered build steps and the decisions made in each, the conventions every step follows, and the work deliberately left for later.

Steps 1–9 (movement, gathering, skills, materials, stations, refining, quality, crafting and the NPC economy) predate this page; they are described in Gameplay. Steps 10–19 are all done; Step 20, farming, is under way. Much of the game since has been built outside the numbered steps — creatures, birds, pets and riding, carts, the bow chain, models and the player body — and is described in the Gameplay and Game Client sections. The step write-ups below are kept as they were written, so details in them may since have changed: the server's physics tick, for example, is 60 Hz, with state sent at 30 Hz.


Completed Steps​

Step 10: Combat, Death & Pack Drop ✅​

Status: Complete
Branch/Commit: 31947c8 → 21ccd5c

Features Implemented​

  • Creature system (Wolf, Bear) with stats, loot tables
  • Spawner entities with max_alive limits
  • Combat RPCs: ClientAttack, ReceiveCombatStance
  • Death handling: respawn at bind point, pack drop (gold + items)
  • Equipment system: slots (Head, Chest, Legs, Feet, Hands, MainHand, OffHand, Neck, Ring1, Ring2)
  • Weapon stats: Damage, WeaponType, AttackCooldown
  • Combat stance toggle (Tab): drawn = can attack, -20% move speed

Database Schema​

-- creatures table
- Id, Name, BaseHp, BaseDamage, AttackCooldownSec, MoveSpeed, LootTableId

-- creature_loot table
- CreatureId, ItemId, MinQty, MaxQty, Chance

-- character_items additions
- Equipped (boolean), Slot (text)

-- characters additions
- BindPointId (integer)

-- world_entities additions
- EntityKind (text) -- 'Creature', 'Spawner', 'BindPoint', etc.

RPCs Added​

RPCModeArgs
ClientAttackany_peerentityId
ClientSetCombatStanceany_peerbool drawn
ReceiveCombatStanceauthoritybool drawn
ReceiveHealthauthoritycurrent, max
ClientDeathauthoritypeer

Decisions​

  • Server-authoritative combat: Client sends intent, server validates range/cooldown
  • Pack drop on death: Gold + unequipped items drop as world entities
  • Equipment slots: Fixed 10 slots, MainHand requires WeaponType
  • Combat stance: Binary drawn/sheathes, affects movement speed

Step 11: Pet Equipment, Pet Death Pack Drop, Pet Inventory UI ✅​

Status: Complete
Branch/Commit: 21ccd5c (dual commits)

Features Implemented​

  • Pet equipment slots (Head, Chest, Legs, Feet, MainHand, OffHand, Neck, Ring1, Ring2)
  • Pet stat bonuses from equipment (damage, health, speed, cooldown reduction)
  • Pet death: pack drop similar to player death
  • Pet inventory UI: equipment panel, stat display
  • Equipment RPC callbacks with stat recalculation
  • Pet skills system (passive bonuses)

Database Schema​

-- pets table additions
- Equipment slots via character_items with CharacterId = pet owner, Slot prefixed 'Pet_'

-- pet_skills table
- Id, PetId, SkillId, Level

RPCs Added​

RPCModeArgs
ClientPetEquipItemany_peerpetId, itemRowId, slot
ClientPetUnequipItemany_peerpetId, slot
ReceivePetEquipmentauthoritypetId, slots[]

Decisions​

  • Pets use same item system: character_items table with CharacterId = owner, Slot = 'Pet_MainHand' etc.
  • Stat bonuses apply to pet: Damage, HP, Speed, Cooldown modifiers
  • Pet death drops pet's inventory: Not owner's inventory

Step 12: Ranged Combat (Phases 0-5) ✅​

Status: Complete
Branch/Commit: 545fdd4 → aa5732d → dd7180e + Phase 3/4/5 additions

Phase 0: Test Isolation Fixes​

  • check_crafting.py: State reset at main() — clears character_items, crafting_jobs, entity_depletion
  • check_npc_economy.py: State reset at main() — gold=50, wood=0, skills cleared, teleport to neutral

Phase 1: Data Migration​

EF Migration: 20261025120000_Step12RangedCombat.cs

TableColumns Added
itemsProjectileSpeed (float, default 40), ProjectileRadius (float, default 0.1), AmmoType (int, nullable), Range (float, default 0.0), WeaponType extended
charactersStamina (int, default 50), MaxStamina (int, default 50), StaminaRegen (float, default 5.0)

Seeded Data:

  • Weapons: Bow (100), Crossbow (101), Throwing Knife (102)
  • Ammo: Arrows (103), Bolts (104), Throwing Knives (105)

Phase 2: Projectile RPC Stubs​

RPCModeArgs
ClientFireProjectileany_peerweaponItemId, originX, originY, originZ, dirYaw
ReceiveProjectileSpawnany_peerentityId, originX, originY, originZ, dirYaw, projSpeed, projRadius, range, weaponType
ReceiveProjectileHitauthorityentityId, hitX, hitY, hitZ, damage

Decision: Projectiles are ephemeral RPC-driven (no world_entities row) — 30Hz tick handles lifecycle.

Phase 3: Active Defense​

RPCModeArgs
ClientBlockany_peerbool holding
ClientParryany_peer—
ClientDodgeany_peerfloat dirYaw
ReceiveBlockany_peerbool active
ReceiveParryauthoritybool success, float staggerDuration
ReceiveDodgeany_peerfloat dirYaw

Stamina Costs:

ActionCostDuration/Window
Block (hold)5/sContinuous
Parry (tap)150.3s window, 1.5s cooldown
Dodge250.4s iframe, 4m dash, 2s cooldown

PlayerSession Fields Added:

  • Stamina, MaxStamina, StaminaRegen
  • IsBlocking, ParryWindowActive, ParryWindowEnd, LastParryTime, DodgeIframeEnd

Phase 4: Ranged Weapons & Quiver​

  • Quiver slot: Added "Quiver" to valid equipment slots
  • Ammo validation: Stackable items only in Quiver slot
  • ClientFireProjectile full implementation:
    1. Validates weapon drawn + stamina ≥ 5
    2. Reads weapon stats from MainHand (ProjectileSpeed, Radius, Range, WeaponType, Damage)
    3. Reads ammo from Quiver slot
    4. Consumes 1 ammo (deletes row if qty ≤ 1, decrements otherwise)
    5. Sends inventory update + ReceiveProjectileSpawn

Phase 5: Integration & Polish​

  • scripts/check_ranged_combat.py — 15 verification checks
  • Documentation updated in data-model.md

Decisions​

  • No DB rows for projectiles: Pure RPC-driven, in-memory server tick
  • Server-authoritative ammo consumption: Validates quiver before firing
  • Strict ammo matching: Bow→Arrows (103), Crossbow→Bolts (104), Throwing→Knives (105)
  • Stamina as separate resource: Regenerates 5/s, blocks actions at 0

Step 13: AI & Navigation ✅​

Status: Complete
Priority: High — Foundation for all PvE content

Components​

SystemDescriptionPriority
NavMesh / RecastGodot NavigationServer3D with baked NavMesh from terrainHigh
Aggro SystemThreat table per creature; players generate threat on attack/healHigh
Patrol RoutesWaypoint paths from world_content.jsonMedium
State MachineIdle → Patrol → Chase → Attack → Flee → ReturnHigh
Leash/ReturnCreature returns to spawn if target lost or out of leash rangeHigh
Server TickCreature AI runs on server physics tick (15Hz)High

Database Schema​

ALTER TABLE world_entities ADD COLUMN "PatrolPathId" integer NULL;
ALTER TABLE world_entities ADD COLUMN "LeashRange" float DEFAULT 30.0;
ALTER TABLE world_entities ADD COLUMN "AggroRange" float DEFAULT 20.0;

CREATE TABLE patrol_paths (
"Id" serial PRIMARY KEY,
"Name" text NOT NULL,
"Waypoints" jsonb NOT NULL, -- [{x,y,z}, ...]
"Loop" boolean DEFAULT true
);

RPCs​

RPCModeArgs
ReceiveCreatureStateany_peerentityId, state, targetId?
ReceiveCreatureMoveany_peerentityId, x, y, z, rotY

Decisions (Confirmed)​

  • NavMesh: Godot NavigationServer3D (native, baked)
  • AI Tick Rate: 15Hz (separate from 30Hz physics)
  • State Machine: Data-driven JSON (extensible for new creature types)
  • Aggro: Threat table with decay (supports tank/healer roles)
  • Patrol Routes: world_content.json (version controlled)
  • Spawning: Pool-based dynamic spawns (supports world events)
  • Leash: Soft — 25m warn, 35m force return
  • Network Sync: 10Hz + on-state-change
  • Creature Archetypes: Melee, Ranged, Caster, Flee, Pack, Boss
  • Spatial Partitioning: Grid-based (simple, scales to 100s)

Step 14: Quest System ✅​

Status: Complete
Priority: High — Gives players direction

Components​

SystemDescriptionPriority
Quest DefinitionsJSON data: steps, objectives, rewards, prerequisitesHigh
Quest StatePer-character: active quests, step progress, completedHigh
NPC DialogueDialogue trees with conditions (quest state, level, items)Medium
Objective TypesKill, Collect, Interact, Reach, Talk, CraftHigh
RewardsXP, Gold, Items, Skill points, Faction repHigh
Quest Log UIClient panel showing active/completed questsMedium

Database Schema​

CREATE TABLE quests (
"Id" serial PRIMARY KEY,
"Name" text NOT NULL,
"Description" text,
"MinLevel" integer DEFAULT 1,
"PrereqQuestId" integer REFERENCES quests("Id"),
"Repeatable" boolean DEFAULT false,
"Data" jsonb NOT NULL -- steps, objectives, rewards
);

CREATE TABLE character_quests (
"Id" serial PRIMARY KEY,
"CharacterId" uuid NOT NULL REFERENCES characters("Id"),
"QuestId" integer NOT NULL REFERENCES quests("Id"),
"State" text NOT NULL, -- 'Active', 'Completed', 'Failed'
"CurrentStep" integer DEFAULT 0,
"Progress" jsonb DEFAULT '{}', -- objectiveId -> count
"StartedAt" timestamptz DEFAULT now(),
"CompletedAt" timestamptz NULL
);

RPCs​

RPCModeArgs
ClientAcceptQuestany_peerquestId
ClientAbandonQuestany_peerquestId
ReceiveQuestUpdateauthorityquestId, state, step, progress
ClientInteractNPCany_peernpcEntityId

Step 15: World Events ✅​

Status: Complete
Priority: Medium — Dynamic content

Components​

SystemDescriptionPriority
Event DefinitionsTimed/spawned: invasions, bosses, resource surgesHigh
Participation TrackingPlayers in area contribute; reward scaled by contributionHigh
Event LifecycleScheduled → Active → Completed/Failed → CooldownHigh
World State SyncClients see event markers, timers, progressMedium
RewardsShared loot table + individual contribution bonusMedium

Database Schema​

CREATE TABLE world_events (
"Id" serial PRIMARY KEY,
"Name" text NOT NULL,
"EventType" text NOT NULL, -- 'Invasion', 'Boss', 'ResourceSurge', 'Rift'
"ZoneId" integer NOT NULL,
"SpawnEntityId" integer NULL,
"Schedule" jsonb, -- cron-like or interval
"DurationSec" integer DEFAULT 1800,
"MinPlayers" integer DEFAULT 1,
"MaxPlayers" integer DEFAULT 50,
"RewardTable" jsonb NOT NULL,
"Active" boolean DEFAULT false,
"StartedAt" timestamptz NULL,
"EndsAt" timestamptz NULL
);

CREATE TABLE event_participation (
"Id" serial PRIMARY KEY,
"EventId" integer NOT NULL REFERENCES world_events("Id"),
"CharacterId" uuid NOT NULL REFERENCES characters("Id"),
"Contribution" integer DEFAULT 0,
"RewardClaimed" boolean DEFAULT false
);

Step 16: Party & Group Systems ✅​

Status: Complete
Priority: High — Social layer

Components​

SystemDescriptionPriority
Party CreationLeader invites, members accept, max 5High
XP SharingSplit by level contribution, distance checkHigh
Loot DistributionRound-robin / Need-Greed / Master looterMedium
Party UIMember frames: health, mana, distance, statusHigh
Party ChatSeparate channel from zone/globalMedium
Instance EntryParty enters together, private instanceLow

Database Schema​

CREATE TABLE parties (
"Id" serial PRIMARY KEY,
"LeaderId" uuid NOT NULL REFERENCES characters("Id"),
"LootMode" text DEFAULT 'RoundRobin',
"CreatedAt" timestamptz DEFAULT now()
);

CREATE TABLE party_members (
"Id" serial PRIMARY KEY,
"PartyId" integer NOT NULL REFERENCES parties("Id") ON DELETE CASCADE,
"CharacterId" uuid NOT NULL REFERENCES characters("Id"),
"JoinedAt" timestamptz DEFAULT now(),
UNIQUE ("PartyId", "CharacterId")
);

RPCs​

RPCModeArgs
ClientPartyInviteany_peertargetCharacterId
ClientPartyAcceptany_peerpartyId
ClientPartyDeclineany_peerpartyId
ClientPartyLeaveany_peer—
ClientPartyKickany_peercharacterId (leader only)
ReceivePartyUpdateauthoritypartyId, members[], lootMode
ClientPartySetLootModeany_peerlootMode

Step 17: Trading & Market ✅​

Status: Complete
Priority: Medium — Economy depth

Components​

SystemDescriptionPriority
Direct TradeTwo-player secure trade window with confirmationHigh
Auction HouseCentralized listings, search, buyout, bidMedium
Mail/CODSend items/gold to offline playersLow
Trade LogAudit trail for anti-fraudLow
Tax/FeesAH listing fee, sale tax (gold sink)Medium

Database Schema​

CREATE TABLE trades (
"Id" serial PRIMARY KEY,
"PlayerA" uuid NOT NULL REFERENCES characters("Id"),
"PlayerB" uuid NOT NULL REFERENCES characters("Id"),
"State" text DEFAULT 'Pending',
"PlayerAItems" jsonb DEFAULT '[]',
"PlayerBItems" jsonb DEFAULT '[]',
"PlayerAGold" integer DEFAULT 0,
"PlayerBGold" integer DEFAULT 0,
"CreatedAt" timestamptz DEFAULT now(),
"CompletedAt" timestamptz NULL
);

CREATE TABLE auction_listings (
"Id" serial PRIMARY KEY,
"SellerId" uuid NOT NULL REFERENCES characters("Id"),
"ItemRowId" integer NOT NULL,
"Quantity" integer NOT NULL,
"UnitPrice" integer NOT NULL,
"BuyoutPrice" integer NULL,
"DurationHours" integer DEFAULT 48,
"ListedAt" timestamptz DEFAULT now(),
"ExpiresAt" timestamptz NOT NULL,
"BuyerId" uuid NULL REFERENCES characters("Id"),
"SoldAt" timestamptz NULL,
"Status" text DEFAULT 'Active'
);

Step 18: Guilds / Clans ✅​

Status: Complete
Priority: Medium — Long-term social

Components​

SystemDescriptionPriority
Guild CreationCharter item, min 4 signatures, gold costHigh
Ranks/PermissionsConfigurable ranks with permissionsHigh
Guild BankShared storage with per-rank withdraw limitsMedium
Guild XP/LevelEarned from member activity; unlocks perksMedium
PerksXP bonus, gather speed, craft discount, travelMedium
Guild Chat/CalendarDedicated channel, scheduled eventsLow
Guild Wars/AlliancesPvP declarations, alliance systemLow

Database Schema​

CREATE TABLE guilds (
"Id" serial PRIMARY KEY,
"Name" text NOT NULL UNIQUE,
"Tag" text NOT NULL UNIQUE,
"LeaderId" uuid NOT NULL REFERENCES characters("Id"),
"Level" integer DEFAULT 1,
"XP" bigint DEFAULT 0,
"Gold" integer DEFAULT 0,
"CreatedAt" timestamptz DEFAULT now(),
"MOTD" text DEFAULT ''
);

CREATE TABLE guild_ranks (
"Id" serial PRIMARY KEY,
"GuildId" integer NOT NULL REFERENCES guilds("Id") ON DELETE CASCADE,
"Name" text NOT NULL,
"Order" integer NOT NULL,
"Permissions" jsonb DEFAULT '{}',
UNIQUE ("GuildId", "Order")
);

CREATE TABLE guild_members (
"Id" serial PRIMARY KEY,
"GuildId" integer NOT NULL REFERENCES guilds("Id") ON DELETE CASCADE,
"CharacterId" uuid NOT NULL REFERENCES characters("Id"),
"RankId" integer NOT NULL REFERENCES guild_ranks("Id"),
"JoinedAt" timestamptz DEFAULT now(),
"ContributionXP" bigint DEFAULT 0,
UNIQUE ("CharacterId")
);

CREATE TABLE guild_bank (
"Id" serial PRIMARY KEY,
"GuildId" integer NOT NULL REFERENCES guilds("Id") ON DELETE CASCADE,
"ItemRowId" integer NOT NULL,
"Quantity" integer NOT NULL DEFAULT 1,
"DepositedBy" uuid NOT NULL REFERENCES characters("Id"),
"DepositedAt" timestamptz DEFAULT now()
);

Step 19: Housing / Personal Space ✅​

Status: Complete (2026-11-02). Plots are built (2026-11-02): GM placement and removal, overlap rules, terrain flattening on server and clients, and corner stakes with a for-sale sign (see GM Tools). Buying and upkeep are built (2026-11-02): buying at the sign, the deposit, monthly upkeep, the overdue warning and freeing (see Housing). Construction is built (2026-11-02): delivering, starting, the timed build and its stages on the server; the plot window's materials checklist, Deliver and Start buttons and progress bar; and the site models drawn by stage, piles by thirds. The finished houses are built too: models, and walls and roof that block on server and client. The account bank is built (Barnaby, the Banker role, 100 shared slots). Doors are built: E at the doorway, owner-only, staying as left. Stairs are built in the two-storey house. Choosing the house at purchase is built, with the B designs costed and switched off; Stone Slates exist. All three second houses are built and offered: the fieldstone cottage, the longhouse and the stone house with a solar (with stairs). Furniture and chests are built: the placement mode, the wooden set, the stone hearth and the three chests with Public (see Housing). Losing a house is built: Abandon in the plot window, and freed or abandoned houses emptying their furniture and chests into the account bank, which may go past 100 slots for it. Step 19's build order is complete. Crafting stations as furniture, pets at home and the stable are built (see below and Housing). The old scaffold (housing_objects, the character-owned plot columns and its four RPCs) has been removed.

Plots​

  • Plots sit in the open world, not in instances. Sizes: Small, Medium, Large.
  • A GM places them from a Plots tab on the F12 GM panel, with the same rules as node placement (the server answers the height, 10 m leash, undo). The GM sets the price and the monthly upkeep when placing, and can edit both later.
  • Plots must not overlap each other, and must not overlap gathering nodes, stations, NPCs or water. The server refuses such a placement.
  • Terrain under a plot is flattened at placement, to the mean height inside it, with a 4 m blend ring. The edit is in memory only, so each plot stores its flatten height. The server reapplies all of them at boot, and the client applies them when the plot loads, before anyone can stand there. On the server, only the collision shapes under the plot are rewritten: Terrain3D's own refresh rebuilds the whole world (2.4 s), while rewriting under the plot takes milliseconds.
  • Plots are 28, 40 and 54 m squares (16, 24 and 32 m until 2026-11-03, grown about 70% for room), axis-aligned, centred on whole metres. An open plot shows corner stakes and a for-sale sign with its price and upkeep.

Ownership​

  • One house per account, shared by all of its characters. Any of them can build, decorate, open the doors and private chests, deliver materials and pay upkeep. One character can finish what another started.
  • Buying an open plot costs the GM-set price.
  • Upkeep is paid monthly from gold deposited with the house. If the deposit can't cover it, a one-month grace period starts. After that the plot is freed: the house is removed and its contents go to the account bank.
  • Abandoning refunds nothing; the contents go to the account bank.
  • When the bank is full, a lost house's contents still go in: the bank may pass 100 slots, and takes no more until it is back under (decided 2026-11-02).
  • No fast travel to houses, ever: no recall, no portals.

Building​

  • Buying a plot puts a construction site on it for the chosen prefab. There is one prefab per plot size for now; more styles per size come later.

  • Players deliver materials to the site until the list is complete, then interact with it to start construction.

  • Construction takes a long time and runs like a crafting job: progress is timestamped (accumulated_ms plus running_since), so it survives restarts. It advances only while a character on the account is near the site, including one logged out there, as with crafting.

  • When finished, the site becomes the house in a single step. Players never place parts one by one.

  • The site shows its progress: the construction-site models (stage 1 with piles that fill a third at a time as materials arrive, stage 2 from a third of the build time, stage 3 from two thirds), then the finished house. Small is a cruck-framed cottage under thatch, Medium a two-storey box-framed house, Large a hall on stone walls under oak shingles.

  • Materials (decided 2026-11-02):

    MaterialSmallMediumLarge
    Oak Log204060
    Oak Boards204060
    Stone4080200
    Firewood (wattle)3060-
    Clay (daub)3060-
    Thatch Bundle120200-
    Quicklime--40
    Oak Shingles--400
    Treenails / Nails50 Treenails100 Treenails100 Nails

    Thatch Bundles (built 2026-11-02): Reed is cut with a knife from Reed Beds along the lake shore (Foraging; 20 a bed a day, 8 beds), and 30 Reed dry into 10 Thatch Bundles on the Drying Rack, a passive job of an hour (Building, a new craft). Oak Shingles (built): an Oak Log rives into 12 Riven Shingles at the Chopping Block with froe and beetle (Carpentry), which shave into 12 Oak Shingles at the Shaving Bench with a drawknife.

  • Build time near the site: 8 / 16 / 32 hours for Small / Medium / Large.

  • Collision: simple boxes for the frame and the finished walls, with a doorway, on server and client alike. Scaffolding is not climbable (see Follow-ups).

Two houses per size (decided 2026-11-02)​

The buyer chooses which to build when buying the plot:

SizeA (built)B
Smallcruck-framed cottage under thatchfieldstone cottage under thatch
Mediumtwo-storey box-framed houselonghouse: one long storey with a byre end
Largehall on stone walls under shinglestwo-storey stone house with a solar, under stone slates

Each B gets its own three site stages, materials and build time. Two-storey houses get stairs to a walkable upper floor.

Inside​

  • Furniture is crafted items, placed anywhere inside the plot's bounds, capped at 20 / 40 / 80 pieces by plot size. The first set is wooden: bed, table, bench, stool, shelf, cupboard, and a stone hearth (a fire pit that cooks like a campfire). Where a piece is crafted depends on what it is made of (decided 2026-11-02): stool, shelf and bench at the Chopping Block (Carpentry); table, bed, cupboard and chests at the Shaving Bench (Joinery); the hearth at the Kiln (Masonry). Wooden pieces take logs of any wood (the Timber tag, which every log with a material carries) and carry it as their material. The bed, table, cupboard, chests and hearth block movement; the stool, bench and shelf do not.
  • Placing (built): a preview follows the aim, R turns it, a click puts it down; the server sets it on the floor under the spot (ground, upper floor, or a blocking piece's top), inside the plot, within 8 m. Picking up returns the same inventory row. Pieces live in housing_furniture, their kinds in furniture_kinds; the hearth is also a world entity of the Campfire-kind node type Stone Hearth, so cooking jobs need nothing new.
  • Chests are furniture with storage, in three sizes: Small (20 slots), Medium (40), Large (80). They can be made from any wood, and the wood changes only what the chest carries as its material, not its size. Each chest is its own storage, owner-only by default, with a Public checkbox; their count is capped by plot size, 2 / 4 / 6 (decided 2026-11-02). Built: chest_items, opened in the storage window.
  • Doors open and close with E, for the account's characters only. A door stays as it was left. Friend and guild permissions come later.

Stations, pets at home and the stable (decided 2026-11-02)​

  • Station furniture: Chopping Block, Shaving Bench, Drying Rack, Saw Pit, Kiln, Smelter and Crusher, each a world entity of its station's node type, as the hearth is a Campfire. One of each per house. Saw pit, smelter and crusher outdoors only. Stations (the hearth too) are the household's, with a Public tick in the plot window. Recipes: chopping block (1 log), shaving bench (2 logs, 6 treenails) and drying rack (3 logs, 8 treenails) at the Chopping Block; saw pit (2 logs, 6 oak boards, 10 treenails) at the Shaving Bench; kiln (30 clay brick, 20 clay, 10 stone), smelter (20 clay, 20 stone, 10 clay brick, 1 horse hide) and crusher (20 stone, 1 log, 1 iron hammer head) at the Kiln.
  • Pets at home: left where they stand on the plot, from the plot window; in the world while the owner is away, hunger held, and not counted toward the Taming limits (taking one back is refused past them). The house keeps 2 / 3 / 4, any pet in any place; only a pet's own character can leave or take it. They go back to their owners when the house is lost.
  • The stable: a second build site on a plot with a finished house, one per plot, set out by the owner (a quarter turn at a time) clear of the house. Timber framed, wattle and daub, thatched, 2 / 4 / 6 stalls, each one more place for a pet. Materials and build time scale with the plot (Small: 12 oak log, 16 oak boards, 30 treenails, 20 stone, 15 firewood, 15 clay, 60 thatch, 4 hours; Medium and Large in Housing).

Networking​

Houses, sites and furniture never ride the per-tick state stream. A plot's contents are sent once when it comes into view, and again only when something changes. See the state headroom follow-up.

Account bank (new, needed by housing)​

There is no personal bank today, only the guild bank. Housing needs an account-wide bank shared by all of an account's characters, 100 slots. Freed and abandoned houses empty into it. It is kept by Barnaby, a banker near Nyx; Banker becomes an NPC role, chosen like the others in the GM panel and the admin NPC editor.

Build order (decided 2026-11-02)​

Bank, doors, stairs, the B variants with the choice at purchase, furniture placement and the set, then chests.


Current Step​

Step 20: Farming​

Status: Built 2026-11-03; item icons to come
Branch: farming, from main

Crops raised in garden beds on a housing plot: planted from seed, watered daily, ripe after at least a day of growing.

Garden beds​

  • A Garden Bed is furniture: a raised bed about 2 × 2 m, outdoors only (open sky), placed and picked up like any other piece. It does not count toward the furniture cap; beds have their own cap, 4 / 8 / 12 by plot size. Proposed recipe: logs of any wood and treenails at the Chopping Block (Carpentry).
  • One crop per bed. A bed holding a crop cannot be picked up. When the house is lost the bed goes to the bank like other furniture, and its crop is lost.
  • E on a bed does what the bed needs: an empty bed opens a seed picker listing the seeds in the pack; a growing bed is watered; a ripe or dead bed is harvested or cleared.

Growing (all from timestamps, nothing on the tick)​

  • Watering keeps a bed wet for 24 hours. A crop grows only while its bed is wet, and ripens after its crop's wet hours (at least 24). Watering a bed that is still wet restarts its 24 hours.
  • A crop dies 72 hours after its last watering (or after planting, if never watered) unless it has ripened. A fresh bed starts dry.
  • Ripe crops keep forever and need no more water.
  • State per bed: crop, planted at, banked wet ms, last watered at. Growth is banked + min(now − last watered, 24 h); watering banks that and stamps now. Progress therefore runs while the owner is offline and across server restarts, in real time, as upkeep and crafting jobs do. The world clock is not used.
  • Stages shown on the bed: planted, sprouting, growing, ripe, dead; the soil is darker while wet.
  • A sweep every 10 minutes works out each bed's stage off the main thread and queues any changes back onto it, which broadcasts only the plots whose beds changed. Beds ride the furniture message, never the state stream.

Access​

  • Planting and harvesting: the household, or anyone when the bed is ticked Public (the furniture Public toggle).
  • Watering: anyone, as a neighbourly thing.

Water​

  • A Water Pail holds 5 waterings. Made by Coopering from 2 billets and a copper-wire hoop. It is a tool of its own, not part of the well.
  • Filled at a lake or a well; anyone can fill at any well.
  • The well (decided 2026-11-03): one per plot, the same on every plot size, a build site set out and built like the stable (delivered materials, then build time, a quarter turn at a time, clear of the house). A stone shaft with two oak posts and a shingled roof to keep things from falling in. Materials: 20 Stone, 30 Rope, 2 Oak Log, 12 Oak Shingles, 20 Treenails, 4 Oak Boards. Build time 2 hours.

Fibre, thread, cloth and rope (decided 2026-11-03)​

The well needs rope, and nothing made flax into anything yet. Four new benches, each a station like the others: house furniture (one of each per house, Public tick) and one of each in the village.

BenchMakesSkillBench recipe
Flax Brake (brake and hackle)1 Flax → 2 Flax FibreSpinningChopping Block: 2 logs, 6 treenails, felling axe
Spinning Wheel1 Flax Fibre → 4 Linen ThreadSpinningShaving Bench: 2 logs, 8 treenails, drawknife
Loom8 Linen Thread → 1 Linen ClothWeavingShaving Bench: 4 logs, 2 oak boards, 12 treenails, drawknife
Rope Walk (outdoors)3 Flax Fibre → 10 RopeRope MakingShaving Bench: 3 logs, 4 oak boards, 10 treenails, drawknife

One Rope is one foot of rope. The ratios in the thread and cloth rows are proposed and can be changed in the admin's recipes.

Crops​

Times and yields live in a crops table, editable on a new admin Crops page, so they can be tuned without a migration.

CropWet hoursHarvestSeedUse
Flax24Flax, Flax Seed backFlax Seed: a rare extra from Flax Fieldsthe linen chain
Turnip246–10 Turnips, 1–2 Turnip SeedsAnyxa sells Turnip Seedeaten raw, heals a little
Potato488–12 PotatoesAnyxa sells Seed Potatoes; any Potato plantscooked at a campfire or hearth

Crops are stackable resources and carry no quality.

Skill​

A new Farming skill (Craft, advances by use), with a Lore per crop as Flax Lore is today. Planting and harvesting train both. Watering trains Farming a little, neighbours included, at most once per bed per day.

Testing​

scripts/check_farming.py drives planting, watering, growth, death, harvest, neighbour watering and the well against a live server, backdating the bed's timestamps as the upkeep and pet-care checks do.

Build order​

  1. ✅ Content: Farming skill and lores, seed and crop items, crops table, Anyxa's stock, the Flax Seed yield (20270130120000_Farming).
  2. ✅ Garden Bed furniture, bed state, plant / water / harvest RPCs, seed picker (Farming.cs, SeedPicker.gd).
  3. ✅ Growth sweep and the bed's stages on the client (GardenBed.gd, drawn from primitives).
  4. ✅ Water Pail and filling at a lake (the pail's right-click menu).
  5. ✅ Flax Brake, Spinning Wheel, Loom and Rope Walk: items, recipes, station kinds, models, village copies (20270131120000_FibreRopeAndWell, check_rope.py).
  6. ✅ The well build site, and filling a pail at it. The stable's code became shared outbuilding code (Stables.cs) that both use.
  7. ✅ Admin Crops page. ✅ Check scripts (check_farming.py, check_rope.py) and docs (Farming).

Play-test fixes (2026-11-03): the cottage's middle cruck and the timber-framed house's middle post moved out of their doorways; every house has a ground floor; flattened plots are drawn flat on the client; pets are left home from the pet menu and taken along by E at the house; furniture is placed from the inventory, turned with R and Q, may not overlap anything, and the shelf hangs on walls (furniture_kinds.Hangable).

Item icons for the new items come from the icon agent; they show the fallback icon until then.


Cross-Cutting Architecture Patterns​

RPC Contract Discipline​

  • Every new RPC added to rpc_contract.json + godot_client/scripts/Network.gd stubs
  • scripts/check_rpc.py must pass; it also runs during the game server image build
  • Godot routes RPCs by node path — paths MUST match client/server

Database Conventions​

  • Quoted identifiers: All PostgreSQL identifiers use \"X\" in C# strings
  • Migrations: EF Core migrations in Moondog.Core/Migrations/
  • Seeding: Migration SQL includes ON CONFLICT DO NOTHING for idempotency

Check Script Pattern​

Each major system gets a check_*.py script:

  • Direct DB queries via docker exec psql
  • RPC contract validation
  • Client launch smoke test
  • Exit code 0 = pass, 1 = fail with details

Logging​

  • Server C#: GD.PrintErr, never GD.Print. Godot buffers stdout inside a container, so a GD.Print never reaches docker logs (enforced by check_logging.py).
  • No per-entity logging on tick events. A log line that fires for every pet or creature on a tick floods the log; log per player action or per summary instead.
  • Client GDScript: GD.PrintErr for debugging, removed before release

Server Loop​

  • Physics tick: 60 Hz, Godot's default (fixed timestep); state is sent at 30 Hz
  • DB writes: Batched via DbWorker queue, never on main thread
  • State caching: PlayerSession caches hot data (gold, stamina, equipment)

Checklist for a new feature​

  • Content and schema in an EF Core migration, content as raw SQL in dependency order (Content and Migrations)
  • Server RPCs. Most still live in ServerMain.cs; see Server Refactoring
  • Client RPC stubs in scripts/Network.gd, the root Main node
  • rpc_contract.json updated, and scripts/check_rpc.py passing
  • A scripts/check_*.py that drives the feature against a live server, and can be shown to fail
  • dotnet build with 0 errors
  • The docs page for the feature updated, and Data Model for new tables
  • Anything deliberately left for later added to Follow-ups below

Weather (2026-11-03)​

Regional weather: clear, cloudy, fog, rain, storm and snow, in circular regions with a climate each (temperate, wet, dry, cold; temperate outside them), snow above 80-95 m, and rain watering garden beds. GMs place regions with @weather region and force weather with @weather set. Sync is one ReceiveWeather message at login and on change only; the client blends at the camera. See Weather. Table weather_regions (20270206120000_WeatherRegions), server Weather.cs, client scripts/Weather.gd, check scripts/check_weather.py. Anyxa's Caldera (850 m round spawn, temperate, with morning mist: 20270207120000_AnyxasCaldera, 20270208120000_MorningMist) is the first region.

Ambient sound (2026-11-03)​

All client-side; nothing is sent. Wind is generated in Weather.gd (tuned in tools/audio/wind_demo.py): a faint breeze always outdoors, rising with the region's wind, gusting, whistling at the top of storm gusts, muffled under a roof. Under a dungeon's roof the wind and rain give way to a drone (tuned in tools/audio/drone_demo.py): three low beating tones, a deep rumble and now and then a breath of air, fading with the light. Sounds made under a dungeon roof go through a Dungeon audio bus with a stone-passage reverb, made by Sfx.gd on first use. Footsteps (scripts/Footsteps.gd, driven from PlayerBody.update, so yours and other players') step once a stride on what is underfoot, read with one ray per step: terrain is grass, snow above the snow line or while it snows, dirt in a garden bed; a dungeon floor is stone; anything else built is wood. None mounted, airborne or wading. Creature calls (scripts/CreatureCalls.gd) run a random timer per creature within 40 m, keyed by model file (every creature's appearance is "default"): crows by day every 20–60 s, owls by night every 30–90 s, slimes every 6–15 s, horses snort every 15–40 s and whinny every 1–3 min; in the Sunken Ruin kobolds yip and growl every 8–25 s, rats squeak every 6–20 s, bats squeak every 5–18 s and flap every 1.5–4 s in flight, beetles click every 8–24 s, and each of them sounds as it attacks. Creature footsteps (also CreatureCalls.gd, its STEPS): kobolds' claws click every 0.55 m, rats scurry every 0.9 m, spiders and beetles skitter every 0.4–0.45 m, heard within 20 m; only creatures that close are stepped, each frame, and none while flying or swimming. Underground they all echo on the Dungeon bus. Clips are CC0 (Freesound, Kenney), made mono and level-matched into numbered banks under godot_client/audio/ by tools/audio/import_sfx.py, played by scripts/Sfx.gd; credits in audio/CREDITS.md. Check: tests/ambient_sound_check.gd.


Follow-ups​

Known work deliberately left for later, with what is already known about it.

  • Large worlds (agreed 2026-11-11, not built). Terrain3D loads the whole map on client and server (the server idles at about 1.46 GB), and the map already fills its grid. Agreed: a world about 350 km across, a quarter land, made by our own generator; sleeping world cells on the server; our own streamed 256 m tiles (2 m generated, 1 m hand-worked, full detail to 2 km); a heights-only server; Terrain3D as an editing tool only; a floating origin and a double-precision server; in-client sculpting later. Plan, measurements and decisions: Large worlds.

  • Sounds at sea (asked for by the owner 2026-11-13; built 2026-11-14 for aboard a ship). scripts/ShipSounds.gd plays three CC0 loops the owner picked (ambient/sea, ambient/ship_creak, ambient/sail; credits in audio/CREDITS.md), flat, eased by her state: the sea with her speed, the creaks with the wind and her speed, the sails with canvas set and wind, loudest flogging (badly set or in irons), each gust louder. The gusts are Weather.gd's generated wind, already stronger at sea. Not yet: the sea heard from the shore or swimming, creaks timed to her heel and pitch.

  • Stealth tech debt: wind and scent (stealth stages 3-4). Smell is still a plain sphere (Stealth.cs SenseRanges); it does not drift downwind. Stealth stages 3 (wind) and 4 (gear noise, scent brews) were agreed on 2026-11-05 and never built. The shared server wind now exists (built 2026-11-10 for sailing: Weather.WindAt on the server, Weather.gd wind_at on the client), so the next stealth pass should make smell reach further downwind and less far upwind using it, add the HUD wind vane, and do stage 4. Until then wind does nothing for stealth.

  • Yōkai Night Parade. Plan a village event where a parade of yōkai passes through the village. The route, schedule, player interactions and rewards still need to be designed.

  • Kekkai event. The Kekkai yōkai will be part of a future event of its own. It is not modelled yet: it will have many forms, made when the event is designed.

  • The Yamata-no-Orochi's fight. The owner will add it later. For now the Orochi is scenery: its body is Orochi Isle, and its eight heads (yamatanoorochi_head) stand on it from the island's manifest, client only, with no collision and no server presence (sea and sailing). The head has idle, Alert, Roar, Drink, FallAsleep, Sleep and Wake clips but no fighting ones. Ideas noted in godot_client/models/creatures/yokai_game_notes.md: the Kojiki's eight vats of sake (Drink, then Sleep), the heads cut down one by one, and the Kusanagi at the point of the middle tail. The fight itself (the heads as server creatures, their attacks and the clips for them) is still to be designed with the owner.

  • Race tails, on hold for hand work. The race bodies are worked by hand in Blender from the Tripo originals in godot_client/models/characters/; tools/blender/retired/races.py is no longer part of the build. Tripo weighted every tail to the hips and thighs, so a tail swings with the legs. Dogfolk f has a four-bone chain (Tail1-Tail4 from Hips) in dogfolk f.blend. What was learned on her: seated, the root kinks and the cleft creases under it; a TailBase bone turning with the thighs smoothed the root but dragged the cheeks and was rolled back; sliding the tail root 3 cm in toward the body when she sits looked right (it has to be keyed into her sitting clip, since Godot reads no constraints). Detaching the tail as its own model on a TailBase socket bone (parented to Hips) moved cleanly, but left the tail's flared stub on the body, and every automatic attempt to flatten or reweight the stub tore the UV seams that run through it; the stub needs modelling by hand. Catfolk m/f and draco f still need tails rigged; catfolk f's underwear frays when she sits or runs (in the source model's weights).

  • Weather, not yet done. Wet surfaces, puddles and lying snow came on 2026-11-10 (materials/weather_surface.gdshaderinc, driven by scripts/Weather.gd): the terrain (its Terrain3D shader patched at run time), houses, carts and anything in the triplanar shader, and tree bark. Wetness builds over a minute of rain and dries over minutes after; snow builds and melts likewise; a roof map from downward rays keeps house floors dry. Imported props (castle parts, stations, plain glTF materials), grass and leaves do not get wet yet: they would need an overlay pass. Rain sound is generated noise; recorded loops would sound better. Under the Compatibility renderer rain falls through roofs (the particle heightfield is Forward+/Mobile only). No admin panel page for regions.

  • Dungeons, not yet done. The Sunken Ruin's first level has kobolds; the four below are empty (see Dungeons): no creatures, resources, loot or fixed lights yet. The Candle item has no icon yet (assets/icons/candle.png). The ruin is five hand-editable Blender files with CC0 textures. Level 0 has its hand work: the entrance's walls follow the hillside under a carved portal, its doorways are arched, it has rubble, broken pillars and a cave quarter, and its second pass: glowing roots, water dripping into puddles (with sound), glowing fungus, the kobolds' middens, barricades and wax shrines, moon reliefs, a toppled statue, a sealed door, and bats, rats and cave beetles. Levels 1 to 4 are still the generator's boxes.

  • Sunken Ruin level 0, pass 2 came on 2026-11-04: Glowcap (a lamp and the Clear Breath draught), the kobold hoard, thin air, falling stones, crumbling floors, the flooded shortcut and tranquilizer arrows (roosting bats can now be tamed); bats no longer land on the floor after a restart. The off-hand lamp became the Glowcap Belt Lantern in a new Belt slot, so a roost can be shot at by its light. Creatures do not fall into a broken floor's pit, and are not meant to. Icons wanted: Bat Wing, Rat Tail, Beetle Shell, Glowcap, Glowcap Belt Lantern (glowcap_belt_lantern.png), Clear Breath, Tranquilizer Arrow.

  • Sunken Ruin level 0, later. All four ideas came on 2026-11-04: the spiders, webs burnt with a torch, the readable inscriptions (Old Script) and spotting and disarming the traps (Trap Sense, Disarming). Still open: the sealed door and what the builders found below it wait for the levels underneath; the Brass Bell has no icon and no recipe yet. Spotted traps are kept across logout and a sprung one shows harmless until it rearms. Burnt webs come back whole over a server restart, on purpose.

  • Status effects, later. Antivenom came on 2026-11-04 (Spider Antivenom, brewed at the Apothecary's Table). A pet's poisoning still shows only as its health falling; the Spider Silk and Spider Carapace have no recipes yet; icons are still to come for the spider's drops, the Brass Bell, the antivenom, the Mortar and Pestle and the table. A still is wanted at the apothecary's later.

  • Compass crafting. The Compass is only sold (Anyxa, 60 gold) for now: no smithing station exists. The recipe in mind is Carpentry at the Shaving Bench, 1 Iron Ingot and 1 Linden Boards, about 30 seconds. Its icon is not made yet (assets/icons/compass.png).

  • Climbing. Scaffolding, ladders and walls could be climbed, but that needs a climbing skill and climbable surfaces the server can check. Not designed yet; the construction scaffolding is scenery until then.

  • State stream headroom. ReceiveState uses positional rows, identity sent on change for players and moving entities alike, and a 310 m view radius (see Game Server). Since 2026-11-02 another player costs ~40 bytes (was ~128) and the own row ~75; a moving entity ~30. At the village, one player with the birds measured ~990 bytes of the ~1,380 that fit one packet, so roughly 10 more players or 13 more creatures in view fill it. Past that ENet splits the state, and losing either piece loses the update: soft, not a cliff. The radius is planned around longbows, so it cannot shrink much. Next steps, in order: send distant things less often, or a binary encoding (another player ~25 bytes, an entity ~18). Worth it once crowds of 10+ in one spot are expected or state_bytes_max in the PACING line passes ~1,300. Moving entities done (2026-11-06): each client's state now has a 1,300-byte budget (ServerMain.BudgetRows). Nearest entities go first; the rest take turns, each sent at least once a second, and the client keeps an entity for 1.5 s between updates. state_held_max in PACING counts those left out. scripts/check_state_budget.py marches 30 horses past a client. Players too (2026-11-06): other players share the same budget (BudgetRows), a rider and mount counting as one; the client keeps a player for 1.5 s between updates; state_held_players_max in PACING. scripts/check_state_budget_players.py runs four players under a lowered budget (GAMESERVER_STATE_BUDGET), since the R710 cannot run the ~10 clients it takes to fill the real one. scripts/check_state_budget_crowd.py runs a real crowd of 14 players in the village (8 clients on the PC from a copy of the client, 6 on the R710): it peaked at 1,298 bytes with the budget holding one creature back, the watcher kept all 14 for over a minute, and nobody disconnected. A player row is ~30 bytes, not 40, so ~14 players fit beside the village's creatures. A bigger crowd now updates distant people less often rather than breaking. Binary state (2026-11-10): ReceiveState is packed binary (Network/StateCodec.cs, read by Network.gd _decode_state): own row 45 bytes, another player 20 (24 riding), a moving entity 20 (24 hitched), a 6-byte header with a per-client counter so clients count lost states. About two thirds of the JSON rows, so ~20 players fit beside the village's creatures before the budget holds any back. Nothing left here.

  • Unreliable traffic and ENet's throttle. Movement input moved to unreliable-ordered on channel 3 (2026-11-02): on a 147 ms link at 0.5–2% loss the server had gone 200–290 ms without input in almost every 5 s window, and now waits ~55 ms at most; correction fires per 20 s run fell from ~12 to ~3. ENet's packet throttle discards unreliable sends whenever RTT rises above its average, and does so even on a clean loopback (input_lost 44–143 in 20 s). Harmless for input, where the next packet is 17 ms behind, but the state stream is unreliable too and is thinned the same way. Turning the throttle off (throttle_configure(5000, PACKET_THROTTLE_SCALE, 0)) measured no better for input. Attacks no longer ride behind input on channel 0; they never needed to, since the range check reads the simulated position, which moves only on the next physics tick. Measured and done (2026-11-10): scripts/check_state_loss.py (four clients on the PC, two on the R710, 60 s, both ways). In steady play no state was lost either way; all the loss came while each client loaded in, when its own hitch spikes the round trip: 7.6% of states with the throttle on (waits up to 5.1 s), 1.9% off (2.3 s). The server now turns it off for every peer (GAMESERVER_ENET_THROTTLE=on puts it back).


Open Questions (Track Here)​

StepQuestionDecisionDate
13NavMesh baking pipelineGodot NavigationServer3D—
13AI tick rate15Hz—
13State machine formatData-driven JSON—
14Quest data formatJSON in DB—
14Dialogue systemTrees with conditions—
16Max party size5—
17AH fee structureTBD—
18Guild creation costTBD—
19Plot pricingGM sets price and monthly upkeep per plot at placement2026-11-02

Last updated: 2026-11-03, Step 20 (Farming) designed