Download

[PLUGIN] Savior 3

Hi Bruno!

I have some plain C++ structs in my Objects.
Does Savoir 2.0 allow putting custom information into saving stream? I.e. can I override save / load C++ methods to save / load my custom structs?
Do you provide also C++ headers to be included into project?

The whole source code is in there, H & CPP.
Any struct defined as USTRUCT() and marked SaveGame when declared as UPROPERTY() is supported; Inclusive Structs created as Blueprint Assets from Browser.

If you want to save raw CPP types, it’s a good idea to study the “Reflector.h” and “Reflector.cpp” files.
You can add custom serialization functions to it to save any kind of data you need.

Hi Bruno!

I noticed that **USavior2::StaticLoadObject(…) ** does not change value of ESaviorResult &Result argument in case when Actor / Component has not ‘Destroyed’ property.
Not sure if it’s a bug or feature, but I spent 3 hrs trying to find out why my code doesn’t work :slight_smile:



        ESaviorResult Result;
        USavior2::StaticLoadActor(this, Data, Result);
        if (Result == ESaviorResult::Failed) {...}


Now it works, that’s just FYI.

Hi Bruno,

i just saw your new savior plugin. One question. I bought at the very beginning from savior the first version. Is there a update-price. Or do i have to buy it completly new?

No, you just download new version.

Update for Unreal 4.20 released.

so I decided to take a look at this again after a long while see if I can get it working, plugin is installed on 4.19 , and 4.20 but I am not using 4.20 yet. I downloaded the demo project for 4.19 and I get that error again after extracting and trying to run. “the following modules are missing or built with a different engine version : UE4Editor-SAVIOR2_Demo.dll , " would you like to rebuild them now”. Which I tried but don’t work.--------------------Also , is Savior 2 working with structs? many of my pickups and things are in structs .

Install visual studio 2017;
Although Some Blueprint project can work fine without it, in the end it’s very unrealistic to work on Unreal Engine without Visual Studio.
If you already have it installed, right click the .uproject file from the demo project folder then “generate project files” before you try to open the project on Editor.

yea I updated from 2015 to 2017 Visual Studio. does all the nodes save everything , I mean between save game world, save game mode , save game instance ? are they all similar , obviously save game world would be all levels I figure. the other two save all things on all levels as well? will these all save AI that is killed? as I cannot mark them as savegame I don’t think.

All those questions are answered on guides and node tooltips posted above, you just need to read them.

I’ve submitted v2.2.5 to Marketplace…

This is an update focusing on an improved “shield” against user misuse causing crash when they try to save/auto-respawn UObject classes that shouldn’t be marked “SaveGame” tag.
Unreal Engine almost 3000 UObject base classes and understanding which of them can and cannot be serialized from disc might become tricky, but I will keep improving the plugin to make sure user isn’t auto respawning object references that shouldn’t be.

so just to be clear , your documentation that says ***How to Save & Load from any Slot Asset: ***All you have to do is right click any graph on any of your Blueprints and search from one of main nodes in “Savior 2” section. Then underneath it : From any UMG Widget you simply setup your “On Button Clicked” events to call one of these “Savior 2” functions.
It’s THAT simple, everything in scope marked ‘SaveGame’ tag will save or load: Are these two separate steps? I mean do I need a Savior node connected somewhere else in a BP , and also on the button clicked say save and load in a UMG widget as well? or can the nodes be just in a UMG widget?

Yes, it’s that simple.
Usually call the node from a class that won’t save neither load anything, i.e: this is why I mention UMG Widget.

Create a Slot Asset, call a Save/Load node.
(From a Widget or anywhere else)

Anything in Game World marked “Save Game” will serialize (save or load).

By the way, what does happen when you load a different world than the one you saved? E.g. you save a game world, go back to the editor and add or remove objects/actors/components/properties, run the game by PIE and then load your saved slot. How will your plugin behave in these 2*4=8 cases?

If the Slot = Different Map then Plugin will open the Map recorded into the Slot (maybe respawn Actors/Components from GUIDs) and only then load Actor Records from the Slot.
You can use “Save/Load Level” Nodes instead, which works with Streamed Levels, if the behaviour above isn’t what you’re looking for.

What I meant was actually, what if I have design, lets say, a village in editor, hit save but later decide to remove that village. will the savegame slot now load this village or not? Or in other words:

Does the plugin differentiate between objects created at runtime and objects created at editor-time? So that it for example doesnt create the village in the above example as runtime objects when loading after it has been removed from inside the editor.

Only runtime data marked “Save Game” checkbox are saved or loaded.
Editor things you create or delete, the save game system will never consider;
In case above, the village you saved in runtime then deleted in Editor, when Loading game from Slot that village would be simply be ignored, unless:

#1 Village asset still exists in packaged game.
#2 You explicitly give the village instance a SGUID for auto-respawn.

Thank you, that makes sense :slight_smile:

It’s important to plan and specify the base classes you want your project to support “auto-respawn” with an SGUID ID (if you want any);
Some people were misusing this sub-systems (they simply mark everything SaveGame blindly) and then see the Editor explode, crash…

Because of that misuse, last update I’ve added a “Instance Scope” Class filter to force users plan their Classes they want to respawn and make them understand that “-this plugin crash” isn’t the case.

There’s no explanation about Class scopes on guides above yet, but on Project Settings in “Savior 2 Settings” section panel Class Scope are well commented and intuitive to setup.

Thank you for tracking that!
I finally had time to trace breakpoints today…



Result = ESaviorResult::Success;



Should be the last statement in the end of ​​​​​​StaticLoadObject() function, but for whatever voodoo reason in version control that line was removed from the source and I didn’t notice that happening.
I’ve corrected that mistake and will submit update to Epic asap, thank you very much for telling me about my dumb mistake :slight_smile: