Data Save

DataSave plugin offers an easy and efficient way to save and load game data, perfect for indie game developers. By using Gameplay Tags and DataAssets, this plugin allows you to define and organize your save data with ease. The plugin provides straightforward Blueprint functions for saving and loading data, making it simple to manage game states, player settings, and other crucial information. DataSave plugin seamlessly integrates with other Indie GameKit plugins, providing a reliable solution for all your data management needs.

Setup

Add Gameplay Tags to identify save files. Each save file requires 1 Gameplay Tag. Use the IndieGameKit.DataSave.* space.

Gameplay Tags

Create a new save file. If you already have a save file, you can use it, just skip this step.

Pick SaveGame as parent

Create any number of variables to save.

Variable into SaveGame

Create a new Data Asset that will manage the connection between the save files and Gameplay Tags.

Data Asset

Pick DataSaveDataAsset as class for Data Asset instance.

Pick DataSaveDataAsset as class for Data Asset Instance
Data Asset Content

Go to Project Settings > Plugins > IGK Data Save and specify the previously created Data Asset

Data Save Settings

Usage

Data Save Subsystem

Get DataSaveSubsystem
DataSaveSubsystem API

Saving to any Blueprint

Save by Gameplay Tag
Save All

Retrieving a save file in any Blueprint

Select the custom node (third on the list)
Get SaveGame by Gameplay Tag

This custom node determines the type of the output pin at compile time.

Why use this method instead of directly using the subsystem?

This approach allows us to determine the output pin type during compilation, avoiding extra casting operations at runtime. It also simplifies the system’s usage, as you don’t need to worry about the exact save class when calling a function.

Access to information entered during the setup phase

Get DataSaveInfo by Gameplay Tag

Hint

During game development, it’s common to need to rename or delete variables within a save file. Additionally, rebalancing the game’s economy might require resetting all player progress and starting anew. To manage these situations, a Version variable within the DataAsset is used. By incrementing this variable, you ensure the creation of a new save file.

Advanced

To use a value that is only known at game runtime, you can either use a Blueprint Function Library or use a custom node with a connection. In this case, you’ll need to cast the variable to the correct type before using it.

Blueprint Library Function
Custom Node with Link

Last updated