Save data format: versioned registry, uniform item tree #28
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Principles
Item instance structure
Parent-child chains
Example — 1911 on the player's hip:
Every link in the chain is an item. The holster is an item (snapper type). The magazine is an item (ammo holder type). Bullets are generic items — no real stat modifiers for now.
Container types
Containers are items with acceptance rules:
ammo.9mm.Ammo load order
Bullets are individual items in the holder's children list, in order. First in list = first fired. This means you can have an Altered bullet loaded in your gun and not realize it — it fires when its turn in the load order comes up. Gameplay emerges from the data model.
Dangling references (mod removed)
If a
defis no longer in the registry, the node's data persists but nothing affects it — inert, not deleted, not placeholder-swapped. If the mod comes back, the item reactivates with its data intact.Open questions
ammo.9mmetc.) — needs its own passSave rules — refinements (Zach, 2026-10-22)
Two rulings from tonight's session, both prompted by a bug Zach found testing main (walk off the sandbox, fall, return to menu, New Game → stored fall velocity punches the player through the floor):
Context: the basic save v1 implementing this format's file boundary (state dict as JSON, backup-first
.bakwrites, one run slot) is in da-game PR #8.— Lantern