# Savecraft node reference Every Blueprint node, event, setting and field, from the plugin's headers. The guide explains how they fit together. ## Which node do I use | To | Use | |---|---| | Save from a key, a menu or a checkpoint | Save Game (Savecraft) | | Save while the game is quitting | Save Game Blocking, on the Save Subsystem | | Load with a loading screen | Load Game (Savecraft): Progress, Loaded, Failed | | Load from a main menu, on the slot's own map | Open Slot | | List the slots for a menu | Get All Slots (newest first), Load Slot Thumbnail | | A picture of the moment on the slot | Set Next Save Thumbnail, before saving | | Fix old saves after a change | Raise Save Version, then On Savecraft Loaded (Saved With Version) | | Slots in the player's cloud | Sync With Cloud (Savecraft), Upload After Save, Delete Slot Everywhere | | Reset one player's character on a server | Forget Player, with Get Player Id | | A save folder per profile | Get Savecraft Settings, then set Save Folder | ## Which event runs where | Event | Runs on | |---|---| | On Savecraft Pre Save, On Savecraft Loaded | The server, on each saved actor and its components | | On Save Finished, On Load Finished, On Load Progress | The server (the machine that saved or loaded) | | On Cloud Finished, Sync With Cloud pins | The machine with the signed-in player | | Save Game and Load Game nodes | The server only. A client asks through a Run On Server event of yours | ## Savecraft Saveable The component that puts an actor in the save. Add it to any actor. | | Name | What it does | |---|---|---| | Property | **Scope** | World: with the world. Player: with the player behind this actor, given back when they come back. Global: one of a kind the game makes itself, like the game state | | Property | **Save Transform** | Save where it stands. Spawned actors always come back where they were, this only matters for placed ones | | Property | **Save Components** | Save the SaveGame variables of the actor's other components too | | Property | **Save Id** | The id an actor spawned in play is saved under, made on its first BeginPlay. Placed actors don't use it | | Property | **What Gets Saved** | What a save takes from this actor. Read only, it follows the actor and its components as you edit them, and in the Blueprint editor it updates when the Blueprint compiles | | Pure | **Get Save Key** | The key this actor is saved under right now (empty for a player actor whose player is not known yet) | ## Savecraft Saveable Interface Optional events on the actor or its components, right before a save and right after a load. | | Name | What it does | |---|---|---| | Event to override | **On Savecraft Pre Save** | About to be written: put anything that lives elsewhere into SaveGame variables | | Event to override | **On Savecraft Loaded** | Its SaveGame variables are back. SavedWithVersion is the game's Save Version the file was written with: lower than now means an old save, the place to fix what changed | ## Save Game (Savecraft) Async node: saves, with Saved and Failed as pins. | | Name | What it does | |---|---|---| | Node | **Save Game Async** | Server only. Saves the world in the background; Saved fires once it is on disk | | Event | **Saved** | The file is whole on disk | | Event | **Failed** | It could not start or could not finish. Stats say what was done | ## Load Game (Savecraft) Async node: loads, with Progress every frame. | | Name | What it does | |---|---|---| | Node | **Load Game Async** | Server only. Loads the slot into the open world; Progress fires each frame while actors go back | | Event | **Progress** | Every frame while actors go back, 0 to 1 | | Event | **Loaded** | Every actor is back | ## Save Subsystem The world subsystem that saves and loads. Get Save Subsystem gives it from any Blueprint. | | Name | What it does | |---|---|---| | Node | **Save Game** | Server only. Writes the world to the slot in the background; On Save Finished says when it is on disk. False when it could not start (a client, or a save or load running) | | Node | **Save Game Blocking** | Server only. Same as Save Game, all of it before returning. For quitting, where there is no next frame | | Node | **Load Game** | Server only. Reads the slot in the background and puts the world back a little each frame (Load Budget Ms in the settings). Open the slot's map first: it loads into the world that is open. On Load Finished says when it is done | | Node | **Load Game Blocking** | Server only. Same as Load Game, all of it before returning | | Node | **Set Next Save Thumbnail** | The next save's slot picture, read from a render target now (a Scene Capture 2D's, or any drawn one). Dedicated servers render nothing: call it on a listen server or in single player | | Pure | **Is Busy** | A save or load is running | | Pure | **Get Load Progress** | 0 to 1 while a load puts the world back, for a loading screen | | Pure | **Get Last Stats** | What the last save or load cost | | Pure | **Get Play Time Seconds** | Time played in this game: what the loaded save had plus this session | | Pure | **Get Player Id** | The id a player is saved under. "LocalHost" for the listen server's own player (LocalHost2 and up for split screen), else the online id, or the name when the settings say so. Empty while the player is still logging in | | Pure | **Get Remembered Actor Count** | Level actors that are not loaded now (or were destroyed for good) and that the next save writes from memory | | Pure | **Get Loaded Save Version** | The Save Version the last loaded save was written with. 0 before any load | | Pure | **Get Known Player Ids** | Every player the next save will write: the ones the loaded save knew, the ones who left, the ones online | | Node | **Forget Player** | Server only. Drops what the save holds for this player id, for a character reset or a wipe. A player online keeps what they have now until they leave, but none of it is saved; they start fresh when they come back | | Node | **Set Autosave Interval** | Server only. Changes the autosave interval now, for an options menu. 0 turns it off | | Event | **On Save Finished** | After every save, once the file is on disk or the save failed | | Event | **On Load Finished** | After every load, once every actor is back or the load failed | | Event | **On Load Progress** | Every frame while a load puts actors back, 0 to 1 | ## Slots and helpers Static nodes: slots on disk, pictures, settings. | | Name | What it does | |---|---|---| | Node | **Get All Slots** | Every slot that can be read, newest first | | Node | **Get Slot Info** | False when there is no slot by that name, or none of its files can be read | | Pure | **Does Slot Exist** | The slot is on disk and reads whole (its backup counts) | | Node | **Load Slot Thumbnail** | The slot's picture as a texture for a load menu, or null when it has none | | Node | **Delete Slot** | Removes the slot with its backup | | Pure | **Get Savecraft Settings** | Project Settings > Savecraft, readable and changeable at runtime (not written back to the ini). Save Folder per profile, for example: set it before reading slots or saving | | Pure | **Get Save Subsystem** | The save subsystem of the world this object is in | ## Open Slot Opens the slot's map and loads it there. Lives on the game instance, so it survives the map change. | | Name | What it does | |---|---|---| | Node | **Open Slot** | From a main menu or any map: opens the map the slot was saved on and loads the slot there. Options go on the map URL ("listen" to host). False when the slot can't be read | ## Cloud Slots in the player's online cloud: EOS Player Data Storage or Steam Cloud. | | Name | What it does | |---|---|---| | Node | **Sync With Cloud** | Both ways: downloads every slot the cloud has newer, then uploads every slot this machine has newer. Call it after the player signs in, before showing the slot list | | Node | **Upload Slot** | Uploads one slot as it is on disk. Upload After Save in Project Settings calls this after every save | | Node | **Delete Slot Everywhere** | Deletes the slot on disk now and in the cloud next. Without the cloud part a sync would bring it back | | Pure | **Is Cloud Busy** | A job is running or waiting | | Event | **On Cloud Finished** | After every job | ## Sync With Cloud (Savecraft) Async node: syncs both ways, with Synced and Failed as pins. | | Name | What it does | |---|---|---| | Node | **Sync With Cloud Async** | Downloads the slots the cloud has newer, uploads the ones this machine has newer | | Event | **Synced** | Both sides hold the newest copy of every slot | | Event | **Failed** | Not signed in, no cloud, or a transfer failed. Result.Error says which | ## Project Settings > Plugins > Savecraft Every setting. Get Savecraft Settings reads and changes them at runtime too. | | Name | What it does | |---|---|---| | Setting | **Save Version** | Raise it when a change needs old saves fixed. A save written with a lower one calls On Savecraft Loaded with its old number, and C++ gets the whole save first in On Migrate Save | | Setting | **Save Folder** | Folder for the slot files, inside Saved/SaveGames. Steam Auto-Cloud can sync this folder with no code | | Setting | **Compress** | Oodle on the save data. Files come out several times smaller and the work is off the game thread | | Setting | **Keep Backup** | Keep the previous file as .bak on every save. Loading falls back to it when the main file is damaged | | Setting | **Renamed Level Actors** | Level actors renamed since older saves were made: old name, new name. A load gives the new actor the old one's record. In a streamed sublevel the name goes with the sublevel: Sublevel.OldName | | Setting | **Save Budget Ms** | 0: a save reads every actor in one frame, an exact picture of the world. Above 0: it reads them over several frames, this long each, so a huge world doesn't hitch. Actors can change between frames then: an item moved from one chest to another mid-save can land in both or neither. Pause trading while saving, or keep this at 0 | | Setting | **Load Budget Ms** | On load, how long each frame may spend putting actors back. The rest waits for the next frame | | Setting | **Autosave Interval Seconds** | Autosave every this many seconds on the server. 0: off | | Setting | **Autosave Slot** | The slot autosaves write to | | Setting | **Autosave When Player Leaves** | Autosave whenever a player leaves, so their things are on disk even if the server goes down next | | Setting | **Player Id Source** | What finds a player again when they come back | | Setting | **Upload After Save** | After every save on a machine with a signed-in local player, upload the slot to that player's cloud. A dedicated server has no such player and skips it | | Setting | **Cloud Subsystem** | The online subsystem whose cloud holds the slots. Empty: the game's default one. EOS: Epic's Player Data Storage even when Steam is the default | ## Slot Info What Get All Slots and Get Slot Info give for each slot. | | Name | What it does | |---|---|---| | Field | **Slot Name** | The name it was saved under | | Field | **Map Name** | The map it was saved on, as a package path (/Game/Maps/MyMap), without the PIE prefix | | Field | **Save Time** | When it was saved, in UTC | | Field | **Play Time Seconds** | Time played in this game, all sessions summed | | Field | **Save Version** | The game's Save Version when it was written (Project Settings > Savecraft) | | Field | **User Text** | Whatever text the game passed to Save Game: a name, a chapter, a difficulty | | Field | **Has Thumbnail** | A picture was saved with it (Load Slot Thumbnail reads it) | | Field | **Recovered** | Read from the backup or the unfinished copy, the main file was damaged or missing | ## Stats What the last save or load cost. On the Saved, Loaded and Failed pins. | | Name | What it does | |---|---|---| | Field | **Game Thread Ms** | Time the game thread was held: gathering the actors on save, applying them on load (summed over the frames) | | Field | **Total Ms** | From the call to the finished event, the background work included | | Field | **File Bytes** | The slot file on disk | | Field | **Raw Bytes** | Before compression | | Field | **Actor Count** | World and player actors written or put back | | Field | **Player Count** | Players in the save, online or not | | Field | **Frames** | Frames the game thread work was spread over (1 for a blocking call, or a save with Save Budget Ms at 0) | | Field | **Longest Frame Ms** | The most any single one of those frames was held | ## Cloud Result What a cloud job did. | | Name | What it does | |---|---|---| | Field | **Job** | Sync, Upload or Delete | | Field | **Slot Name** | The slot an upload or delete was for. Empty for a sync | | Field | **Downloaded** | Slots the cloud had newer (or this machine didn't have), now on disk | | Field | **Uploaded** | Slots this machine had newer (or the cloud didn't have), now in the cloud | | Field | **Deleted** | Slots removed from the cloud | | Field | **Error** | Why it failed. Empty when it worked |