[FEATURE] Game systems overhaul: purpose, meaning & difficulty #48

Open
opened 2026-10-20 09:59:52 +02:00 by agent-claude · 1 comment
Collaborator

Problem

A headless 30-day probe of a fresh colony (no player input) shows that the game systems lack stakes and purpose:

  • Combat is binary and unfair. The first raid (day 3, 2 scavengers) wipes the colony by day 4. Undrafted colonists never defend themselves, raiders execute downed pawns, and raiders never leave (16 loitering by day 30). Raid size never scales.
  • Survival has no consequences. Hunger at 0 does nothing, mood sits at ~85% forever (baseline 6500 + permanent +10% optimism), and mental breaks don't exist.
  • Biome/temperature are cosmetic. stepEnvironment overwrites the world tile's temperature with a fixed 9–21°C curve, so a tundra colony reports "Pleasant Weather". No seasons, no winter food pressure. Heaters and coolers are no-ops.
  • Progression is meaningless. Every completed action grants +1 skill level (cap 20 in 20 actions). Crafted weapons are never equipped. Multi-input recipes only consume their first input. Recipe tech gating isn't enforced. Mining yields infinite alloy from any rock.
  • Many buildings do nothing. Dining tables, chairs, spike traps, and heaters have no effect. Healroot is unused, and tending needs no medicine.

Plan (sim-core, data-driven, deterministic)

  1. Seasons and climate: biome base temperature, 60-day year (15-day seasons), day/night swing, and cold snaps / heat waves. Crops stop growing in winter. Enclosed-room detection with working heaters, coolers, and campfires drives room temperature and food spoilage.
  2. Exposure and starvation: hypothermia and heatstroke, starvation damage, and exhaustion collapse. Each can kill, and each is telegraphed by thoughts and alerts.
  3. Mood that matters: baseline 50%, timed memories (ate at table, slept outdoors, colonist died, raid repelled), mood-scaled work speed, and mental breaks (daze, binge, tantrum) followed by catharsis.
  4. Skills via XP: per-action XP with rising level costs. Skill level scales work speed and yields.
  5. Medicine: tending consumes healroot when available, and tend quality depends on skill and medicine. Healing over time, faster in bed. Downed colonists get rescued to bed.
  6. Fair, scaling raids: grace period, wealth- and day-scaled raid points, random map-edge entry, and colonists who auto-defend. Raiders spare the downed, steal loot and leave, and drop weapons on death. Spike traps work. Colonists equip better weapons from stock.
  7. Storyteller incidents: wanderer joins (colony growth), cargo pods, crop blight, cold snap / heat wave.
  8. Production fixes: all recipe inputs consumed, recipe tech gating, finite alloy from mining (skill-scaled chance).
  9. Content rebalance (hunger rate, crop growth times) and client log badges for the new events.
## Problem A headless 30-day probe of a fresh colony (no player input) shows that the game systems lack stakes and purpose: - **Combat is binary and unfair.** The first raid (day 3, 2 scavengers) wipes the colony by day 4. Undrafted colonists never defend themselves, raiders execute downed pawns, and raiders never leave (16 loitering by day 30). Raid size never scales. - **Survival has no consequences.** Hunger at 0 does nothing, mood sits at ~85% forever (baseline 6500 + permanent +10% optimism), and mental breaks don't exist. - **Biome/temperature are cosmetic.** `stepEnvironment` overwrites the world tile's temperature with a fixed 9–21°C curve, so a tundra colony reports "Pleasant Weather". No seasons, no winter food pressure. Heaters and coolers are no-ops. - **Progression is meaningless.** Every completed action grants +1 skill level (cap 20 in 20 actions). Crafted weapons are never equipped. Multi-input recipes only consume their first input. Recipe tech gating isn't enforced. Mining yields infinite alloy from any rock. - **Many buildings do nothing.** Dining tables, chairs, spike traps, and heaters have no effect. Healroot is unused, and tending needs no medicine. ## Plan (sim-core, data-driven, deterministic) 1. **Seasons and climate**: biome base temperature, 60-day year (15-day seasons), day/night swing, and cold snaps / heat waves. Crops stop growing in winter. Enclosed-room detection with working heaters, coolers, and campfires drives room temperature and food spoilage. 2. **Exposure and starvation**: hypothermia and heatstroke, starvation damage, and exhaustion collapse. Each can kill, and each is telegraphed by thoughts and alerts. 3. **Mood that matters**: baseline 50%, timed memories (ate at table, slept outdoors, colonist died, raid repelled), mood-scaled work speed, and mental breaks (daze, binge, tantrum) followed by catharsis. 4. **Skills via XP**: per-action XP with rising level costs. Skill level scales work speed and yields. 5. **Medicine**: tending consumes healroot when available, and tend quality depends on skill and medicine. Healing over time, faster in bed. Downed colonists get rescued to bed. 6. **Fair, scaling raids**: grace period, wealth- and day-scaled raid points, random map-edge entry, and colonists who auto-defend. Raiders spare the downed, steal loot and leave, and drop weapons on death. Spike traps work. Colonists equip better weapons from stock. 7. **Storyteller incidents**: wanderer joins (colony growth), cargo pods, crop blight, cold snap / heat wave. 8. **Production fixes**: all recipe inputs consumed, recipe tech gating, finite alloy from mining (skill-scaled chance). 9. Content rebalance (hunger rate, crop growth times) and client log badges for the new events.
Author
Collaborator

Handoff (agent-claude): PR #49 is ready for peer review

Completed

  • sim-core/src/survival.ts (new): pure helpers for the calendar and seasons, climate, room flood-fill, the skill XP curve and weapon ranking.
  • sim-core/src/colony-sim.ts:
    • seasons, weather, rooms and climate
    • exposure, starvation and exhaustion
    • the mood and memory model, mental breaks
    • XP and work multipliers
    • medicine, clotting and rescue
    • wealth-scaled raids, self-defence, equipping, looting and raid resolution
    • storyteller incidents
    • multi-input crafting, recipe tech gating and stock targets
    • mining yields
  • types.ts and binary-codec.ts: new pawn and colony fields, all persisted. raidCooldownTicks is now persisted too; it previously reset to "never raid" after a server restart.
  • map-gen.ts: biome base temperature, a raid grace period, a starter campfire and medicine/combat skills. Also fixes the bench structureId bug.
  • content/: hunger 16 bp/tick, crops take about 3–5 days, healroot is now a medical item, recipe targetStock values.
  • client/src/main.ts: season and weather HUD, six skills with XP tooltips, exposure and malnutrition meters, log badges (BREAK, JOINED, LOOT, SKILL, SEASON, WEATHER, EVENT).
  • docs/GAME_DESIGN.md §6 documents every rule and number.

Remaining / next steps

  • Peer review by agent-gemini, then merge approval from @johnw.
  • Follow-up ideas:
    • Clothing and apparel from cloth/cotton, to give cold biomes a gear answer beyond rooms.
    • A UI for player-set recipe stock targets.
    • Splitting colony-sim.ts (now about 5.7k lines) into modules.
    • Tuning raid points after live playtesting.

Gotchas

  • Rooms are a derived, non-persisted cache. It is invalidated when buildings complete or are destroyed and when rock is mined. Any new code that changes walls or doors must call invalidateRooms().
  • Only TickDelta-replicated fields belong in computeStateHash. Otherwise the client-replica parity test fails.
  • protectedOffline disables all new threats. That covers raids, incidents, exposure, starvation, breaks and food alerts.
  • Existing production colonies pick up the new rules on load. They get a fresh 1200-tick raid grace period and biome base temperature 15°C, because older snapshots have no biome temperature stored.
## Handoff (agent-claude): PR #49 is ready for peer review **Completed** - `sim-core/src/survival.ts` (new): pure helpers for the calendar and seasons, climate, room flood-fill, the skill XP curve and weapon ranking. - `sim-core/src/colony-sim.ts`: - seasons, weather, rooms and climate - exposure, starvation and exhaustion - the mood and memory model, mental breaks - XP and work multipliers - medicine, clotting and rescue - wealth-scaled raids, self-defence, equipping, looting and raid resolution - storyteller incidents - multi-input crafting, recipe tech gating and stock targets - mining yields - `types.ts` and `binary-codec.ts`: new pawn and colony fields, all persisted. `raidCooldownTicks` is now persisted too; it previously reset to "never raid" after a server restart. - `map-gen.ts`: biome base temperature, a raid grace period, a starter campfire and medicine/combat skills. Also fixes the bench `structureId` bug. - `content/`: hunger 16 bp/tick, crops take about 3–5 days, healroot is now a medical item, recipe `targetStock` values. - `client/src/main.ts`: season and weather HUD, six skills with XP tooltips, exposure and malnutrition meters, log badges (BREAK, JOINED, LOOT, SKILL, SEASON, WEATHER, EVENT). - `docs/GAME_DESIGN.md` §6 documents every rule and number. **Remaining / next steps** - Peer review by agent-gemini, then merge approval from @johnw. - Follow-up ideas: - Clothing and apparel from cloth/cotton, to give cold biomes a gear answer beyond rooms. - A UI for player-set recipe stock targets. - Splitting `colony-sim.ts` (now about 5.7k lines) into modules. - Tuning raid points after live playtesting. **Gotchas** - **Rooms are a derived, non-persisted cache.** It is invalidated when buildings complete or are destroyed and when rock is mined. Any new code that changes walls or doors must call `invalidateRooms()`. - **Only TickDelta-replicated fields belong in `computeStateHash`.** Otherwise the client-replica parity test fails. - **`protectedOffline` disables all new threats.** That covers raids, incidents, exposure, starvation, breaks and food alerts. - **Existing production colonies** pick up the new rules on load. They get a fresh 1200-tick raid grace period and biome base temperature 15°C, because older snapshots have no biome temperature stored.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
game-dev/RicosWorld#48
No description provided.