LCVg's Serialized Saves Plugin

RELEASED!

This plugin provides you with a series of Blueprint nodes that allow you to serialize and save any number of actors and all the useful data you want to save for each one of them (any variable it contains, including references to other actors, will be preserved).
An interface will help you identify all your persistent actors, avoiding aditional and anoying steps. Forget about adding each variable to an array and recovering them in the same order! Everything is handled by the plugin!
Just implement the interface in your actors, mark your variables as “save game”, call the save nodes and you are good to go! All your actors and data in any number of maps will be saved in a single file with your player name!
Ideal for any kind of game that requires persistency!


This plugin contains:
A Blueprint function library that provides 7 Blueprint nodes to handle all the serialization, saving and loading process.
5 Simplified Nodes more for fast load and saves in one step. Let the system handle the hard part for you.
An Interface to identify the actors you want to save, as well to call the corresponding (optional) events on each one of them when saving and loading.

List of Features:

  • All doable in Blueprints, No c++ required.
  • Save and load all your player character data.
  • Save and load any number of persistent actors.
  • Save and load any number of persistent Objects [New 1.4r1]
  • Save dynamically spawned actors.
  • Classes, Transforms and Variables (references included) are saved.
  • Data saved to a single file with your player name.
  • Use the same file for any number of maps.
  • Expand functionality in Bluprints by using the interface events.
  • Full source included.

Use Case examples:

  • Save your character health, position, inventory, etc.
  • Save your quest/dialog progress without creating aditional save files.

Watch it working here:

Demo Download: Here
Example project: GitHub Link

Documentation: LCVgs Serialized Saves Wiki
Marketplace Link: Here

FAQ:

1. How much does it cost? The intended price for the plugin is U$D 14.99.
2. Is Multiplayer Supported? The plugin does work in multiplayer games. However, it is not actively supported and you will have to make your way around replicating the saved data. In other words: there is not a node for saving/loading multiplayer games, however it might be added if enough people show interest.
3. Does it work on “my platform”? It should work on any platform that uses Unreal’s Save Files, we’ve only tested it on Windows (x64 and x32) and HTC Vive.
**4. Are you going to update the plugin? ** Yes. We are using this plugin for our own projects and that means we are constantly correcting and adding new features to it. Requested features will be added if, as stated in point 2, enough people show interest in it/them.

Leave a comment, let me know what you think!

UPDATE 1.4 (SUBMITTED!)
NEW FEATURES:
. Automatic Saving and Loading of UObjects.
. Automatic Re referenciation of UObjects.
. Mac, IOs and TVOs support.
Read the full notes here

Ok. simple question. I want to store my character data in a savegame. As my character travel between maps I want to load his stats. I wish to also have a main menu “continue” button to go to map my character should be at right now and load the state of this map. Quick idea how this plugin could help?
The way I’m doing it now is having separate saves for multiple things. Like settings, key maps, graphic settings etc. A save for an array of saves: character, map state, social hub/village state etc. it’s a pain in the but.

The plugin will automatically save all the data for your character, which, at the moment is:

. Your character or pawn class (its currently saved, but not loaded, loading of the class is coming this week!).
. Your character Transform (location, rotation and scale).
. All the rest of your character variables (health, mana, bullets, or anything you can mark as a ‘save game’ variable, with the exception of blueprint structs -which cannot be serialized-).
. The last map your character was at (also coming on this weeks update).

The plugin automatically handles map variables, which means that all your persistent actors are saved to a single file but the plugin knows when to load them depending on the map you are at.

So, to sumarize:
. This plugin will handle all your data for your character and maps (and every actor they contain that you want to save), everything saved to a single file with your players name. You dont have to worry about anything but marking your variables as save game and implementing the PersistentActorInterface (only required for actors, not for your pawn or character). in the actor blueprints you want to be saved.
. A continue button can be implemented by loading the save corresponding to your players name and getting its last known map. Loading that map and after the loading call the Load LCSave game, that will handle loading everything for that map, including your character variables.
. Settings in general for your game are not handled by this plugin. Since the plugin saves based on character name it would be better for you to handle that separetly.

