feat: add person history and trust reactions

This commit is contained in:
Rijad Zuzo
2026-07-12 11:42:10 +02:00
parent 99b8146f75
commit 9fcf6a0a58
19 changed files with 543 additions and 90 deletions
+5 -2
View File
@@ -19,7 +19,7 @@ SimulationClock
-> RelationshipSystem applies evidence-gated social consequences
-> WorldViewManager presents travel and NPC state
-> ActiveWorldAdapter supplies loaded-world positions/capacity
-> NpcVisual performs local navigation and animation
-> NpcVisual performs local navigation, animation, and transient reactions
```
`SimulationManager` is the scene-tree façade for the simulation. It owns the
@@ -35,7 +35,7 @@ would otherwise obscure that lifecycle:
- `simulation/knowledge/EventKnowledgeSystem.gd` owns per-NPC references to
known objective events, immutable acquisition provenance, proximity witnesses
at record time, one-hop direct fact transfer, and deterministic recent-fact
retention;
retention/importance ranking;
- `simulation/relationships/RelationshipSystem.gd` owns directed relationship
queries, event-driven trust changes, and deterministic social tie-breaking;
- `simulation/persistence/` owns save-slot file safety;
@@ -81,6 +81,9 @@ improving ownership.
- Presentation may report facts and submit commands; it does not choose NPC
actions or own resource, storage, inventory, event, knowledge, relationship,
or reservation state.
- Inspector history is a read-only façade query over objective events and
retained knowledge. Relationship cues consume state-change signals and are
intentionally absent from saves and checksums.
- 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
+7 -2
View File
@@ -700,11 +700,16 @@ Completed:
recent facts. A deterministic daily-sized review fades old routine facts,
conversations prefer lasting evidence, and the inspector shows both memory
counts and the displayed fact's retention class.
24. Person history and trust blossom: the selected-NPC inspector now separates
up to four lasting-first retained memories from three objective personal
actions. A real evidence-caused trust gain produces one short amber blossom
above its observer, including in cinematic mode, without persistent or
simulation-owned animation state.
Next:
1. Add a compact retained-memory/person-history view and one visible social
reaction cue, as sequenced in `LEARNING_ROADMAP.md`.
1. Implement one bounded Milestone 7 rumour/opportunity proof, 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
+5 -2
View File
@@ -87,8 +87,11 @@ save/restore continuity.
`NpcVisual` shows a small food sack whenever its authoritative inventory
contains food. A newly loaded visual derives the same state directly from the
NPC record, so unloading presentation does not lose the fact.
The selected-NPC inspector shows lasting/recent counts and labels the displayed
fact with both acquisition provenance and retention class.
The selected-NPC inspector shows up to four lasting-first retained facts with
acquisition provenance, separately from three objective events the NPC
personally performed. A real trust-changing consequence emits one transient
amber blossom above its observer. The cue is presentation-only, remains visible
in cinematic mode, and is neither saved nor replayed after visual rebuild.
## Deliberate limits
+16 -5
View File
@@ -698,11 +698,22 @@ The first importance/retention slice is complete:
boundary, capacity, cause-protection, save/checksum, and informed-choice
regressions cover the slice.
This advances the first Milestone 6 evidence-to-choice path without claiming
full belief simulation. The practical next sequence is a compact retained
memory/person-history view and a visible social-reaction cue, then one bounded
Milestone 7 rumour/opportunity proof without generalized distortion or
free-form dialogue.
The compact history/reaction slice is complete:
- the selected-person inspector separates lasting-first retained memories from
the NPC's own objective event history and keeps both lists bounded;
- remembered facts show performed, witnessed, communicated, or legacy
provenance without copying authoritative events into presentation state;
- a real trust change blooms once above its observer, remains visible in
cinematic mode, and is never persisted or replayed after visual rebuild;
- ranking, forgetting/objective-history separation, observer-only routing,
checksum neutrality, restore, cinematic, and death regressions cover the
slice.
This completes the first bounded Milestone 6 evidence-to-choice presentation
path without claiming full belief simulation. The practical next slice is one
bounded Milestone 7 rumour/opportunity proof without generalized distortion,
free-form dialogue, or a generic quest framework.
Recently completed:
+17 -12
View File
@@ -373,13 +373,13 @@ A small village panel displays:
- a Tab-cycled NPC inspector with profession, needs, task state, destination,
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.
- a compact selected-person history that separates up to four importance-ranked
retained memories from the NPC's three latest objective personal actions.
NPC name/profession labels, definition-driven colors and props, carried-food
visuals, and compact task glyphs make active simulation state readable in the
world. The F10 cinematic mode hides debug labels while preserving the task
glyphs.
visuals, compact task glyphs, and a brief amber blossom on real trust gains make
active simulation state readable in the world. The F10 cinematic mode hides
debug labels while preserving task glyphs and transient social reactions.
## Runtime architecture
@@ -416,7 +416,8 @@ Focused `RefCounted` collaborators keep rule ownership visible:
- `SimulationEventLog` owns deterministic event history and queries;
- `EventKnowledgeSystem` owns per-NPC known-event references, immutable
first-acquisition time/provenance, actor/nearby evidence capture, bounded
one-hop communication, and deterministic recent-memory retention;
one-hop communication, deterministic recent-memory retention, and stable
importance ranking for presentation/communication queries;
- `RelationshipSystem` owns directed relationship state, event-driven trust
consequences, and deterministic social queries.
@@ -432,7 +433,9 @@ than duplicating these responsibilities across additional manager nodes.
- sends resolved travel destinations to visuals;
- reports arrival and navigation failure back to `SimulationManager`;
- synchronizes successful visual movement into authoritative NPC position;
- applies visual death state.
- applies visual death state;
- turns authoritative relationship-change signals into observer-only transient
presentation cues without queuing or persisting them.
### `player/npc/NpcVisual.gd`
@@ -443,7 +446,7 @@ than duplicating these responsibilities across additional manager nodes.
- moves and rotates toward path points;
- reports arrival;
- presents definition-driven profession silhouettes, carried resources, task
glyphs, walk motion, and death state.
glyphs, walk motion, brief trust-gain blossoms, and death state.
### `player/player.gd` and `player/camera_rig.gd`
@@ -593,8 +596,8 @@ These are expected prototype constraints, not necessarily isolated bugs:
evidence, personalized reinforcement/decay, false beliefs, or multi-hop
rumours.
- The reason inspector exposes current decisions, utility rejections, one exact
relationship cause, memory counts, and the latest known fact with its speaker
and retention class, but a broader person-history view is not yet present.
relationship cause, and a compact person-history view that distinguishes
importance-ranked retained memories from objective personal actions.
- 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.
@@ -841,8 +844,10 @@ and relationship cause, the inspector names the speaker, and the listener's
future work can change without duplicating event history. Importance and
retention now keep current relationship causes lasting, cap other memories,
and forget routine facts at deterministic daily-sized reviews without deleting
the objective event. A compact retained-memory/person-history view and visible
social-reaction cue are the next systems slice.
the objective event. The selected-person inspector now shows lasting-first
retained memories beside objective personal history, and real trust changes
produce a short observer-only amber blossom without altering saved state. The
next systems slice is one bounded rumour/opportunity proof.
The remaining simulation-garden target still aims for:
+18 -8
View File
@@ -1,6 +1,6 @@
# Simulation Garden 01
Captured: 2026-07-11
Captured: 2026-07-12
## Files
@@ -29,8 +29,10 @@ $env:LOCALAPPDATA = 'C:\Users\Rijad\Documents\Simulation Game\logs\quality\godot
```
The script warms up `main.tscn`, verifies that the simulation and active NPC
visuals exist, captures the F10 debug presentation, then captures the cinematic
presentation with development labels and UI hidden.
visuals exist, stages a real food-deposit/trust consequence plus one wind gust,
captures the F10 debug presentation, then captures the cinematic presentation
with development labels and UI hidden. The trust blossom is restarted only for
the second framing so both captures show the same real consequence clearly.
## Review
@@ -83,11 +85,9 @@ 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 PNGs listed above have now been refreshed on the Metal renderer and include
the staged mid-sweep gust, so they can be used to assess ribbon opacity and
terrain contact.
The day/night controller also reconnects to the authoritative simulation clock
after scene startup and uses the correct sunrise/sunset color order, preventing
@@ -99,3 +99,13 @@ 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.
## July 12 social-history follow-up
The debug capture now stages Tarik's real witnessed food-deposit memory and
trust consequence. The inspector distinguishes that lasting subjective memory
from Tarik's own objective actions in a shorter, more legible panel. The same
consequence produces one brief amber halo-and-mote blossom above Tarik; it
remains visible when F10 removes the debug UI but does not become permanent
world clutter. Both refreshed images preserve the established elevated,
slightly staggered top-down camera.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 KiB

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 KiB

After

Width:  |  Height:  |  Size: 446 KiB