Choose what saves
- With no setup: the variables with SaveGame ticked (a variable’s Details, the Variable section’s advanced options) of the Game Instance, its subsystems, the Game Mode, the Game State, the game world’s subsystems and the map’s Level Blueprint. Project Settings > Plugins > Rolly Save > What Saves turns each kind off.
- Actors placed in your levels and spawned during play, with their components, save with no setup too: see Save actors and their components. So do the local players’ pawns, controllers and player states: see Save the player.
- Levels the player left by travel are kept and saved too: see Remember levels across travel.
- Any other object, such as a quest manager: call Register Object for Saving in its Begin Play with a name unique in your game, such as
QuestLog; leave Object unconnected to register Self. A load finds the object again by that name, so keep it the same between versions of your game. Its Group puts it in a group that part saves and loads take (see Save and load parts of the game). A game instance subsystem may call Unregister Object for Saving in its Deinitialize: after Rolly Save has shut down with the game instance, both calls do nothing. - State you cannot tick SaveGame on, such as another plugin’s weather: a Save Handler (see Save what is not a variable).
- Objects of other plugins declare what they save themselves (see Make your plugin’s objects save).
Only the server or a standalone game saves and loads the game. On a client, the save and load nodes fail with Not Authority and a setup message; send the request to the server with a Run on Server event on the player controller.
How every node ends
The nodes are async, so they go in an event graph: the engine does not allow them in functions. The top exec pin runs at once; then exactly one of Success or Failure runs on a later tick, never inside the call, with a Result. Branch on Result’s Status with Switch on Rolly Save Status, never on its Detail text, which is English for logs. The Rolly Save Status values say what each one means and what the game should show.
A node keeps running when the Blueprint that called it is destroyed, such as a menu closed right after the call, and its operation finishes; only its pins no longer run.
Save
- Save Game to Rolly Slot saves to the slot named by Slot Name, such as
Slot 1. Names that differ only in capital letters are one slot. - Rolly Quick Save saves to the slot
quick. - Success runs once the save is written. On Failure, the slot keeps its previous save.
- On Save Finished on the Rolly Save Subsystem fires after every save on the server or in a standalone game, whether a node, C++ or the quick save key asked for it, after the node’s pin. Bind it once, such as in a HUD that shows “Saved”.
- On Save Started fires as each save starts its capture, with its Slot Name, Kind and Started By: By is Local Player with that Player for a save a local player’s menu started (the slot screen, or C++ inside
FPlayerSaveScope), Autosave or Checkpoint for the game’s own, and Server for any other call. A HUD can show “Saving” until On Save Finished, which follows every started save, also an autosave a load overtook before its write (Busy). A call that is refused, such as during a save block, fires none. Slot Name is empty for a save whose slot is chosen after the capture: an autosave into the autosave slots and Save Game to New Rolly Slot. A save asked for from On Save Started itself is refused with Busy.
Load
Load Game from Rolly Slot loads a slot; Rolly Quick Load loads quick with Open Saved Map. Map picks where the saved values go:
| Map | What happens | Where the result arrives |
|---|---|---|
| Open Saved Map (default) | The map the save was made in opens, and every saved value is set before its Begin Play | The node’s Success only where the caller lives through the map change, such as the Game Instance; a widget or actor of the old map is destroyed with it. On Load Finished fires after every actor’s Begin Play in the loaded map, so bind it in Begin Play there |
| Keep Current Map | The game stays in its map, and the saved values are set on the objects that exist now | Success, then On Load Finished, in the tick the values are set |
- Get Last Load Result answers from the moment the saved values are set, so Begin Play of the loaded map can read how the load went. Code that must run before Begin Play after a load belongs in
OnRollySaveLoaded(see Make your plugin’s objects save), not in On Load Finished. - The Game Instance’s Event Init runs before Rolly Save starts, so bind On Load Finished in Begin Play of an actor, or call the load node from the Game Instance and use its Success.
- On Load Finished also fires for loads that were refused or failed: Not Found, Damaged, Newer Version and Missing Map before the map changes, and Busy when a second load is asked for while one runs, while that first load still runs. Branch on Status there: a handler that hides a loading screen or opens the game’s HUD on any On Load Finished does it too early.
- On Load Started fires as a load starts, with its Slot Name and whether it Opens Map. On Load Progress then reports each Phase: Reading, Migrating (a save of a lower Game Data Version), Loading Assets with Progress rising from 0 to 1, Opening Map (no progress comes while the game thread opens the map) and Setting Values. Use them for a loading screen; a load refused at its call fires neither. Start Rolly New Game Plus brings its carried values in through a load too: its On Load Started names
newgameplus, which is no slot of your game. - A Succeeded load whose Result has From Backup ticked came from the backup copy, since the newest copy was damaged or unreadable: tell the player the last save may be missing.
- While a load runs, from its call until its values are set, saves and loads return Busy. A save in Begin Play of the loaded map succeeds.
- Cancel: drag from the load node’s Async Action pin and call Cancel, or call Cancel Load of the Rolly Save Subsystem, which stops whichever load runs. Before the map change starts, the load stops, nothing of it is set and only On Load Cancelled fires, with its Slot Name: close a loading screen there. Autosaves asked for during the load run then, as after a finished one. After the map change starts, the load finishes and On Load Finished fires; the node’s pins do not. A cancel from code that runs while the values are being set (On Rolly Save Loaded, a Rolly Save component’s On Loaded, a Save Handler’s Apply) is refused the same way, Cancel Load returns false and the Output Log says why: that code runs inside the load.
- New game: call Clear Loaded Game when the player starts a new game. Otherwise the next save also keeps what the last load held for other maps and for objects not seen since, and levels come back as the player left them.
Load a slot as the game starts
To test from a save without the menus, start the game with -RollySaveLoad="Slot 1", as in MyGame.exe -RollySaveLoad="Slot 1". Once the first map’s Begin Play ran, the slot loads as Load Game from Rolly Slot loads it, opening its map; add -RollySaveKeepMap to set the saved values in the map the game started in. autosave_1, checkpoint and the other slots Rolly Save writes itself load too.
- Only the first world of the server or a standalone game reads it, once per process; clients follow their server.
- A name that is empty, longer than 1,024 characters or holds a NUL character loads nothing and gives a setup error (BadName), as does a slot that fails to load (LoadFailed).
- Shipping builds ignore it, with a warning in the log, unless Project Settings > Plugins > Rolly Save > Testing > Command Line Load in Shipping is on. Turn it on for test builds only: a shortcut could otherwise start a shipped game in any save.
Build a slot screen
- List Rolly Slots gives Slots, newest first, each a Rolly Save Slot Info: Slot Name, Save Time, Game Data Version, Size and what the save’s metadata records, such as its play time and place (see Show saves in a slot list). It reads the slot index, not the saves, so it is fast with many slots. Save Time is in UTC: show it with As DateTime (from UTC), which converts it to the player’s time zone.
- Copy Rolly Slot copies From Slot Name into To Slot Name with its save time. To Slot Name keeps what it held before as its backup. Copying a slot onto itself fails with Invalid Input; a From Slot Name without a save fails with Not Found.
- Delete Rolly Slot deletes both copies of a slot’s save, also one made by a newer version of the game, and succeeds when the slot held no save.
- List, Copy and Delete work on clients too: they act on that machine’s storage.
Quick keys
In Project Settings > Plugins > Rolly Save > Quick Save, tick Enable Quick Keys: Quick Save Key (F5) quick saves and Quick Load Key (F9) quick loads and opens the quick save’s map.
- The keys work in a standalone game and on a listen server’s host. A client’s key press saves nothing and gives the Not Authority setup message.
- They also reach your game’s own input. They do nothing while the game takes no game input, such as in a menu shown with Set Input Mode UI Only.
- Players cannot rebind them. For keys players rebind, or for a gamepad button, leave Enable Quick Keys off and call Rolly Quick Save and Rolly Quick Load from your own input action.
- Outside Shipping the engine runs its debug commands on the same keys:
Engine/Config/BaseInput.inibindsviewmode shadercomplexityto F5 andshot showuito F9. A check at Play In Editor’s start names them, and Remove Them takes them out of your project (see Check your save setup).
Check saves in the console
Open the console with the backtick key while playing. These commands read storage and write nothing, the slot index included.
| Command | Prints |
|---|---|
rolly. |
Each slot of the File Prefix in the slot index: key, display name, save time (UTC), game data version, Rolly Save version, size, the newest copy, and the kind, map and play time its metadata records. -profiles lists profiles instead |
rolly. |
The slot’s header, versions and chunks, and for each chunk of saved objects every object’s ID, class, size and sections |
rolly. |
The same, plus each object’s saved values: numbers, booleans, names, enums, strings and gameplay tags with their values, other types with their size; for actors and components also their transform, hidden flag, attachment and place in the level without the parent, velocities, control rotation, owner and whether they stay destroyed or a load creates them |
rolly. |
Only the chunk of the game instance, the Game Mode, the Game State, subsystems, registered objects and Save Handlers. -chunk WRLD /Game/Maps/Tavern shows one map’s Level Blueprint and actors |
rolly. |
Each of the slot’s two copies and the one that loads (see Check that saves survive a crash) |
From C++
The Rolly Save Subsystem has a call for each node: Save, QuickSave, Load, QuickLoad, CancelLoad, Delete, Copy, ListSlots, SavePart, SaveToMemory, SaveRewindPoint, Rewind, SaveCheckpoint, LoadCheckpoint, StartRun, EndRun, RenameSlot, ExportToFile, ImportFromFile, ListExportFiles, ExportToBytes, ImportFromBytes and StartNewGamePlus, and LoadProfile, SaveProfile and ResetProfile, which take a ULocalPlayer; part and memory loads go through Load with an FRollySaveLoadRequest. Their callbacks run on the game thread on a later tick, also after a map change, so capture weak pointers. Use Rolly Save from C++ shows them.