How-To: Configure Auto-Saving
Goal: understand the world-state settings and pick the right capture / flush behavior for your game.
Prerequisites
Open Project Settings -> Crimson -> Crimson Save Game Manager -> World State.
The defaults (recommended)
Out of the box the system is fully automatic: implementing ICrimsonSaveableActor + marking SaveGame is enough, and a normal save persists world actors.
| Setting | Default | Effect |
|---|---|---|
bAutoCaptureActorsOnSave | true | Every save scans loaded levels and captures all saveable actors. Turn off only if you want to capture exclusively via explicit OnActorStateChanged calls. |
bIncludeWorldStateInMainSave | true | RequestSaveProgress / auto / quick saves also flush world state - one call saves everything. |
bAutoLoadWorldState | true | Applies world slabs automatically after a load completes. Turn off to call LoadWorldState() yourself. |
Save on quit (wire it into your game mode)
A save still has to be triggered - nothing saves on its own. To make "change something, then quit" persist with no explicit save call, call SaveGameToActiveSlotSynchronous() (a synchronous save of systems + world actors, safe during shutdown) from your game mode's EndPlay, gated by the bAutoSaveOnExit setting.
Verify
Change a
SaveGame value, quit PIE, press Play again - the value persists (with bAutoLoadWorldState on). A WorldSlab_<Level>.sav appears in the slot after quitting.Already wired?
If you use the suite's ready-made game mode (
ACrimsonGameMode), this EndPlay hook is already in place - you only need bAutoSaveOnExit enabled. The step above is for projects wiring their own game mode.Checkpoint / immediate flush
For a game that should persist a change the instant it happens (a lever thrown, a boss down), pair the incremental hook with per-change flushing.
Performance
bSaveWorldStateAfterEveryChange flushes to disk on every reported change. Fine for small worlds / infrequent changes; prefer checkpoint saves on large worlds.Verify
With
bVerboseLogging on, trigger a save and confirm a WorldSlab_<Level>.sav file appears in Saved/SaveGames/Slot_<n>/.See also
- API Reference -> Developer Settings - the full settings reference
- Concept: World State & Identity - how capture and restore work