Commit Graph

68 Commits

Author SHA1 Message Date
Rijad Zuzo 34428d836a perf: harden runtime for weaker hardware 2026-08-12 10:02:45 +02:00
Rijad Zuzo 661d53f31a feat: shared creature root, enemy definitions, defend duty, and player downing 2026-08-12 00:16:48 +02:00
Rijad Zuzo 292cdd9153 feat: add combat, wild wolves, factions, and tribe war motivation 2026-08-11 20:29:47 +02:00
Rijad Zuzo e51cde57be feat: add cold-season scarcity that halves yields and pauses regrowth 2026-08-11 00:43:48 +02:00
Rijad Zuzo 549a365ab2 feat: regrow finite berry sources toward their authored cap 2026-08-11 00:40:13 +02:00
Rijad Zuzo 82e44a9f5d feat: add weak-villager and damaged-roof village needs 2026-08-11 00:32:22 +02:00
Rijad Zuzo 37f262fb84 feat: let the player live as a citizen with needs and carried inventory 2026-08-11 00:18:39 +02:00
Rijad Zuzo ead75fca68 feat: add physical animal care delivery 2026-07-31 00:19:41 +02:00
Rijad Zuzo d950c3da68 feat: add paired goat care 2026-07-30 23:03:15 +02:00
Rijad Zuzo e3aa3440a2 feat: add deterministic goat routine 2026-07-26 23:52:56 +02:00
Rijad Zuzo f79c2bb630 feat: introduce identity-backed goat 2026-07-26 22:26:00 +02:00
Rijad Zuzo 2c88ed6ea8 feat: scale village queries and enrich Jajce center 2026-07-16 23:51:08 +02:00
Rijad Zuzo 4f88d15e12 feat: surface player routes for village needs 2026-07-16 12:36:50 +02:00
Rijad Zuzo d6e6a63048 feat: share village needs with helpers 2026-07-16 12:13:54 +02:00
Rijad Zuzo 0332c57a89 feat: let opportunity helpers act autonomously 2026-07-16 10:58:48 +02:00
Rijad Zuzo eaa15c076c feat: derive capable opportunity helpers 2026-07-16 10:41:05 +02:00
Rijad Zuzo 79dd503343 feat: add missing wood opportunities 2026-07-16 01:50:19 +02:00
Rijad Zuzo c722e32a88 feat: add knowledge-gated pantry opportunities 2026-07-13 00:46:56 +02:00
Rijad Zuzo 9fcf6a0a58 feat: add person history and trust reactions 2026-07-12 11:42:10 +02:00
Rijad Zuzo 99b8146f75 feat: add bounded npc memory retention 2026-07-12 01:10:10 +02:00
Rijad Zuzo 9a479ba182 feat: add provenance-aware npc communication 2026-07-11 19:58:47 +02:00
Rijad Zuzo 81409650df feat: add witnessed knowledge and wind ambience 2026-07-11 11:27:40 +02:00
Rijad Zuzo ce8f71082b refactor: clarify simulation ownership 2026-07-10 11:02:11 +02:00
Rijad Zuzo 0f7b12080e feat: define action completion costs 2026-07-10 10:36:08 +02:00
Rijad Zuzo 5cbab527bf fix: enforce village resource invariants 2026-07-09 23:10:18 +02:00
admin d6520c426a feat: resource consumption rate display in village panel
Village panel now shows daily consumption rates alongside stockpiles (e.g. Food: 15 (-2/d), Wood: 7 (-1/d)). Rates are computed over a rolling 200-tick (~1 day) window by summing item_consumed economic events. The rate display only appears when non-zero, keeping the panel clean until actual consumption occurs. Closes the feedback loop: events show individual transfers, rates show aggregate trends.
2026-07-09 01:18:33 +02:00
admin 6981c7e9bc feat: simulation speed control with bracket keys
Press [ to slow down, ] to speed up through 6 levels: 0.25x, 0.5x, 1x, 2x, 4x, 10x. Clock delta is multiplied by the current speed, so time_of_day advances proportionally and the visual day-night cycle stays synced. Current speed shown in the village panel header. 10x makes a full day cycle watchable in ~24 seconds. Speed changes are non-destructive to simulation determinism.
2026-07-09 00:25:57 +02:00
admin 4b5fc858f8 feat: NPC mourning behavior on housemate death
When an NPC dies from starvation, their highest-familiarity companion enters mourning for 100 ticks (~half a day). Mourning NPCs skip work: they rest if energy is low, otherwise wander near home. Mourning_ticks counts down each tick through ActionExecutionSystem and is serialized for save/load continuity with backward-compatible default of 0. This gives the familiarity graph its first behavioral consequence.
2026-07-09 00:23:00 +02:00
admin 2c3890502a feat: wood consumption for patrol and study
Patrol and study now consume 1 wood from the village woodpile on completion, recording an item_consumed economic event. This gives wood a purpose and creates resource pressure between gathering and work-support activities. Familiarity serialization switched from raw Dictionary to sorted Array of {id, score} pairs for deterministic JSON checksum output across save/load.
2026-07-09 00:16:52 +02:00
admin 595d67724f feat: runtime familiarity from shared work and utility exposure
NPCs who target the same resource or site concurrently gain mutual familiarity +0.1 per encounter, capped at 1.0. Action selection now receives the full NPC array and adds a +0.3 utility bonus for actions that familiar NPCs are currently performing - NPCs gravitate toward their housemates' professions. Inspector shows the highest-familiarity NPC with a percentage score under the resource lines.
2026-07-09 00:09:50 +02:00
admin fce5c533fe feat: seed household familiarity from shared home proximity
NPCs whose home positions are within 4m of each other gain mutual familiarity at baseline 0.5. Stored per NPC as a Dictionary keyed by other npc_id, serialized through NPCStateRecord with backward-compatible fallback for old saves. Household pairs form naturally from the home_positions configuration in main.tscn. Includes save/load round-trip test verifying familiarity persists.
2026-07-09 00:03:20 +02:00
admin 8094975094 feat: resource depletion events and village event feed
Record resource_depleted narrative events when NPC or player extraction exhausts a ResourceNode. Add get_recent_events() for cross-NPC event queries. Village panel now shows the last 3 village-wide events as a readable feed below the resource counters, making shortages and depletion visible without opening the inspector.
2026-07-08 21:22:43 +02:00
admin 8a1913c5ae feat: structured narrative event feed with per-NPC inspector timeline
Add narrative event types (task_started, npc_slept, npc_died, resource_depleted) alongside economic transfers. EconomicEventRecord gains create_narrative factory and human-readable description method. SimulationManager records task-start and sleep/death events, exposes get_npc_events() for per-NPC history queries. Inspector now shows a Recent timeline of the last 5 events for the selected NPC, plus displays carried wood count. Relax EconomicEventRecord validation to accept non-economic events. Update roadmap with completed milestones.
2026-07-08 19:02:11 +02:00
admin c61d286005 feat: wood inventory, carrying, and woodpile storage
Wood now follows the same gather-carry-deposit pattern as food. NPCs put harvested wood into inventory, walk to the VillageWoodpile StorageNode, and deposit it. Village wood syncs from storage. Player harvesting also routes wood to the woodpile. ActiveWorldAdapter exposes woodpile routing for DEPOSIT_WOOD action targeting. WorldViewManager recognizes wood inventory changes. Tests verify woodpile node existence, storage ID, navigation reachability, and adapter routing.
2026-07-08 18:55:51 +02:00
admin adedf28417 feat: assign NPC home positions near village houses
Add home_positions export to SimulationManager. When configured, NPCs get homes assigned from the array wrapping around for more NPCs than homes. main.tscn now sets 6 home positions near the three village houses, so each NPC has a real home to walk to at night. Empty home_positions leaves the spawn-point-as-home backward-compatible behavior.
2026-07-08 18:32:08 +02:00
admin cab732a977 feat: sync visual day-night cycle with simulation clock
DayNightCycle now reads time_of_day from SimulationManager group node, falling back to self-tracked elapsed for lookdev scenes. Simulation starts at 06:00 morning (tick 50) by default. TimeDial reads directly from SimulationManager and displays HH:MM format with a 24-hour dial arc. Removed initial_cycle override from JajceLookdev.
2026-07-08 18:04:04 +02:00
admin 4604dc6d5a feat: add NPC schedules with sleep, meal, and work periods
Add ACTION_SLEEP with home-position targeting and energy restoration. Embed schedule periods (SLEEP/MEAL/WORK/DISCRETIONARY) in ActionSelectionSystem with TimeOfDay from SimulationClock. NPCs sleep at night when energy is low, eat during meal periods when hungry, and work/discretionary the rest of the cycle. Home position stored per NPC and serialized through NPCStateRecord with backward-compatible fallback. Cycle duration persisted through save/restore. Includes headless test for sleep period, work period, meal hunger, energy restoration, serialization round-trip, and home targeting without world adapter.
2026-07-08 17:44:39 +02:00
admin cd0309e224 feat: add cinematic npc task glyphs 2026-07-08 16:31:34 +02:00
admin 1c389ec23d feat: enforce activity site capacity 2026-07-07 16:12:13 +02:00
admin 4c090f1635 feat: replace activity markers with typed sites 2026-07-07 13:27:02 +02:00
admin e5bd93d705 feat: add typed pantry storage site 2026-07-07 12:57:47 +02:00
admin 0aede053cb feat: expand village population from 3 to 6 NPCs
Adds Elma, Mirza, and Lejla to the village alongside Amina, Tarik, and Jasmin. Profession assignment is deterministic per-NPC-id RNG so the original three retain their seeded professions. jajce_runtime_integration_test updated to expect six villagers. All 10 scenarios pass.
2026-07-06 00:01:41 +02:00
admin d883148132 feat: add npc decision inspector 2026-07-05 23:50:18 +02:00
admin 4463e524aa style: apply gdformat formatting across the entire project
Auto-format all GDScript files using gdformat from gdtoolkit.
This is a baseline formatting pass to ensure consistent style:

