feat: add witnessed knowledge and wind ambience
This commit is contained in:
@@ -21,6 +21,9 @@ SimulationManager tick
|
||||
### ActionSelectionSystem
|
||||
|
||||
- reads NPC and village state;
|
||||
- queries `RelationshipSystem` after personal survival/schedule overrides, so a
|
||||
trusted starving acquaintance can redirect ordinary work toward food
|
||||
gathering while the pantry is low;
|
||||
- evaluates current utility scores;
|
||||
- consumes the NPC's deterministic decision RNG;
|
||||
- returns an action ID, optional urgent-duration override, branch reason,
|
||||
@@ -67,7 +70,10 @@ targets, and translates presentation callbacks into simulation transitions.
|
||||
It also publishes the latest `ActionSelectionResult` for presentation; the UI
|
||||
does not recompute decisions. At completion it atomically pays any
|
||||
definition-backed stored-resource cost before applying the action effect. A
|
||||
late shortfall suppresses the effect and records a `task_blocked` fact.
|
||||
late shortfall suppresses the effect and records a `task_blocked` fact. The
|
||||
manager also captures actor/nearby knowledge before forwarding newly recorded
|
||||
events into `RelationshipSystem`. It exposes knowledge, relationship, and cause
|
||||
queries without moving social authority into UI.
|
||||
|
||||
### VillageEconomy
|
||||
|
||||
@@ -82,6 +88,27 @@ late shortfall suppresses the effect and records a `task_blocked` fact.
|
||||
- answers recent-history, actor-history, and consumption-rate queries;
|
||||
- restores persisted history without performing or replaying transactions.
|
||||
|
||||
### EventKnowledgeSystem
|
||||
|
||||
- stores stable `(knower_id, event_id)` references separately from objective
|
||||
history;
|
||||
- initially observes successful food-deposit events for the actor and living
|
||||
NPCs within a fixed proximity radius;
|
||||
- captures evidence only when the event happens, never from current positions
|
||||
during restore;
|
||||
- answers deterministic known-event and knower queries without formatting
|
||||
prose or choosing actions.
|
||||
|
||||
### RelationshipSystem
|
||||
|
||||
- owns directed familiarity/trust records and stable relationship queries;
|
||||
- applies a bounded trust gain when a hungry familiar NPC knows about a
|
||||
contributor's successful food-deposit event;
|
||||
- stores the exact event ID as the trust cause and ignores replayed or older
|
||||
events;
|
||||
- selects trusted starving subjects deterministically for action selection;
|
||||
- does not choose actions, perform transactions, or format presentation text.
|
||||
|
||||
These collaborators are `RefCounted` rule services, not additional scene-tree
|
||||
managers. Further decomposition should follow measured pressure and a proven
|
||||
gameplay consumer.
|
||||
|
||||
@@ -15,6 +15,8 @@ SimulationClock
|
||||
-> ActionTargetResolver resolves a stable target ID
|
||||
-> VillageEconomy performs inventory/storage transactions
|
||||
-> SimulationEventLog records completed facts
|
||||
-> EventKnowledgeSystem records actor/nearby knowledge
|
||||
-> RelationshipSystem applies evidence-gated social consequences
|
||||
-> WorldViewManager presents travel and NPC state
|
||||
-> ActiveWorldAdapter supplies loaded-world positions/capacity
|
||||
-> NpcVisual performs local navigation and animation
|
||||
@@ -30,6 +32,10 @@ would otherwise obscure that lifecycle:
|
||||
and keeps village resource summaries synchronized;
|
||||
- `simulation/events/SimulationEventLog.gd` owns ordered event identity,
|
||||
history queries, and rate calculations;
|
||||
- `simulation/knowledge/EventKnowledgeSystem.gd` owns per-NPC references to
|
||||
known objective events and captures proximity witnesses at record time;
|
||||
- `simulation/relationships/RelationshipSystem.gd` owns directed relationship
|
||||
queries, event-driven trust changes, and deterministic social tie-breaking;
|
||||
- `simulation/persistence/` owns save-slot file safety;
|
||||
- `simulation/state/` owns versioned serialized record contracts;
|
||||
- `simulation/definitions/` owns stable IDs and immutable action/profession
|
||||
@@ -48,6 +54,8 @@ hard to read.
|
||||
| `simulation/actions/` | Action decisions, execution, and target queries |
|
||||
| `simulation/economy/` | Authoritative inventory and storage transactions |
|
||||
| `simulation/events/` | Immutable event history and derived event queries |
|
||||
| `simulation/knowledge/` | Per-NPC knowledge of objective event IDs |
|
||||
| `simulation/relationships/` | Directed social consequences and relationship queries |
|
||||
| `simulation/state/` | Versioned, serializable mutable records |
|
||||
| `simulation/definitions/` | Stable IDs and immutable gameplay definitions |
|
||||
| `simulation/persistence/` | Validated local save-file storage |
|
||||
@@ -69,11 +77,13 @@ improving ownership.
|
||||
- Persistent references are stable IDs, never `Node`, `NodePath`, or scene
|
||||
ownership.
|
||||
- Presentation may report facts and submit commands; it does not choose NPC
|
||||
actions or own resource, storage, inventory, event, or reservation state.
|
||||
actions or own resource, storage, inventory, event, knowledge, relationship,
|
||||
or reservation state.
|
||||
- Resource changes go through `ResourceStateRecord`, NPC inventory, and
|
||||
`VillageEconomy`; `village.food` and `village.wood` are synchronized views.
|
||||
- New mutable features define serialization and deterministic continuation at
|
||||
the same time as their first gameplay use.
|
||||
the same time as their first gameplay use. Cross-record causes use stable
|
||||
event IDs rather than object references or prose.
|
||||
- Prefer one tested vertical behavior over a generic framework with no proven
|
||||
consumers.
|
||||
|
||||
|
||||
@@ -667,14 +667,34 @@ Completed:
|
||||
logs. Waterfall mist is anchored to the waterfall instead of the village
|
||||
origin, duplicate wind layers are separated, and Metal smoke/wind
|
||||
materials retain restrained transparency.
|
||||
17. Coherent breeze pass: overlapping valley-wide white stroke/speck emitters
|
||||
were removed. Tree canopies now bend gently in one prevailing direction
|
||||
with stable per-tree phase and slow gust variation, while chimney smoke
|
||||
leans with the same breeze. Day/night lighting now follows the simulation
|
||||
clock even when the world initializes first, with the sunrise/sunset tints
|
||||
applied in the correct order. The gameplay camera remains unchanged.
|
||||
18. Stylized player readability: the remaining gray player capsule is replaced
|
||||
by a compact multi-part figure with a warm scarf/satchel accent and
|
||||
velocity-driven walk motion. Collision, controls, and the elevated
|
||||
staggered follow camera remain unchanged.
|
||||
19. Event-caused trust consequence: hungry familiar NPCs can gain directed
|
||||
trust from a real food-deposit event, retain that event as the inspectable
|
||||
cause, and redirect ordinary work to help a starving acquaintance. The
|
||||
state is versioned and deterministic rather than presentation-only flavor.
|
||||
20. Calligraphic gust ambience: one terrain-aware controller now emits only
|
||||
two or three tapered sage/amber/aqua ribbons at a time, with long quiet
|
||||
intervals and a shared canopy/smoke direction. The shader draws each line
|
||||
head-to-tail like a soft brush mark; repeated bursts cannot stack into the
|
||||
old scratch/gnat field.
|
||||
21. Witnessed event knowledge: objective food-deposit events create separate
|
||||
known-event references for their actor and nearby living NPCs. Knowledge
|
||||
gates trust, produces a real informed-versus-uninformed choice divergence,
|
||||
survives schema-v5 save/load, and appears in the NPC inspector.
|
||||
|
||||
Next:
|
||||
|
||||
1. Replace the remaining player capsule with a matching stylized presentation,
|
||||
while preserving the elevated top-down follow, gentle dead-zone lag, and
|
||||
cozy farm-builder readability.
|
||||
2. Continue with the relationship consequence work in `LEARNING_ROADMAP.md`
|
||||
before expanding visual scope further.
|
||||
1. Add one provenance-aware NPC-to-NPC fact transfer, then bounded
|
||||
importance/retention rules, as sequenced in `LEARNING_ROADMAP.md`.
|
||||
|
||||
Do not start with GIS data, a full city, a large asset pack, or more NPC
|
||||
mechanics. The next proof is a beautiful stage for the systems that already
|
||||
|
||||
+31
-13
@@ -2,7 +2,8 @@
|
||||
|
||||
## Current contract
|
||||
|
||||
Every successful food movement creates one `EconomicEventRecord`:
|
||||
Every successful food or wood movement creates an `EconomicEventRecord` using
|
||||
the applicable event type:
|
||||
|
||||
```text
|
||||
resource_extracted
|
||||
@@ -13,17 +14,21 @@ item_consumed
|
||||
|
||||
Each record contains a monotonically increasing event ID, event type,
|
||||
simulation tick, actor ID, source ID, destination ID, item ID, and transferred
|
||||
amount. Actor `-1` identifies a player-triggered extraction until persistent
|
||||
player identity is introduced.
|
||||
amount, plus the authoritative world position captured when the fact is
|
||||
recorded. NPC events preserve their authoritative interaction target (or NPC
|
||||
position when no target applies); player extraction/depletion events preserve
|
||||
the ResourceNode interaction position. Actor `-1` identifies a player-triggered
|
||||
extraction until persistent player identity is introduced.
|
||||
|
||||
Events are immutable facts about completed transfers. They do not perform the
|
||||
transaction and are not replayed to reconstruct current state. Resource,
|
||||
inventory, and storage records remain authoritative.
|
||||
|
||||
`SimulationEventLog` owns ordered event identity, append/restore behavior, and
|
||||
history/rate queries. `VillageEconomy` performs transactions and requests event
|
||||
records only after state changes succeed; `SimulationManager` remains the
|
||||
public signal boundary used by presentation.
|
||||
history/rate queries, including exact lookup through `get_by_id()`.
|
||||
`VillageEconomy` performs transactions and requests event records only after
|
||||
state changes succeed; `SimulationManager` remains the public signal boundary
|
||||
used by presentation.
|
||||
|
||||
An action whose definition-backed completion cost becomes unavailable records
|
||||
a zero-amount `task_blocked` narrative fact with the action and shortfall
|
||||
@@ -32,10 +37,21 @@ transfer occurred.
|
||||
|
||||
## Persistence and determinism
|
||||
|
||||
`SimulationStateRecord` schema v3 stores the ordered event stream and
|
||||
`next_event_id`. Schema v1 and v2 saves migrate to an empty stream beginning at
|
||||
ID zero. Parsing rejects duplicate event IDs and a next ID that could collide
|
||||
with restored history.
|
||||
`SimulationStateRecord` schema v5 stores the ordered event stream,
|
||||
`next_event_id`, directed relationships that may reference an exact event, and
|
||||
per-NPC known-event references. Schema v1 and v2 saves migrate to an empty
|
||||
stream beginning at ID zero. Parsing rejects duplicate event IDs, invalid or
|
||||
duplicate knowledge references, relationship causes the observer does not
|
||||
know, and a next ID that could collide with restored history.
|
||||
|
||||
A successful food deposit can currently raise a hungry familiar NPC's directed
|
||||
trust in its contributor only when that NPC knows the event. The actor and
|
||||
living NPCs within the bounded witness radius receive a `KnownEventStateRecord`
|
||||
at record time. Witness distance uses the event's captured position, never the
|
||||
actor's later location. The relationship stores the same deposit event ID
|
||||
rather than copied prose, so the inspector can resolve and display the real
|
||||
completed fact. This is a first evidence-gated causal consumer of the event
|
||||
stream, not general event sourcing.
|
||||
|
||||
The food-loop regression verifies this chain:
|
||||
|
||||
@@ -57,6 +73,8 @@ NPC record, so unloading presentation does not lose the fact.
|
||||
|
||||
The stream is currently kept in full for the small simulation garden. Before
|
||||
large populations or long-running worlds, add measured retention,
|
||||
archival/summary rules, and query indexes. General denied attempts, witnesses,
|
||||
secrecy, causal links, and memories belong in later event/history slices; they
|
||||
should extend this record family without making prose authoritative.
|
||||
archival/summary rules, and query indexes. Proximity is the only current witness
|
||||
rule; line of sight, hearing, acquisition provenance, communication, secrecy,
|
||||
false beliefs, multi-event causal graphs, and memory retention belong in later
|
||||
event/history slices. They should extend this record family without making
|
||||
prose authoritative or recomputing old evidence from current positions.
|
||||
|
||||
@@ -630,8 +630,6 @@ Completed foundations:
|
||||
- 512 m Jajce Terrain3D seed, greybox landmarks, stable-ID resource placement,
|
||||
lookdev scene, and tested temporary navigation loop.
|
||||
|
||||
The practical next sequence is:
|
||||
|
||||
Completed after the architecture gate:
|
||||
|
||||
- location-based pantry state, NPC-carried food, and explicit
|
||||
@@ -649,13 +647,37 @@ Completed after the architecture gate:
|
||||
- definition-driven profession colors/props and a selected-NPC inspector fed
|
||||
by real decision branches, destinations, needs, and utility scores.
|
||||
|
||||
The practical next sequence is:
|
||||
The first relationship consequence slice is complete:
|
||||
|
||||
1. Grow the existing familiarity seed into one consequence-bearing relationship
|
||||
dimension, such as trust or obligation, driven by structured events rather
|
||||
than proximity alone.
|
||||
2. Use that dimension in one real choice or response, then expose the cause in
|
||||
the NPC inspector before expanding the relationship graph.
|
||||
- directed familiarity/trust records now live in a top-level relationship
|
||||
graph instead of NPC-local dictionaries;
|
||||
- a successful known food-deposit event raises a hungry familiar NPC's trust
|
||||
and is retained as the exact causal event ID;
|
||||
- that trust can redirect ordinary patrol work toward replenishing a low pantry
|
||||
for a starving acquaintance;
|
||||
- the inspector displays the relationship values and completed event cause;
|
||||
- schema migration, save/restore checksums, idempotence, and a neutral-control
|
||||
decision test cover the complete slice.
|
||||
|
||||
The first witnessed-knowledge slice is also complete:
|
||||
|
||||
- `KnownEventStateRecord` keeps per-NPC event references separate from
|
||||
objective event history;
|
||||
- successful food deposits are known by their actor and nearby living NPCs at
|
||||
event-record time, while distant NPCs remain uninformed;
|
||||
- two equally familiar guards with different evidence now gain different trust
|
||||
and choose helping versus ordinary patrol;
|
||||
- the inspector resolves and displays the selected NPC's latest known fact;
|
||||
- schema v5 migration, invalid-reference rejection, deterministic save/load,
|
||||
and proximity/idempotence tests cover the complete slice.
|
||||
|
||||
This proves the first Milestone 6 evidence-to-choice exit path without claiming
|
||||
full memory or belief simulation. The practical next sequence is:
|
||||
|
||||
1. Add acquisition provenance and one bounded NPC-to-NPC fact transfer so
|
||||
information can travel beyond direct witnesses without replaying events.
|
||||
2. Add importance/retention rules for known facts before expanding into
|
||||
distortion, secrecy, rumours, or opportunity generation.
|
||||
|
||||
Recently completed:
|
||||
|
||||
|
||||
+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;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Current contract
|
||||
|
||||
`SimulationStateRecord` is the versioned JSON boundary for the current
|
||||
simulation. The current world schema is v3 and captures:
|
||||
simulation. The current world schema is v5 and captures:
|
||||
|
||||
- simulation seed, tick interval, tick count, clock remainder, and elapsed
|
||||
clock ticks;
|
||||
@@ -12,16 +12,20 @@ simulation. The current world schema is v3 and captures:
|
||||
- village resource counters;
|
||||
- controlled per-NPC wander RNG streams;
|
||||
- scene-independent resource state plus the definition facts needed while its
|
||||
ResourceNode is unloaded.
|
||||
ResourceNode is unloaded;
|
||||
- pantry contents, carried NPC inventory, the ordered economic event stream,
|
||||
and its next stable event ID.
|
||||
and its next stable event ID;
|
||||
- directed relationship records with familiarity, trust, and the stable event
|
||||
ID that last changed trust;
|
||||
- per-NPC known-event records that reference objective event history without
|
||||
copying it.
|
||||
|
||||
The top-level identity is:
|
||||
|
||||
```json
|
||||
{
|
||||
"schema": "the_steward.simulation",
|
||||
"schema_version": 3
|
||||
"schema_version": 5
|
||||
}
|
||||
```
|
||||
|
||||
@@ -51,7 +55,8 @@ its future random sequence.
|
||||
5. requiring the complete final-state checksums to match.
|
||||
|
||||
It also verifies clock remainder, resource amount/reservation/enabled
|
||||
round-tripping, presentation unload/rebind, and rejection of unsupported
|
||||
round-tripping, presentation unload/rebind, directed relationship/cause
|
||||
round-tripping, divergent known-event state, and rejection of unsupported
|
||||
schemas.
|
||||
|
||||
NPCStateRecord v2 adds the resolved travel destination and whether it is
|
||||
@@ -71,6 +76,40 @@ stream. Event records use stable source/destination/item IDs, reject invalid or
|
||||
duplicate IDs, and preserve deterministic ordering across save/restore. See
|
||||
[the economic event stream](ECONOMIC_EVENTS.md).
|
||||
|
||||
EconomicEventRecord v2 adds the authoritative world position captured when the
|
||||
fact is recorded. Nested v1 events migrate with a zero-vector fallback; old
|
||||
saves already encode their stable location IDs, and migrated knowledge is not
|
||||
recomputed spatially.
|
||||
|
||||
SimulationStateRecord v4 moves social authority into top-level directed
|
||||
`RelationshipStateRecord` entries. Each record contains `observer_id`,
|
||||
`subject_id`, familiarity, trust, and `last_trust_cause_event_id` (`-1` when no
|
||||
event has changed trust). Parsing requires unique ordered pairs, existing NPC
|
||||
IDs, bounded relationship values, and a real event for every non-empty cause
|
||||
ID.
|
||||
The relationship system serializes records in stable observer/subject order so
|
||||
they participate in deterministic checksums.
|
||||
|
||||
World schema v3 migrates its NPC-local familiarity pairs into directed
|
||||
relationships with neutral trust. Nested NPC schema v4 removes that obsolete
|
||||
duplicate field; v3 NPC records remain accepted only through the explicit
|
||||
migration. World schemas v1–v2 also derive the graph from any legacy
|
||||
familiarity data (or initialize it empty) after their storage/event migrations.
|
||||
|
||||
SimulationStateRecord v5 adds top-level `KnownEventStateRecord` entries keyed
|
||||
by `knower_id` and `event_id`. The objective `EconomicEventRecord` remains the
|
||||
single completed fact; knowledge records only state which NPC knows it. Parsing
|
||||
requires unique NPC/event pairs and valid references to both an existing NPC
|
||||
and an event in the same record. A relationship's causal event must also be
|
||||
known by that relationship's observer and, for the current trust contract, be
|
||||
a food deposit performed by the relationship subject.
|
||||
|
||||
World schema v4 migrates relationship causes into known-event records. The old
|
||||
schema used village-wide awareness, so this preserves the implied known fact
|
||||
without falsely inventing spatial witness provenance. New v5 facts are created
|
||||
only at event-record time from the actor and nearby NPC positions; historical
|
||||
events are never re-evaluated against current positions.
|
||||
|
||||
## Resource authority
|
||||
|
||||
`SimulationManager` owns `ResourceStateRecord` instances independently of the
|
||||
@@ -106,8 +145,11 @@ visuals from authoritative state.
|
||||
This phase does not yet provide:
|
||||
|
||||
- a save-slot menu, metadata, thumbnails, autosaves, or multiple profiles;
|
||||
- migrations older than the explicitly supported world schemas v1 and v2;
|
||||
- player inventory, relationship, schedule, or social-memory records;
|
||||
- migrations from any historical world schema other than the explicitly
|
||||
supported v1–v4 layouts;
|
||||
- player inventory or player relationship records;
|
||||
- broader relationship dimensions, line-of-sight/hearing evidence,
|
||||
acquisition provenance, memory decay, or communication;
|
||||
- persistence for the player transform or presentation-only scene state.
|
||||
|
||||
Those features should build on this boundary rather than inventing parallel
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Simulation Garden 01
|
||||
|
||||
Captured: 2026-07-09
|
||||
Captured: 2026-07-11
|
||||
|
||||
## Files
|
||||
|
||||
@@ -10,7 +10,17 @@ Captured: 2026-07-09
|
||||
|
||||
## Capture Command
|
||||
|
||||
Run from the project root with the normal renderer:
|
||||
Run from the project root with the normal renderer on macOS:
|
||||
|
||||
```bash
|
||||
HOME="$PWD/logs/quality/godot_profile" \
|
||||
APPDATA="$PWD/logs/quality/godot_profile" \
|
||||
LOCALAPPDATA="$PWD/logs/quality/godot_profile" \
|
||||
/Applications/Godot.app/Contents/MacOS/Godot \
|
||||
--path "$PWD" --script res://tools/capture_simulation_garden.gd
|
||||
```
|
||||
|
||||
On Windows:
|
||||
|
||||
```powershell
|
||||
$env:APPDATA = 'C:\Users\Rijad\Documents\Simulation Game\logs\quality\godot_profile'
|
||||
@@ -36,17 +46,17 @@ The next presentation pass adds compact silhouette props to the ridge landmark,
|
||||
pantry, guard, study, and rest sites so work locations remain identifiable in
|
||||
cinematic mode.
|
||||
|
||||
The frame also makes the next presentation risks plain:
|
||||
The frame also makes the remaining presentation risks plain:
|
||||
|
||||
- the camera still favors verification over composition;
|
||||
- placeholder characters, houses, and work props remain useful but visibly
|
||||
- the elevated third-person/top-down camera is intentionally preserved; future
|
||||
staging should improve composition within that cozy follow perspective;
|
||||
- houses and several work/resource props remain useful but visibly
|
||||
prototype-grade;
|
||||
- terrain texture variation and path strips read better than the old flat map,
|
||||
but landmarks, water, and foreground silhouettes need stronger first-read
|
||||
staging;
|
||||
- task glyphs and work-site props help, but the cinematic view still needs
|
||||
richer water/foreground shapes and stronger authored silhouettes before it
|
||||
becomes a strong public-facing shot.
|
||||
but terrain/color hierarchy still flattens some village landmarks;
|
||||
- task glyphs and work-site props help, but blockout buildings and resource
|
||||
props need stronger authored silhouettes before this becomes a polished
|
||||
public-facing shot.
|
||||
|
||||
Use this baseline as the first runtime comparison image before adding more
|
||||
systems or expanding the terrain.
|
||||
@@ -60,4 +70,32 @@ inventory now appears as carried logs. The capture also fixes three effects
|
||||
that obscured the simulation on Metal: waterfall mist was incorrectly emitted
|
||||
at the village origin, ridge/valley wind systems overlapped, and chimney smoke
|
||||
ignored particle transparency. The player capsule and camera composition are
|
||||
the next visible presentation gaps.
|
||||
the next visible presentation gaps at that checkpoint.
|
||||
|
||||
## July 11 visual follow-up
|
||||
|
||||
The implementation keeps the overlapping valley-wide white stroke/speck fields
|
||||
removed: those read as constant scratches or insects. In their place, one
|
||||
bounded controller produces sporadic groups of two or three terrain-aware
|
||||
calligraphic ribbons. Their tapered sage, warm amber, and pale aqua strokes are
|
||||
drawn head-to-tail by the shader, remain below 30% alpha, cannot stack, and
|
||||
share the prevailing direction used by deterministic tree-canopy motion and
|
||||
chimney smoke. The capture tool stages one gust so the next visual comparison
|
||||
does not randomly land during the intended quiet interval.
|
||||
|
||||
The PNGs listed above still predate that gust-controller pass. A fresh Metal
|
||||
capture was unavailable when the code and headless mesh/shader checks landed,
|
||||
so do not use those images as evidence of the final ribbon opacity or terrain
|
||||
contact. Replace both images after running the capture command on the normal
|
||||
renderer and reviewing the staged mid-sweep gust.
|
||||
|
||||
The day/night controller also reconnects to the authoritative simulation clock
|
||||
after scene startup and uses the correct sunrise/sunset color order, preventing
|
||||
lighting drift during speed changes or restoration.
|
||||
|
||||
The player now uses a compact multi-part silhouette with a teal tunic, warm
|
||||
scarf/satchel accents, and velocity-driven walk motion. Collision, controls,
|
||||
and the elevated staggered follow camera are unchanged. The next visible gains
|
||||
should come from replacing remaining blockout architecture, strengthening work
|
||||
props, and improving terrain/color hierarchy—not from changing the camera
|
||||
language again.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 419 KiB After Width: | Height: | Size: 418 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 428 KiB After Width: | Height: | Size: 426 KiB |
@@ -40,8 +40,8 @@ is optional.
|
||||
|
||||
### Fast changed-files mode
|
||||
|
||||
Only runs `gdformat` / `gdlint` on `.gd` files modified since the last commit.
|
||||
The Godot dependency check and all project scenarios still run.
|
||||
Only runs `gdformat` / `gdlint` on tracked changes and new untracked `.gd`
|
||||
files. The Godot dependency check and all project scenarios still run.
|
||||
|
||||
```bash
|
||||
./tools/quality.sh --changed
|
||||
@@ -128,7 +128,10 @@ The script exits non-zero on any failure, so it will fail the CI step.
|
||||
|
||||
The shell gate isolates Godot's cross-platform user-data paths under
|
||||
`logs/quality/godot_profile`. Before running scenarios it imports project and
|
||||
GUT global classes when the ignored cache is absent, so a fresh clone needs no
|
||||
manual editor launch. Godot/GUT script parse or load markers are failures
|
||||
because headless Godot can report those errors while returning a zero process
|
||||
exit code.
|
||||
GUT global classes whenever GDScript changes, so fresh, renamed, and deleted
|
||||
`class_name` scripts cannot leave the ignored cache stale. Godot/GUT script
|
||||
parse or load markers are failures because headless Godot can report those
|
||||
errors while returning a zero process exit code. Every Godot subprocess has a
|
||||
portable watchdog on stock macOS as well as Linux/Windows, and nonzero
|
||||
`gdformat`/`gdlint` exits fail the gate even when their output is not a familiar
|
||||
diagnostic string.
|
||||
|
||||
Reference in New Issue
Block a user