docs: record player-citizen loop, care needs, regrowth, and seasons

This commit is contained in:
Rijad Zuzo
2026-08-11 00:46:00 +02:00
parent e51cde57be
commit e359e5253a
7 changed files with 150 additions and 38 deletions
+22 -3
View File
@@ -3,7 +3,7 @@
## Current contract
`SimulationStateRecord` is the versioned JSON boundary for the current
simulation. The current world schema is v11 and captures:
simulation. The current world schema is v13 and captures:
- simulation seed, tick interval, tick count, clock remainder, and elapsed
clock ticks;
@@ -25,14 +25,17 @@ simulation. The current world schema is v11 and captures:
historical communicator provenance;
- opportunity records with stable type/status, interested NPC, trigger event,
target storage/resource/amount, exact later resolution event identity, or a
deterministic invalidation reason and close tick.
deterministic invalidation reason and close tick;
- a player record holding the player-citizen's hunger, energy, and carried
inventory. The player's world position remains presentation-owned and is
intentionally not serialized.
The top-level identity is:
```json
{
"schema": "the_steward.simulation",
"schema_version": 11
"schema_version": 13
}
```
@@ -214,6 +217,22 @@ SimulationStateRecord v11 preserves world-v10 animals and upgrades nested
idle, immediately due routine without inventing a destination; loaded-world
selection establishes the first real target later.
SimulationStateRecord v12 lets `RelationshipStateRecord` reference the player
sentinel (`PLAYER_ACTOR_ID`) as a subject, so a villager's directed trust can
point at the player. World v11 migration adds nothing but accepts the relaxed
validation; existing NPC-only relationship history is preserved. Player-triggered
food supply is recorded as a pantry `storage_deposited` from the player inventory
(or, for legacy v11 saves, as a direct harvest into the pantry).
SimulationStateRecord v13 adds the top-level `player` record
(`PlayerStateRecord` v1) with the player-citizen's hunger, energy, and carried
inventory. World schemas v12 and earlier migrate to a fresh default player
record (hunger 40, energy 100, empty inventory). Player needs advance on the
deterministic tick with exact binary fractions so continuation checksums stay
stable. Resource records also migrate to v4, adding `max_amount` and
`regrow_rate`; legacy v3 resources keep their current amount as the cap and
gain no regrowth.
Current-schema parsing requires unique animal IDs that do not collide with
resource or storage IDs. An animal reservation must belong to an existing NPC
whose active feed task targets that exact animal. Every `animal_fed` event