feat: add exact player context actions
This commit is contained in:
@@ -149,6 +149,21 @@ These collaborators are `RefCounted` rule services, not additional scene-tree
|
||||
managers. Further decomposition should follow measured pressure and a proven
|
||||
gameplay consumer.
|
||||
|
||||
## Player context-interaction contract
|
||||
|
||||
`Player.get_interaction_context()` derives one ephemeral
|
||||
`PlayerInteractionResult` in the same priority order used by `E`: hungry
|
||||
animal, usable finite resource, guard site, study site, then pantry. The result
|
||||
contains the exact stable target ID, action, display name, prompt copy,
|
||||
availability, and loaded target reference. `try_interact()` executes that
|
||||
single resolved result rather than maintaining a second target map.
|
||||
|
||||
`PlayerInteractionHud` formats the result and transient outcome feedback. It
|
||||
does not select targets, mutate simulation state, or enter the save record.
|
||||
State restore clears active feedback and re-derives the prompt from current
|
||||
simulation and loaded-world facts. The HUD is separate from development
|
||||
overlays so the embodied action remains legible in cinematic mode.
|
||||
|
||||
## Active-position contract
|
||||
|
||||
NpcVisual emits active position changes after successful movement.
|
||||
|
||||
@@ -817,14 +817,20 @@ Completed:
|
||||
preserves two exact reservations through save/restore, and feeds only the
|
||||
named target. Private shelter ownership remains loaded-world context; no
|
||||
herd system, animal index, or schema bump was introduced.
|
||||
43. `Jajce Context Action 10`: the existing `E` interactions now derive one
|
||||
exact ephemeral result shared by prompt and execution. A restrained,
|
||||
cardless bottom-center HUD names the nearest hungry goat, shows real pantry
|
||||
availability, reports success or blockage, remains visible in cinematic
|
||||
mode, and also covers existing resource, pantry, guard, and study actions.
|
||||
Restore discards transient feedback and re-derives context from live facts.
|
||||
|
||||
Next:
|
||||
|
||||
1. Playtest the named pair and record one concrete gameplay or scaling need
|
||||
before extending the animal model.
|
||||
2. Keep breeding, products, herd scheduling, animal spatial indexing, and
|
||||
active/abstract simulation LOD deferred unless that evidence requires one
|
||||
of them; otherwise return to the broader milestone sequence.
|
||||
1. Make NPC feeding visibly collect one real pantry food into the caretaker's
|
||||
existing inventory/carried-food presentation before delivery to the exact
|
||||
reserved goat.
|
||||
2. Prove conservation, claim continuity, and save/restore during both travel
|
||||
legs; keep herd, product, indexing, and LOD systems deferred.
|
||||
|
||||
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
|
||||
|
||||
@@ -947,14 +947,28 @@ Schema-v11 restore preserves both claim pairings and checksum. Loaded routine
|
||||
sites now distinguish private shelter ownership from shared species context
|
||||
without adding that authored-world fact to saved simulation state.
|
||||
|
||||
The immediate next step is a playtest-and-measure gate, not a herd abstraction.
|
||||
Keep loaded-animal discovery linear and use the named pair to identify one
|
||||
concrete gameplay need before adding breeding, products, herd scheduling,
|
||||
animal indexing, or active/abstract animal LOD. If no such need appears, resume
|
||||
the broader milestone sequence instead of adding animal framework by momentum.
|
||||
The named-pair playtest gate exposed and closed its first embodied-use gap.
|
||||
`PlayerInteractionResult` now derives one exact, ephemeral context from the
|
||||
same priority and stable target used by `E`: named animal care, finite-resource
|
||||
harvest, pantry eating, guard work, or study. A cardless bottom-center prompt
|
||||
shows the action and real availability, remains visible in cinematic mode, and
|
||||
briefly reports success or blockage. Restore clears transient feedback and
|
||||
re-derives the current prompt without adding saved state or drawing RNG.
|
||||
|
||||
The next bounded slice should make NPC animal care physically honest:
|
||||
`village_pantry -> NPC inventory -> exact named goat`. A caretaker should keep
|
||||
the same animal claim, collect one real food into the existing carried-food
|
||||
presentation, and deliver it without duplication across contention or
|
||||
mid-route restore. Keep breeding, products, herd scheduling, animal indexing,
|
||||
and active/abstract animal LOD deferred.
|
||||
|
||||
Recently completed:
|
||||
|
||||
- `Jajce Context Action 10`: one ephemeral result now keeps the displayed `E`
|
||||
prompt and executed stable target aligned across existing player
|
||||
interactions. Named goat care shows exact pantry availability and transient
|
||||
success/blockage, survives cinematic mode, and re-derives after restore
|
||||
without persistent UI state.
|
||||
- `Jajce Goat Pair 09`: named goat Zora adds a second independent animal
|
||||
record and private shelter while sharing Dunja's pasture. Stable nearest
|
||||
targeting, simultaneous exact reservations, isolated feed mutation and
|
||||
|
||||
+15
-6
@@ -228,6 +228,10 @@ plugin content, not game architecture.
|
||||
- Pressing `E` near a berry bush or tree extracts its configured yield into the
|
||||
village through the same `ResourceNode` contract used by NPCs.
|
||||
- Guard, study, rest, and food interactions now use typed world sites.
|
||||
- A cardless bottom-center `E` prompt derives the exact current animal,
|
||||
resource, storage, or activity target and its availability. Named goat care
|
||||
reports pantry cost plus transient success or blockage, remains in cinematic
|
||||
mode, and never enters saved state.
|
||||
- `Escape` releases captured mouse input.
|
||||
|
||||
### Village simulation
|
||||
@@ -478,16 +482,19 @@ than duplicating these responsibilities across additional manager nodes.
|
||||
|
||||
These implement camera-relative character movement, physical interaction
|
||||
proximity checks, ResourceNode harvesting, mouse capture, and the elevated
|
||||
follow camera.
|
||||
follow camera. `PlayerInteractionResult` is the ephemeral boundary shared by
|
||||
the current `E` prompt and execution, so UI copy names the exact stable target
|
||||
that receives the command.
|
||||
|
||||
### `world/ui/ui.gd`
|
||||
|
||||
The UI subscribes to village, task, event, knowledge, relationship, and
|
||||
opportunity changes. It formats aggregate state and resolves known facts,
|
||||
relationship causes, and opportunity lifecycle details through manager queries
|
||||
without owning or recomputing simulation facts. `village_whisper_hud.gd` is a
|
||||
separate transient player layer that formats the same authoritative signals and
|
||||
remains independent of the development overlays.
|
||||
without owning or recomputing simulation facts. `village_whisper_hud.gd` and
|
||||
`player_interaction_hud.gd` are separate transient player layers that format
|
||||
authoritative signals or the current exact context and remain independent of
|
||||
the development overlays.
|
||||
|
||||
## Current runtime flow
|
||||
|
||||
@@ -1005,8 +1012,10 @@ Dunja's pasture, nearest loaded care targeting supports two simultaneous exact
|
||||
claims, and feeding one goat cannot mutate the other. World-schema v11
|
||||
preserves both claim pairings without serializing shelter ownership. Do not
|
||||
generalize animal discovery or introduce herd scheduling, products, breeding,
|
||||
or active/abstract animal LOD until playtest or measurement exposes a concrete
|
||||
need.
|
||||
or active/abstract animal LOD. The named-pair gate instead produced one
|
||||
Milestone 9 context-action result shared by prompt and execution, with exact
|
||||
pantry feedback and no persistent UI state. The next animal-facing proof should
|
||||
make NPC care visibly carry one real pantry food to its exact reserved goat.
|
||||
|
||||
The remaining simulation-garden target still aims for:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user