- Normalizes indentation and spacing
- Wraps long lines to 100 characters
- Removes trailing whitespace
- Standardizes blank lines between functions

68 files reformatted, 8 files left unchanged (3rd-party addon files
with parse errors excluded).
2026-07-05 23:06:23 +02:00
admin 08b7bee0e5 feat: add validated quicksave persistence 2026-07-05 18:10:33 +02:00
admin f9601a67d1 feat: add structured economic events 2026-07-05 18:04:11 +02:00
admin 6dbb395bd6 feat: add location-based food storage loop 2026-07-05 17:57:24 +02:00
admin a8ae331f51 feat: synchronize authoritative npc position
- NpcVisual emits position_changed signal during _physics_process
- SimulationManager.synchronize_npc_position() writes active position
  into SimNPC state on movement, arrival, and navigation failure
- WorldViewManager forwards position_changed and syncs before
  despawn/reload
- SimNPC stores travel_target_position and has_travel_target as
  versioned state; NPCStateRecord v2 persists them with v1 migration
- WorldViewManager.spawn_npc_visual() resumes travel for traveling NPCs
  via SimulationManager.request_current_travel()
- WorldViewManager.despawn_npc_visual() syncs position before removal
- WorldViewManager.reload_npc_visual() spawns a visual from persisted
  state without rerolling target selection
- tests/npc_visual_lifecycle_test.gd proves unload/reload preserves
  action, target, reservation, position, RNG state, and checksum
- simulation_state_serialization_test adds legacy v1 NPC migration test
  that does not invent an active travel target
2026-07-05 17:21:17 +02:00
admin 4673f0698d refactor: separate action system responsibilities 2026-07-05 14:17:45 +02:00
admin f816f3976a feat: add simulation action definitions 2026-07-05 13:35:33 +02:00