merge: integrate remote player quest slices

This commit is contained in:
Rijad Zuzo
2026-08-16 16:53:30 +02:00
55 changed files with 3640 additions and 54 deletions
+22 -2
View File
@@ -49,13 +49,16 @@ SimulationClock
-> SimulationEventLog records and indexes completed facts
-> WorldEventStore exposes typed participants, locations, and causal queries
-> EventKnowledgeSystem records, ranks, transfers, and retains bounded knowledge
-> RelationshipSystem applies seven-dimensional evidence-backed consequences
-> RelationshipSystem applies seven-dimensional evidence-backed consequences
-> SituationSystem projects real unresolved conditions from facts and events
-> QuestJournalSystem records only player discovery/tracking preference
-> SocialCommitmentSystem resolves promises from ordinary outcome events
-> ConversationService plans deterministic semantic turns from current context
-> VillageOpportunitySystem preserves the legacy bounded compatibility slice
-> ConflictSystem advances indexed combatants and authoritative combat outcomes
-> ConflictSystem advances indexed combatants and authoritative combat outcomes
-> PlayerQuestSystem turns open needs into named player quests and
grants Standing as the player resolves them through real supply/feed
-> PlayerNeedsSystem advances the player's hunger, energy, and carry
-> WorldViewManager presents travel, NPC state, and world-state cues
-> ActiveWorldAdapter supplies loaded-world positions/capacity
-> LoadedResourceSpatialIndex bounds finite-anchor discovery
@@ -128,6 +131,22 @@ would otherwise obscure that lifecycle:
When no such helper exists, it can separately derive an ephemeral
`OpportunityPlayerResponseResult` from the real destination capacity and
enabled player-usable finite sources;
- `simulation/quests/PlayerQuestSystem.gd` turns real open needs into named
player quests (`PlayerQuestRecord`) and owns the player's `PlayerStandingRecord`
reputation. A quest is generated only when the player can genuinely act
through the ordinary economy (an unassisted pantry/wood shortage, or a hungry
player-feedable animal), and it is resolved only by a real player supply or
feed event. Completing a quest grants Standing and raises the requester's
gratitude; a requester who personally trusts the player can ask them directly
even when another capable helper exists. Quests, Standing, and gratitude are
persisted and never become quest-only simulation state;
- `simulation/quests/PlayerNeedsSystem.gd` owns the player's embodied hunger,
energy, starvation, death, and carried inventory, advancing on the
deterministic tick and mutating finite resources and storage only through the
ordinary economy and recorder;
- `simulation/quests/PlayerNegotiationSystem.gd` owns the read-only villager
talk surface plus accept/decline of personal requests, delegating quest
lifecycle to `PlayerQuestSystem`;
- `simulation/persistence/` owns save-slot file safety;
- `simulation/state/` owns versioned serialized record contracts;
- `simulation/definitions/` owns stable IDs and immutable action/profession
@@ -189,6 +208,7 @@ hard to read.
| `simulation/situations/` | World situation, journal, and commitment lifecycles |
| `simulation/dialogue/` | Semantic conversation planning and presenter boundary |
| `simulation/regional/` | Regional records, due-job scheduling, keyed randomness, analytical updates |
| `simulation/quests/` | Named player quests and Standing reputation from real need resolution |
| `simulation/state/` | Versioned, serializable mutable records |
| `simulation/definitions/` | Stable IDs and immutable gameplay definitions |
| `simulation/persistence/` | Validated local save-file storage |
+34
View File
@@ -897,6 +897,40 @@ Next:
by the scaling fixture.
3. Add a market/traveler cadence so the returning player finds something new:
a traveler who shares one rumour or a bounded food-for-wood exchange.
1. Let an inspected villager who owns an open opportunity surface that exact
village need plus the authoritative direct-help route, capable helper, or
honest unavailable state that currently exists. **Complete:** the quiet
`VillagerFieldNoteHud` now shows a restrained `Need` line for exactly that
note, derived from the existing player-response/helper queries and the real
storage state. It names the helper when one is capable, shows the direct
finite-resource-to-storage route when the player response derives it, or
honestly states why help is unavailable, and it re-derives from live facts
after restore without entering saves.
2. Prove that the ordinary finite-resource-to-storage harvest resolves an
available player route and updates the context without dialogue branching,
acceptance state, rewards, a quest log, or saved presentation state.
**Complete:** a runtime scenario stages the real pantry crisis, surfaces the
need for its interested villager, and proves that one ordinary
`harvest_resource_node` extraction resolves the same open opportunity and
clears the need segment on the next refresh.
3. Give the player a reason to keep helping: a persistent **Standing** loop.
**Complete:** resolving real village needs (pantry, wood, hungry animals)
now grants Standing (Stranger → Known Hand → Trusted → Village Steward →
Voice of Jajce) and raises the requester's gratitude. The world's quest
generator turns each open need into a named player quest in a quiet
`QuestJournalHud`, and villagers who personally trust the player start
asking them directly even when another helper could act. All of it flows
through the ordinary finite-resource harvest/feed contracts, survives
save/restore deterministically, and adds no quest-only state.
4. Make the player a citizen with a body. **Complete:** the player now has
hunger and energy that advance on the simulation tick, eats from the real
pantry, weakens when starving, and can die by starvation (halving Standing).
Gathering fills a carried inventory with capacity, and depositing at the
pantry or woodpile is an explicit transaction that resolves the same quests.
Pressing `E` on a villager opens a personal talk where you accept or decline
their real request. The embodied needs, carry, and negotiation rules live in
focused `PlayerNeedsSystem`/`PlayerNegotiationSystem` collaborators and are
covered by headless, runtime, and schema-restore regressions.
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
+56
View File
@@ -1048,6 +1048,62 @@ bounded through the existing spatial/population indexes, 510 Hz UI/environmen
updates, cached combatant order, and navigation retry backoff. High, Balanced,
and Low profiles now prove a reversible weak-PC structural budget; real
weak-hardware frame-time/GPU/memory measurement remains intentionally open.
The first bounded field-note opportunity surfacing slice is complete:
- `VillagerInspectionResult` now carries an optional read-only
`VillagerOpportunityNote` that is present only when the inspected villager is
the interested party of an open village opportunity;
- `VillagerOpportunityNote.derive` decides the honest help state from the
existing authoritative queries: the derived player-response route wins, then
the capable helper by name, then a real unavailable reason (need already met,
storage has no room, no stocked source in reach, or no storage at all);
- the quiet `VillagerFieldNoteHud` shows a restrained `Need` line for exactly
that note, coexists with the existing `E` prompt and cinematic mode, and
re-derives it from live state without entering saves or drawing RNG;
- a real player finite-resource harvest resolves the same open
`OpportunityStateRecord` through the existing economy/event history, and the
need segment clears on the next refresh;
- unit, runtime, and query-neutrality checks cover the derive branches, the
staged pantry-crisis surfacing, helper naming, ordinary harvest resolution,
and the absence of saved presentation state.
The first bounded player-Standing and quest slice is complete:
- `PlayerStandingRecord` is a versioned, deterministic 0100 reputation with
named tiers (Stranger, Known Hand, Trusted, Village Steward, Voice of Jajce)
and per-requester gratitude, persisted through world schema v12;
- `PlayerQuestRecord` plus `PlayerQuestSystem` turn real open needs into named
player quests: an unassisted pantry or wood shortage (or a hungry,
player-feedable animal) generates one quest for its requester, resolved only
by a real player supply or feed event through the ordinary economy;
- completing a quest grants Standing and raises the requester's gratitude, an
NPC who trusts the player personally can ask them directly even when another
capable helper exists, and tier advances emit a celebration beat;
- a read-only `QuestJournalHud` surfaces the active quest, Standing tier, and
gratitude feedback without entering saves or drawing RNG;
- headless, runtime, schema-restore, and GUT unit regressions cover generation,
completion, invalidation, animal care, personal requests, and tier
progression.
The first embodied-citizen slice is complete:
- the player now has a body in the world: hunger and energy advance on the
deterministic tick (`PlayerStateRecord`), eating at the pantry reduces the
player's own hunger, starvation weakens movement, and death by starvation
halves Standing and allows a respawn, all persisted through world schema v13;
- the player carries a real inventory with capacity: gathering a finite
resource fills the hands, depositing at the pantry or woodpile is an explicit
transaction that resolves opportunities and quests through the same supply
contract used by NPCs;
- pressing `E` on a nearby villager opens a personal talk: the villager greets
you and surfaces their real need, and you can accept their request (which
surfaces the same open quest) or decline it (closing the quest without
gratitude);
- `PlayerNeedsSystem`, `PlayerNegotiationSystem`, and `SimulationEventRecorder`
keep the player-citizen rules out of the manager;
- headless, runtime, carry/deposit, talk/negotiation, and schema-restore
regressions cover needs, death, respawn, carrying, depositing, quest
resolution, and personal request accept/decline.
Recently completed:
+21
View File
@@ -310,6 +310,27 @@ The village currently tracks:
- per-resource modifiers;
- per-resource priorities.
### Player Standing and quests
The world now rewards player help with a persistent **Standing** reputation
(0100) and named tiers: Stranger, Known Hand, Trusted, Village Steward, and
Voice of Jajce. The quest generator turns real open needs into player quests:
- an unassisted pantry or wood shortage generates a named quest from its
worried villager;
- a hungry, player-feedable goat generates an animal-care quest;
- completing a quest through the ordinary finite-resource harvest or feed
contract grants Standing, raises the requester's gratitude, and emits a
thank-you beat;
- a requester who personally trusts the player (gratitude ≥ 0.5 and Standing
tier at least Known Hand) asks them directly even when another capable
helper exists;
- a compact `QuestJournalHud` shows the active quest, Standing tier, and
gratitude feedback; tier advances trigger a celebration beat.
Quests, Standing, and gratitude persist through world schema v12 and never
become quest-only simulation state.
### NPC task lifecycle
Task states are:
+6
View File
@@ -39,6 +39,12 @@ simulation. The current world schema is v16 and captures:
definition ID) for NPC defenders and standalone hostile archetypes;
- faction records (food, warriors, aggression, morale, stance, war plan) for
the village and the hill tribe.
- the player's Standing reputation (0100), resolved-need count, and per-NPC
gratitude, plus named player quest records that reference the originating
opportunity or animal, requester NPC, resource/target/amount, Standing
reward, and exact resolution or invalidation tick;
- the player's embodied state: hunger, energy, starvation progress, death
count, and carried inventory with its capacity (schema v13).
The top-level identity is: