feat: unify authored activity commands
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
## Current contract
|
||||
|
||||
`SimulationStateRecord` is the versioned JSON boundary for the current
|
||||
simulation. The current world schema is v15 and captures:
|
||||
simulation. The current world schema is v16 and captures:
|
||||
|
||||
- simulation seed, tick interval, tick count, clock remainder, and elapsed
|
||||
clock ticks;
|
||||
- simulation seed, stable regional world/location scope, tick interval, tick
|
||||
count, clock remainder, and elapsed clock ticks;
|
||||
- every NPC's identity, needs, attributes, task lifecycle, target, position,
|
||||
starvation state, and decision RNG stream;
|
||||
- village resource counters;
|
||||
@@ -45,7 +45,7 @@ The top-level identity is:
|
||||
```json
|
||||
{
|
||||
"schema": "the_steward.simulation",
|
||||
"schema_version": 15
|
||||
"schema_version": 16
|
||||
}
|
||||
```
|
||||
|
||||
@@ -213,6 +213,15 @@ nested v1/v2 events receive empty/zero defaults, while a new `task_blocked`
|
||||
event requires its stable action, source storage, resource, and positive
|
||||
requirement contract.
|
||||
|
||||
The v3 event envelope also carries validated extension fields for authored
|
||||
activity facts without adding a parallel quest record. An
|
||||
`activity_completed` fact stores the target/action IDs, world and location
|
||||
scope, metric ID, actual bounded delta, and exact item cost. Loading derives
|
||||
the expected handler, effect, event type, metric, maximum delta, and cost from
|
||||
the current action definition and rejects forged actor, discriminator, scope,
|
||||
or amount combinations even when no knowledge record references the event.
|
||||
Player and NPC performed knowledge points to that same immutable fact.
|
||||
|
||||
SimulationStateRecord v10 adds the top-level `animals` array and the first
|
||||
`AnimalStateRecord` schema. Each animal record stores its stable animal and
|
||||
species IDs, display name, authoritative world position, hunger,
|
||||
@@ -294,6 +303,19 @@ templates, balloon state, and prose are transient. Reopening dialogue plans from
|
||||
current facts plus the retained semantic acts, so wording can evolve without
|
||||
changing authoritative history.
|
||||
|
||||
SimulationStateRecord v16 adds non-empty `world_id` and `location_id` fields to
|
||||
the top-level simulation record. Activity completion and blocked-action facts
|
||||
retain that same scope in their immutable payload, so event-store indexes,
|
||||
knowledge validation, and save restoration cannot reinterpret a local position
|
||||
as belonging to another loaded context. World v15 migrates explicitly to the
|
||||
existing Bosnia/Jajce IDs. An event log that already contains facts refuses a
|
||||
different configured scope instead of silently reindexing history. Restore
|
||||
preflights this scope against the active adapter before changing clock,
|
||||
economy, NPC, or event state, so both empty- and populated-history mismatches
|
||||
fail atomically. Older unstructured `task_blocked` facts are retained with
|
||||
explicit legacy provenance for save continuity, but they are not promoted into
|
||||
knowable evidence or new situation triggers.
|
||||
|
||||
Nested `KnownEventStateRecord` v4 adds the player as a valid knower/source and
|
||||
records hop count, confidence, salience, and explicit pinning. Communicated
|
||||
facts remain exactly one hop from a performed or witnessed source. Nested
|
||||
|
||||
Reference in New Issue
Block a user