Soulslike Framework Docs
  • Welcome to Soulslike Framework!
  • Framework Overview
    • About the Framework
    • Features & Systems
    • Before Purchasing
    • Personal Assistance
  • Getting Started
    • Setting up Animations
      • Setup Locomotion Blendspaces
      • Setup Custom Montages
    • Using the Utility Tools
      • Easy Setup Tool
      • Asset Creators
      • Asset Browsers
    • Actor Tags
    • Finding References
  • Workflow
    • Using a Custom Character
    • Creating & Editing Actions
    • Creating & Editing Stats/Attributes
    • Creating & Editing Status Effects
    • Creating & Editing Buffs
    • Creating & Editing Items
      • Creating & Editing Weapons
    • Creating an Enemy
    • Creating Cinematics
  • Animation Notifies
    • Damaging & Combo's
      • Register Attack Notify
      • Weapon Trace Notify
        • AI Weapon Trace Notify
      • Fist Trace Notify
        • AI Fist Trace Notify
      • Area of Effect Damage Notify
      • Spawn Projectile Notify
        • AI Spawn Projectile Notify
    • Defensive
      • Try Guard Notify
      • Hyper Armor Notify
      • Invincibility Frame Notify
    • Feedback
      • Weapon Trail Notify
        • AI Weapon Trail Notify
      • Camera Shake Notify
        • World Camera Shake Notify
      • Launch Field Notify
      • Chaos Field Notify
      • Footstep Notify
    • Miscellaneous
      • Input Buffer Notify
      • Interrupt Montage Notify
      • Camera Sequence Notify
      • Set Movement Mode Notify
      • AI State Notify
      • AI Rotate Towards Target Notify
      • Adjust Stat Notify
  • Components / Managers
    • Player Specific Components
      • Input Buffer
      • Action Manager
      • Combat Manager
      • Interaction Manager
      • Inventory Manager
      • Equipment Manager
      • Ladder Manager
      • Progress Manager
      • Save/Load Manager
      • Radar & Radar Element Components
      • Central Debug Component
    • Shared Components
      • Stat/Attribute Manager
      • Status Effect Manager
      • Weapon Collision Manager
      • Buff Manager
      • Loot Drop Manager
    • AI-Only Components
      • AI Interaction Manager
      • AI Behavior Manager
      • AI Combat Manager
      • AI Boss Manager
  • Extending Functionality
    • Using Motion Warping
    • Custom Saving/Loading
    • Adding New Settings
    • Extending Weapon Animsets
    • Weapon Specific Impact Sounds
    • Resetting Enemies After Resting
Powered by GitBook
On this page
  • Functionality
  • How It Works
  • Saving Components
  • Loading Components
  • Saving World Actors (Interactables & NPC's)
  • Loading World Actors (Pickup Items, Interactables, NPC's)

Was this helpful?

  1. Components / Managers
  2. Player Specific Components

Save/Load Manager

PreviousProgress ManagerNextRadar & Radar Element Components

Last updated 3 months ago

Was this helpful?

The Save/Load Manager(AC_SaveLoadManager) is a highly versatile component designed to manage all saving and loading operations. It tracks saved data, interacts with the selected save slot stored in the Game Instance, and uses FInstancedStructs to handle diverse data types. This ensures modularity and flexibility, allowing any type of game data to be saved or loaded seamlessly.

It is added to the PlayerController class by default (PC_SoulslikeFramework).

Functionality

  • Works with the Game Instance to determine which save slot to handle.

  • Utilizes FInstancedStruct to save and load any type of data (e.g., stats, inventory, equipment, world state).

    • Converts data into serialized structures for storage and retrieval.

  • Dynamic Save/Load Functionality:

    • Saves game data dynamically based on the active save slot.

  • Event-Driven Updates:

    • Dispatches events to notify other components or systems when data is loaded.

How It Works

Main method - Event UpdateSaveData: Utilized to add/update our save data. Any type of data can be stored/retrieved in the save file thanks to Instanced Structures:

Additionally, helper method - Event AddToSaveData: Used to add new data to an existing data entry:

Saving Components

Each component has a method of "serializing" their data into a savable structure format:

This method adds the related save data to the main data we have in our save/load component. Each component that has data that needs to be saved implements a similar method.

Additionally, AC_SaveLoadManager has methods for serializing all of the components.

When the save data inside AC_SaveLoadManager is updated, data will be saved into file.

Loading Components

The save/load manager sends a message which each component that requires loading listens to:

When this dispatcher is called, each component that is listening to it will execute a relevant method:

Saving World Actors (Interactables & NPC's)

Actors that need to be saved require a unique identifier. For this, we utilize GUID's in Soulslike Framework. Actors without a valid GUID won't be considered for saving:

For example, when this container actor (B_Container) is interacted with, it calls a method to update our save data:

After our save data has changed/updated, it gets serialized and saved automatically into a file.

Loading World Actors (Pickup Items, Interactables, NPC's)

Similarly, actors that require loading bind to AC_SaveLoadManager's OnDataLoaded() delegate. This way, when data is loaded, we can execute any desired logic.

These events are triggered from various blueprints. If you'd like to see where, see our page related to .

Finding References
Example from AC_EquipmentManager
Example from AC_InventoryManager
Method screenshot from B_Interactable
Load event from B_Interactable