feat: add witnessed knowledge and wind ambience
This commit is contained in:
+69
-28
@@ -2,8 +2,8 @@
|
||||
|
||||
> Agent-facing context for understanding the project quickly.
|
||||
>
|
||||
> Snapshot basis: repository state after commit `556d0fd`, July 2026. Treat the
|
||||
> code as the source of truth when this document and the implementation differ.
|
||||
> Snapshot basis: repository state on July 11, 2026. Treat the code as the
|
||||
> source of truth when this document and the implementation differ.
|
||||
|
||||
See the [documentation map](README.md) for the authority and scope of each plan.
|
||||
|
||||
@@ -189,7 +189,8 @@ study, and patrol target typed activity sites. The migration is documented in
|
||||
|
||||
- **Engine:** Godot 4.7 project configuration
|
||||
- **Renderer feature:** Forward Plus
|
||||
- **Language:** GDScript (`odig` analysis with warnings treated as errors)
|
||||
- **Language:** GDScript (`gdformat`, `gdlint`, headless Godot 4.7 scenarios,
|
||||
and GUT run through the local quality gate)
|
||||
- **Main scene:** `res://main.tscn`
|
||||
- **Terrain:** Terrain3D 1.0.2 is installed and enabled
|
||||
- **Jajce runtime:** reusable 512 m Terrain3D seed, greybox landmarks, stable
|
||||
@@ -215,8 +216,8 @@ plugin content, not game architecture.
|
||||
### World and player
|
||||
|
||||
- `main.tscn` instances the reusable Jajce Terrain3D world.
|
||||
- The player is a `CharacterBody3D` represented by placeholder primitive
|
||||
geometry.
|
||||
- The player is a `CharacterBody3D` with a compact multi-part stylized visual,
|
||||
velocity-driven walk motion, and unchanged primitive collision.
|
||||
- WASD movement is camera-relative.
|
||||
- The elevated third-person camera rotates with the mouse, uses smoothed
|
||||
follow/focus behavior, and exposes an opt-in presentation preset for
|
||||
@@ -254,6 +255,8 @@ Each simulated NPC currently stores:
|
||||
- current task and task state;
|
||||
- task duration and progress;
|
||||
- simulated position;
|
||||
- home position and carried inventory;
|
||||
- last action and mourning duration;
|
||||
- starvation state and duration;
|
||||
- death state.
|
||||
|
||||
@@ -280,9 +283,11 @@ NPCs currently choose among:
|
||||
|
||||
- gather food;
|
||||
- gather wood;
|
||||
- deposit carried food or wood;
|
||||
- withdraw and eat food;
|
||||
- patrol;
|
||||
- study;
|
||||
- eat;
|
||||
- sleep;
|
||||
- rest;
|
||||
- wander.
|
||||
|
||||
@@ -335,8 +340,11 @@ distance with resource `safety_risk`, `comfort_distance`, and
|
||||
- authored dirt path strips that make the current village task loop readable;
|
||||
- compact silhouette props for the ridge landmark, pantry, guard, study, and
|
||||
rest sites;
|
||||
- warm sky, fog, shadows, and wind-reactive foliage;
|
||||
- eight ResourceNodes preserving stable food/wood discovery IDs;
|
||||
- warm sky, fog, shadows, coherent wind-reactive foliage, and breeze-aligned
|
||||
chimney smoke;
|
||||
- one sparse terrain-aware calligraphic gust field with two or three soft
|
||||
tapered strokes per burst;
|
||||
- eighteen ResourceNodes preserving stable food/wood discovery IDs;
|
||||
- typed village pantry storage and typed guard, study, and rest activity sites;
|
||||
- a Terrain3D-derived baked navigation mesh covering the current playable loop;
|
||||
- base collision/navigation guardrails that keep Terrain3D collision enabled,
|
||||
@@ -363,7 +371,10 @@ A small village panel displays:
|
||||
- starving NPC count;
|
||||
- selected village modifiers.
|
||||
- a Tab-cycled NPC inspector with profession, needs, task state, destination,
|
||||
decision reason, and utility scores.
|
||||
decision reason, utility scores, directed familiarity/trust, and the exact
|
||||
completed event that last changed trust;
|
||||
- the selected NPC's latest known objective fact, resolved from its own
|
||||
persisted knowledge rather than omniscient event history.
|
||||
|
||||
NPC name/profession labels, definition-driven colors and props, carried-food
|
||||
visuals, and compact task glyphs make active simulation state readable in the
|
||||
@@ -374,8 +385,9 @@ glyphs.
|
||||
|
||||
### `simulation/SimNPC.gd`
|
||||
|
||||
`SimNPC` is a `RefCounted` simulation model. It owns needs, task selection,
|
||||
task state, profession affinity, carried inventory, starvation, and death.
|
||||
`SimNPC` is a `RefCounted` simulation model. It owns needs, task state,
|
||||
profession identity, carried inventory, starvation, and death. Focused systems
|
||||
select and execute actions against that state.
|
||||
|
||||
This separation from the visual node is an important architectural seed and
|
||||
should be preserved.
|
||||
@@ -401,7 +413,11 @@ Focused `RefCounted` collaborators keep rule ownership visible:
|
||||
- action systems own selection, execution progress, and target resolution;
|
||||
- `VillageEconomy` owns storage/inventory transactions and synchronized
|
||||
village resource views;
|
||||
- `SimulationEventLog` owns deterministic event history and queries.
|
||||
- `SimulationEventLog` owns deterministic event history and queries;
|
||||
- `EventKnowledgeSystem` owns per-NPC known-event references and captures
|
||||
actor/nearby evidence when a witnessable event is recorded;
|
||||
- `RelationshipSystem` owns directed relationship state, event-driven trust
|
||||
consequences, and deterministic social queries.
|
||||
|
||||
`SimulationManager` remains the scene-tree façade and signal boundary rather
|
||||
than duplicating these responsibilities across additional manager nodes.
|
||||
@@ -425,7 +441,8 @@ than duplicating these responsibilities across additional manager nodes.
|
||||
- obtains a navigation path;
|
||||
- moves and rotates toward path points;
|
||||
- reports arrival;
|
||||
- applies a simple death presentation.
|
||||
- presents definition-driven profession silhouettes, carried resources, task
|
||||
glyphs, walk motion, and death state.
|
||||
|
||||
### `player/player.gd` and `player/camera_rig.gd`
|
||||
|
||||
@@ -435,7 +452,9 @@ follow camera.
|
||||
|
||||
### `world/ui/ui.gd`
|
||||
|
||||
The UI subscribes to village changes and formats aggregate village state.
|
||||
The UI subscribes to village, task, event, knowledge, and relationship changes.
|
||||
It formats aggregate state and resolves known facts/relationship causes through
|
||||
the event log without owning or recomputing simulation facts.
|
||||
|
||||
## Current runtime flow
|
||||
|
||||
@@ -465,6 +484,8 @@ NpcVisual navigates through the active world
|
||||
| ResourceStateRecord.extract() -> NPC inventory
|
||||
| -> VillageEconomy transfers inventory/storage as actions complete
|
||||
| -> SimulationEventLog appends completed facts
|
||||
| -> EventKnowledgeSystem captures actor/nearby knowledge
|
||||
| -> RelationshipSystem applies evidence-gated social consequences
|
||||
| |
|
||||
| v
|
||||
| village_changed signal updates the UI
|
||||
@@ -485,7 +506,9 @@ NpcVisual navigates through the active world
|
||||
├── docs/ Project context and plans
|
||||
├── player/
|
||||
│ ├── camera_rig.gd
|
||||
│ ├── PlayerVisual.tscn
|
||||
│ ├── player.gd
|
||||
│ ├── player_visual.gd
|
||||
│ └── npc/
|
||||
│ ├── NpcVisual.gd
|
||||
│ └── NpcVisual.tscn
|
||||
@@ -498,7 +521,9 @@ NpcVisual navigates through the active world
|
||||
│ ├── definitions/ Stable IDs and custom definition resources
|
||||
│ ├── economy/ Inventory and storage transactions
|
||||
│ ├── events/ Ordered event history and queries
|
||||
│ ├── knowledge/ Per-NPC references to known objective events
|
||||
│ ├── persistence/ Validated local save-slot storage
|
||||
│ ├── relationships/ Directed social consequences and queries
|
||||
│ └── state/ Versioned simulation-state records
|
||||
├── tests/
|
||||
│ ├── action_system_boundaries_test.gd
|
||||
@@ -507,9 +532,11 @@ NpcVisual navigates through the active world
|
||||
│ ├── jajce_world_scaffold_test.gd
|
||||
│ ├── jajce_runtime_integration_test.gd
|
||||
│ ├── npc_visual_lifecycle_test.gd
|
||||
│ ├── relationship_consequence_test.gd
|
||||
│ ├── resource_node_player_parity_test.gd
|
||||
│ ├── simulation_definitions_test.gd
|
||||
│ └── simulation_state_serialization_test.gd
|
||||
│ ├── simulation_state_serialization_test.gd
|
||||
│ └── witnessed_knowledge_consequence_test.gd
|
||||
├── terrain/jajce/ Dedicated Terrain3D seed data and assets
|
||||
├── tools/
|
||||
│ └── generate_jajce_terrain_seed.gd
|
||||
@@ -518,7 +545,8 @@ NpcVisual navigates through the active world
|
||||
│ │ ├── JajceWorld.tscn
|
||||
│ │ ├── JajceLookdev.tscn
|
||||
│ │ ├── jajce_world.gd
|
||||
│ │ └── beauty_camera.gd
|
||||
│ │ ├── beauty_camera.gd
|
||||
│ │ └── vfx/WindGustField.tscn
|
||||
│ ├── resource_nodes/
|
||||
│ │ ├── ResourceNode.gd
|
||||
│ │ ├── ResourceNode.gd.uid
|
||||
@@ -539,9 +567,10 @@ These are expected prototype constraints, not necessarily isolated bugs:
|
||||
- Temporary activity markers have been removed; NPC and player food/wood
|
||||
gathering use `ResourceNode` instances with no fallback, food transfer uses
|
||||
the typed pantry `StorageNode`, and patrol/study/rest use `ActivitySite`.
|
||||
- Current NPC, village, resource, storage, event, clock, and RNG state serialize
|
||||
through world schema v3. F5/F9 provide one validated local quicksave; a save
|
||||
menu, metadata, and player-transform persistence remain deferred.
|
||||
- Current NPC, village, resource, storage, event, knowledge, relationship,
|
||||
clock, and RNG state serialize through world schema v5. F5/F9 provide one
|
||||
validated local quicksave; a save menu, metadata, and player-transform
|
||||
persistence remain deferred.
|
||||
- Simulation-owned resource records retain live amounts, reservations, and
|
||||
usage definitions while ResourceNode scenes are unloaded.
|
||||
- An explicit fixed-step clock converts frame delta into simulation ticks, but
|
||||
@@ -552,10 +581,13 @@ These are expected prototype constraints, not necessarily isolated bugs:
|
||||
- Food and wood now move through finite sources, NPC inventory, and typed
|
||||
village storage. Other village metrics remain aggregate values rather than
|
||||
located items.
|
||||
- NPCs do not have homes, schedules, possessions, memories, relationships,
|
||||
goals, or social knowledge.
|
||||
- The reason inspector exposes current decisions, but deeper historical traces
|
||||
and rejected preconditions are not yet retained.
|
||||
- NPCs have home positions, schedule periods, carried food/wood, and directed
|
||||
familiarity/trust. They can retain direct proximity-witness knowledge of a
|
||||
food deposit, but do not yet have wider social dimensions, goals, line of
|
||||
sight/hearing evidence, memory decay, false beliefs, or communication.
|
||||
- The reason inspector exposes current decisions, utility rejections, and one
|
||||
exact relationship cause plus the latest known fact, but deeper historical
|
||||
decision traces are not yet retained.
|
||||
- Active navigation is used as if all agents are local; no simulation LOD exists.
|
||||
- Unloaded traveling NPCs preserve their state but do not yet advance through
|
||||
abstract travel time.
|
||||
@@ -573,8 +605,9 @@ These are expected prototype constraints, not necessarily isolated bugs:
|
||||
as reproducible presentation baselines.
|
||||
- Combat, companions, factions, politics, trade, rumours, quests, persistence,
|
||||
and regional travel do not yet exist.
|
||||
- Placeholder geometry is sufficient for debugging but not for build-in-public
|
||||
presentation.
|
||||
- Stylized player/NPC silhouettes, water, foliage, and VFX support the current
|
||||
build-in-public baseline, while blockout buildings and several work/resource
|
||||
props remain visibly prototype-grade.
|
||||
|
||||
## Target simulation architecture
|
||||
|
||||
@@ -596,8 +629,9 @@ physics frames, or a currently loaded map.
|
||||
|
||||
The authoritative-boundary decision is recorded in
|
||||
[ADR 0001](decisions/0001-simulation-authority-boundary.md). The current
|
||||
`ResourceNode` state and `WorldViewManager` target selection are transitional,
|
||||
not patterns to extend into inventories, schedules, or relationships.
|
||||
`ResourceNode` binding and the `WorldViewManager` active-position bridge follow
|
||||
this boundary; new inventories, schedules, relationships, and knowledge should
|
||||
remain scene-independent records and systems.
|
||||
|
||||
### Authority and active-world adapters
|
||||
|
||||
@@ -791,7 +825,14 @@ validation, atomic replacement recovery, and active-visual rebuilding.
|
||||
Terrain3D runtime integration, the bounded Jajce beauty pass, and the first
|
||||
simulation-garden runtime capture are complete.
|
||||
|
||||
The coherent visual slice can then aim for:
|
||||
The first relationship and knowledge consequences are also complete:
|
||||
food-deposit events become separate known facts for their actor and nearby
|
||||
living NPCs; only an informed hungry familiar NPC gains directed trust. The
|
||||
exact event remains visible as both known fact and relationship cause, and that
|
||||
trust can redirect ordinary work toward helping a starving acquaintance. One
|
||||
provenance-aware NPC-to-NPC fact transfer is the next systems slice.
|
||||
|
||||
The remaining simulation-garden target still aims for:
|
||||
|
||||
- one attractive valley section;
|
||||
- six named villagers;
|
||||
|
||||
Reference in New Issue
Block a user