[PLUGIN] Savior

Great to know!
Depending on some way you use the Async node, it will “lock” the save delegates until you restart the editor.
I wasn’t expecting users to use the Async nodes the way some are using, this is why I recommend everyone to use the normal save/load nodes instead.

I don’t like it as much as you do, but some studio practically demanded it to be there.
Some machines are considerably slow and some games have very large levels; they can’t afford to load an entire save file just to show a slot name on the game UI before loading the level for real… So I basically cannot remove the meta files from the system.

Now that I have this understanding of saving/loading, I will make that practice. On the meta data, I get you. For this certain game, meta data is just extra space filled in the folder. In a game I am expected to be starting soon might need just that. Just thought toggling it was a better option. Thanks again

Ive been trying to test Minimal / Complex with a float array, however i dont see any difference in file size…

I have seen a 2000 x 2000 float save be 14 mb’s, however i cant manage to get it back to that size, it sticks on 80 mb now… any idea why?

[edit] i tried to save my heightmap using my own code using ZLib compression, and a 2000x2000 float array is indeed 14 MB. any idea what might happend in my project, is this the minimal/complex thing that might be broken???
Thanks!

Those settings are set per slot unfortunately.
If you are saving to different slot targets you need to configure the data set for each one of them.

ive actually set the slot on minimal, but its still producing the 80 mb’s instead of 14…

I ran a batch of tests and I’m unable to reproduce your results.
I’ve also checked the code a few times and I’m unable to find anything irregular, related to that issue, so far.

The compression method on Slots is a public enum.
Maybe you can try to set: MySavior2Slot->Compression = ERecordType::Minimal

Maybe doing that once you have an instance of an slot object could help.
At the moment I suspect you might have a “Compression” variable resetting to default Complex enum value once you create a new instance of the slot.

[USER=“434”]BrUnO XaVIeR[/USER]

Do you happen to know if this anyone used this plugin successfully, as-is, on PS4/XboxOne/Switch ?

A few developers have it working on PS4 builds, but with modifications.
Someone told me they simply use the set of static functions from the “StaticSlot” object in C++…

But they didn’t tell me what modifications they’ve done. They can’t share it (because Sony NDA).

Im not sure what goes wrong… it just keep saving big files.

Would u be able to test a 2000 x 2000 float array and confirm its size?

How are you storing that array?
The plugin saves compressed json data. Structs in json format will always consume more space than a binary array.

Thanks for the anwser. I was indeed saving as binary array.

Anyhow, ive got another question. I am trying to save a actor that holds a FDateTime Struct. However the DateTime seems not to be saved?

I don’t remember for sure, but I think the parser don’t recognize that struck. In engine source they are not declared as USTRUCT.

Converting the DateTime to unix integer then saving that int and rebuilding it from the saved int should work.
In the SQLite plugin that’s what I do to save it, a string of int64 is stored then that string is converted to int64 on load and a FDateTime is created from that int64 as return type.

I’ve been trying to get the functionality from the demo project working in my own. I was very careful to bring everything over piece by piece rather than migrating everything en masse and pulling out/editing everything I didn’t want after the fact (I also wanted to get a closer look so I could understand how everything worked).

Unfortunately it is failing when I try to cast the existing HUD to the HUD that was subclassed from Savior. I checked my Project Settings and both you and I are using the generic HUD as our HUD class. I checked a bunch of other settings and everything seems to match up. I’ve obviously missed something though or it would work. :slight_smile:

Here’s where the cast fails. Any ideas what I might have overlooked?

I submitted to Marketplace v2.7 which the Slot spawns an instance attached to the game instance instead of attached to the caller context.
This should help fix cases where, due to game architecture, slot being used goes out of scope and its delegate events wouldn’t work anymore since its owner context would previously be marked pending kill…

@DrThunder I won’t comment because your issue is not plugin related, casting issues are your blueprints and your classes you miss something in them.

Hi Bruno

Does your system is work with level streaming as well? For example i have persistent level and bunch of levels as sub levels. Each sub level it’s level for gameplay checkpoint. Player passing a sub level and it’s marks that sub level is completed.

Yes, but it will not stream automatically levels that are unloaded when loading data from slots.

Hey Bruno, I think I must be missing something very obvious. I have a light switch in my level that you can toggle on and off.

I have set the “Light Switch” boolean to have the SaveGame flag checked

Here I have set up the save and load world in my Character blueprint.

And finally I have created the necessary slot to save into.

slot.PNG

My problem is that, while I’m able to successfully save and load the world to the slot, the variables that I have flagged as SaveGame don’t seem to be actually saving. For instance, if I turn the light off, save the game and then exit, when I reopen the game and load the world the variable still has it’s default setting and the light is still on.

I feel like I’m missing a crucial step, or I misunderstand something. Thanks in advance!

Turn on Debug logs on your Slot and see if your light Actor and the “Light Switch” variable are recorded when saving.

They should appear somewhere in the save logs when Save World is called. If they don’t then it’s a start to know what’s wrong…


Btw event “Begin Play” is not executed when the Slot loads game data. The plugin has a custom Blueprint Interface for you to use when load/save finished, instead of relying on BeginPlay.

Thanks for the quick reply. I’ll check that debug log when I get home from work today.

Ah I see. Do I need to access this custom Blueprint Interface in some specific way?

Okay so I checked the output log when I save the game. It looks like the actor is saving but not the variable. This is all I get currently.

output-log.PNG

Also you mentioned a custom Blueprint Interface that I should be using. How is this accessed?