Hope this helps. If you have more doubts, suggestions or request dont hesitate on posting again!

PS: this week a documentation web will get online, with examples and tutorials. Have a nice day!

EDIT: I forgot to mantion that you can serialize from and to bytes your Widgets in case you are storing your settings data on them. You could easily save them as an array of bytes and then serialized them from bytes after you create them!

Hey, got it Today, its Awesome,Awesome Job . just a Question, theres an Problem

When i Load at a GameSlot, where my CHaracter Was, my CHaracter is in Nowhere, and the Map is not Loading, so… is there an workaround?

or Cant it be Atm Load the Correct Map my Charater was?
oh and when im Gonnna save it on my Large Map, and then Reload it, My character spawns in the Air…
Ahh got it, that was a Problem because i had some with the Same Name on the Map as my Character, seems to be an Bug.

But the Problem with the Map is an Problem, that Means it cant be Loaded the Map there was the Character last was or?

Greets

Hi KuroSekaie. Thanks a lot for your comment.

The Plugin does not load your map for you. You will have to open the map and then load your character data. This week a new function will be added, that will allow you to load the last map your player has been at (which will make it easier for you).

Can you provide an screenshot or short movie for your pawn spawning in the air? It is possible that the place your character was saved at is obsturcted for some reason, so its being repositioned.
The plugin will, for the time being, just move your pawn to the last save location and restore its variables. On the update coming this week you will be able to load your character if its class has been changed.

As you can see, a lot of new things and improvements are coming during this week. I really apreciate your support and your patience! I will send you a private message as soon as the update is live.
Right now the example project is meant to use a new version of the plugin and might not work correctly for previous versions of it.

Have a nice day! please dont hesitate on reposting if something was not clear or if you have suggestions or special requests! Thanks again!

Well Np! , the Problem with the Air, was i had Placed a other “Same” Hero Character on the Map, so its just was a Bug, works Fine now.

Ohh i wait for the Awesome Update!,

just a Small Question, i Want to Save my Total Inventory of my Hero Character, i saw, it Just Saves the Amount in the Inventory, but no, Pictures, Item Description etc,

any Idea?

And its already marked as Save Game, Stamina,Health Works Fine,but Inventory…doesnt Work Well

Greets

Hello again KuroSekaie!
Are the items in your inventory actors (weapons, or potions for instance)? If they are, you should implement the PersistentActorInterface in their respective blueprints (and their variables marked as save game), so they will be recreated and re assigned to your character’s inventory.
If your items are blueprint structs the system will not be able to save them since Blueprint Based Structures can’t be serialized by the engine.

Maybe you can share a screenshot of your character blueprint so i can see how you implemented your inventory so we find a work around your problem or, if needed, i can add special functionality to support item inventories to the plugin!

Best regards.

  • Leonardo

If your items are blueprint structs the system will not be able to save them since Blueprint Based Structures can’t be serialized by the engine… but my Inventory are BLueprint Structs… is this an Problem? is there A Way to Save it?, or was it a Mistake to Made an Inventory with Structs

Greets,and Thanks!

I would not call it a mistake, but sadly UE4 cannot serialize blueprint structs (it can however, serialize structs created in C++). Generally it is advised to create and inventory based on actors or objects, since they can be referenced and therefore are easier to manage. The ShooterDemo is a great example for this, where every weapon is an actor that is spawned before being added to the player inventory, that way you can give them to other players or drop them if the player/enemy gets killed :slight_smile:

Update 1.2 of the plugin submitted to epic!

This pack looks great, it’s very organised! However I do have a question. As someone who only knows the basic of blueprints, are you planning on doing any tutorials on how one would set up a save/load system in a new project?

Hello Auriam! Yes! I’ll start uploading tutorials during monday afternoon to the project wiki! Every couple of days a new tutorial will be up. The tutorials you can look forward during next week are:

. Quick Start: Setting up a simple test project.
. Setting up a continue button for your project.
. Serializing and saving individual objects.

If you would like to see other tutorials on a specific topic please let me know! Aswell as request for new nodes and features!

I want to also let you all guys know a new update is in the works and it will include some really useful nodes:
. A new “Master Save” will keep a list of your saves so you can access information about your particular saves without having to load them:
- Name of the player.
- Name of the map the player was at.
- Last time played.
. A new function will let you get all the maps in a content folder. This will be really useful if you want to get a list of your maps for watever reason.
. A new function that will let you get a list of all the blueprints of a class in a determinated content folder. Very useful if you are working on an game that needs to gets a list of weapons or items for example, without having to add them one by one. Also very useful if you want to support mods for your game.

I seem to be having an issue. Currently I’m just starting with the basics of saving my character location, however it doesn’t seem to be working for me…

This is inside my player character blueprint, and the player controller variable references the main controller I am using.

af69c8938e174659855686d4f8896fec50ba0881.jpeg

Hello Auriam. It might be happening for a couple of reasons:

  1. The LCSaveGame object is Null. You need to eather manually create it or using the GetLCSaveGame.
  2. You have not set a player name in the save game object, which is needed in order to save the game.

Hope this helps.

I am testing your plugin and i have sometime a crash

[2017.06.15-12.57.43:360][514]LogWindows:Error: === Critical error: ===
[2017.06.15-12.57.43:360][514]LogWindows:Error:
[2017.06.15-12.57.43:360][514]LogWindows:Error: Fatal error!
[2017.06.15-12.57.43:360][514]LogWindows:Error:
[2017.06.15-12.57.43:360][514]LogWindows:Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000

and there is a bug (or am doing something wrong?) i put in my character an integer variable named GOLD with default value 0.

the GOLD variable has the “savegame” option checked.

i launch my game, i save it when i have 0 GOLD.

i collect one gold, my gold is now 1.

i load the game, and my gold amount is still 1 (and this is not correct, i saved it when i had 0 gold !)

edit: it work fine for the next scenario where i have now 1 gold or more, and i can pick gold, save and load without any bug. it bug with the 0 gold amount. look like it dont save or load the 0 - default value

Purchased this today, I have been trying to figure out how to install it to a source build from GIT. Can you explain how to do it? the version is 4.16.1.
thanks.

Hello! You have to install it to a launcher version of the engine first. The go to the plugin folder in your engine installation, there is a folder called marketplace there. Copy the contents of it to the same folder in your source engine version or to a plugins folder inside your projects folder.

I will add a detailed tutorial for this to the wiki tomorrow.

Hello. The crash seems to be the engine trying to read a value that does not exist from an array. Without context its impossible for me to solve it. Can you post the script is causing the crash for you?

Default values are not saved by the plugin. I tested a similar case to yours and its working fine. I have 0 gold, pick one up, save. Next time i load i have 1 gold. Seems to be working on my side.

the scenario that you tried work for me too.

but this scenario dont work: When u have 0 gold on the begining, you save (and your telling me it wont save because 0 is the default value?). then pick 1 gold and load, youre gold stay to 1 instead of 0 because the 0 value has never been saved it wont change the gold amount to 0. i am sorry but this not was i expected from a save&load plugin.

if its a bug we may try to fix it, but if it is intended to never save default value then i will ask for a refund because i need to be able to save & load properly my variables.

here is screenshots of my test:

i launch the game, i start with 0 gold, i save the game.

i pick up one coin (the sphere is a coin), the sphere is hidden on pickup and my gold amount increase to 1

i now load the game, and my gold amount should restore to 0 but it dont and my gold amount is still 1 instead of 0.

EDIT: This is indeed a bug. I have fixed it and a new version of the plugin will be sent to Epic today. It should be up and running at the marketplace between today and a couple of days depending on how bussy the guys at Epic are. Thank you a lot for pointing this problem out. Sadly there is not a possible workaround by the time being as it is a problem with an optimization on the way the plugin sets the player character. Thanks a lot for your patience.

EDIT 2: Update Submitted!