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.

SettingDefaultEffect
bAutoCaptureActorsOnSavetrueEvery save scans loaded levels and captures all saveable actors. Turn off only if you want to capture exclusively via explicit OnActorStateChanged calls.
bIncludeWorldStateInMainSavetrueRequestSaveProgress / auto / quick saves also flush world state - one call saves everything.
bAutoLoadWorldStatetrueApplies 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.

In your Game Mode Blueprint: Event EndPlay -> branch on End Play Reason (EndPlayInEditor / Quit) -> Get Crimson Save Game Manager -> Save Game To Active Slot Synchronous.
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.

Enable **bSaveWorldStateAfterEveryChange** in Project Settings, then at the moment of change call **On Actor State Changed** on the Crimson Save World Manager (**Get World Subsystem** -> `Crimson Save World Manager Subsystem`), passing the changed actor (Self).
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