Skip to content

[game] Make save and runtime lifetimes explicit - #342

Open
Eldbury wants to merge 27 commits into
modawan:masterfrom
Eldbury:series/e-identity-corrections
Open

[game] Make save and runtime lifetimes explicit#342
Eldbury wants to merge 27 commits into
modawan:masterfrom
Eldbury:series/e-identity-corrections

Conversation

@Eldbury

@Eldbury Eldbury commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

This makes identity and runtime-lifetime boundaries explicit across module transitions and save restoration. Serialized object identity, Party roster identity, Area residency, runtime incarnation, and owned-object relationships are now represented independently instead of being inferred from numeric IDs, Tags, registry presence, or storage lifetime.

Save and module loading now separate fallible resource and structural preparation from irreversible session publication. Runtime objects and owned graphs publish only after their identity, construction, and ownership are coherent, while failed restoration retires partial state without exposing an invalid gameplay session.

Party continuation, object references, inventory/equipment ownership, Creature vitality, and K1/K2 save compatibility found during validation follow the same model. The lifecycle and failure contracts are documented in doc/e-series-loader-lifecycle.md.

Validation

  • 1,949 automated tests iterating across module transitions and save games using ~600 retail K1/K2 saves, no failures
  • focused save, identity, party/puppet, liveness, ownership, vitality, and new-game save coverage
  • retail save/content verification
  • broad K1/K2 gameplay manual smoke plus targeted party, puppet, MessageBus, Ebon Hawk, vitality, and fresh-save validation

Eldbury added 27 commits August 29, 2026 20:41
Keep live runtime object IDs separate from the authoritative IDs carried by a saved module graph. Restore saved references through a per-module translation registry, preserve runtime-created references through the live registry, and emit every snapshot reference through one object-based ID allocation context.

This prevents detached record IDs and coincident runtime numbers from binding to the wrong object, covers structural module references and nested effect/action/event references, and retains deterministic snapshot allocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant