Skip to main content

Save System Integration

Preface

Goals

Demonstrate how to integrate Bolt with another save system.

Guide

Overview

All of Bolt's classes that can be saved implement IBLSaveable. They will handle saving/loading themselves; all you need to do is call these notify functions:

  1. PreGameplaySave
  2. PostGameplaySave
  3. PreGameplayLoad
  4. PostGameplayLoad

Whichever save system you're using, simply call these functions before/after saving/loading and Bolt's classes will integrate correctly. For example, it should look like this:

Blueprint Save Events

By 'Saving' or 'Loading', we mean serializing data to/from an archive with the flag SaveGame (for saving during gameplay). Bolt's classes expect this serialization process to save/load data for properties marked SaveGame.

If you're unsure whether your save system serializes data in this way, chances are it does. These save systems all work this way and will integrate easily with Bolt:

  • Easy Multi Save (EMS)
  • Rama Save System
  • Savior Auto-Save Plugin
note

We are not affiliated with any of these creators. This is not an exhaustive list; we only looked at the most popular save system plugins on the marketplace.

Which Objects Should Be Saved?

Bolt's inventories handle saving/loading the items they contain1. Thus, you will only need to save/load the inventory objects:

  • BLSimpleInventoryComponent
  • BLGridInventoryComponent
  • BLEquipmentComponent
  • BLWorldItem
  • BLCraftingComponent

  1. Saving/loading of stored items is recursive; E.g., with a BLSimpleInventoryComponent (A) storing a BLSocketInventoryItem (B) that stores a BLItemStack (C), you will only need to save/load A. A will handle saving/loading B and C.