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.
This commit is contained in:
2026-07-08 19:02:11 +02:00
parent c61d286005
commit 8a1913c5ae
6 changed files with 151 additions and 22 deletions
+26 -8
View File
@@ -652,14 +652,14 @@ Completed after the architecture gate:
The practical next sequence is:
1. Continue growing resource discovery with finite `ResourceNode` instances
placed in meaningful foliage, animal-camp, berry, and village-stockpile
contexts. The first distance/safety/comfort scoring pass, twelve authored
resources, and placement validation exist; next additions should increase
authored variety only when they preserve reachability, stable IDs, scoring
metadata, and clear player interaction ranges.
2. Expand persistence only when schedules, player state, or a real save menu
creates a concrete requirement.
1. Expand the structured event feed with actor/target/cause metadata so the
inspector can show a readable timeline per NPC. Narrative events for task
starts, sleep, and death are recorded; next should add depletion notices,
relationship seeds, and village-level event summaries filtered by relevance.
2. Seed relationship dimensions (familiarity, trust, obligation) from shared
work, meal, and sleep proximity, then expose them through utility
considerations so NPCs begin to prefer known colleagues and familiar routes.
Start with one lightweight dimension before building the full graph.
Recently completed:
@@ -693,6 +693,24 @@ Recently completed:
multi-layer UV flow, fresnel edges, foam highlights, and sparkle; wider river
and waterfall; fortress with crenellations, three turrets, and prominent
ridge banner.
- Resource discovery expanded to 18 finite ResourceNodes across farming,
deep-forest, river-bank, and mill-adjacent contexts with scored metadata.
- NPC schedules implemented: SLEEP/MEAL/WORK/DISCRETIONARY periods driven by
simulation clock time-of-day. DayNightCycle synced to simulation clock. NPCs
walk home to designated house positions at night, sleep to restore energy,
eat at meal times, and work during the day. Starving NPCs always override
sleep to seek food.
- Starvation balance reworked: hunger ~25/day, death threshold ~3 days of
starvation (realistic ~6-7 day survival without food). Energy drain uses
exact binary fractions for lossless JSON serialization.
- Wood inventory and woodpile storage: wood now follows the same
gather→carry→deposit pattern as food. VillageWoodpile StorageNode receives
wood deposits. Village wood syncs from storage. Economic events track all
transfers.
- Structured event feed: EconomicEventRecord now supports narrative events
(task started, NPC slept, NPC died) alongside economic transfers.
Per-NPC event history with human-readable descriptions exposed in the
inspector under a "Recent" timeline.
This order strengthens the simulation while regularly producing visible
progress suitable for public development updates.