While trying to make a spawner I found a Guid bug:
Add a Guid variable to a blueprint actor
mark it “Savegame”, public variable, and NOT name it SGUID,
then place multiple such actors into the game,
generate unique guids for each of them
save & load
BUG: All actors get the same Guid, all other variables marked savegame are the same too. It’s as if all of the objects “think” they’re the same object instance.
I expected Guid to behave as any other variable as long as it wasn’t named “SGUID”. I can’t make it behave like any other variable marked savegame, not even adding it to a struct works…
When you have multiple instances of same class in the level, now you *NEED *a ‘SGUID’ property due to changes Epic made to internal object IDs.
I began to ignore internal IDs in that case in particular;
Before the data ID was something like: “ErrorActor_123”…
Now it is this: “ErrorActor_”+SGUID.Value()
Because your instances have no Sguid property, the plugin thinks they are all just ONE instance: “ErrorActor”.
The code to read guids is correct, it’s just this little detail about multiple instances I forgot to mention in docs because this change to the engine is very recent, sorry.
If you try to read the save file and search for “Someguid” you will see that there’s only 1 actor record. And that’s because there’s no Sguid property available.
Hey Bruno, thanks for the tip about soft class references. It works like a charm.
Saving the game world is instant for me, but loading the game world takes a significant amount of time. I have several thousand actors I’d like saved/loaded, is this more then the plugin is expected to handle? Are the scope settings the primary method of managing performance for the plugin?
Also as an aside, I would like to show some kind of UMG loading bar widget while my async load is performed, but the entire game appears to be locked during the load, even UMG. Any idea how to enable the non-locking behavior you have in your example projects?
Configure your slots assets to create a background thread (async task won’t lock the game).
Also there’s a builtin loading screen system you can setup in your slot assets.
https://i.imgur.com/2ip34X1.png
They are not universal for every slot asset you have, you have to setup those options for each slot.
I am submitting for review v2.9.1; for Unreal 4.22+…
There’s no heavy changes, I just included helper functions to aid working with UObject blueprints that must be saved (not Actors or Components):
Also included a “Find Actor” that searches in level for an Actor with a specific ‘SGUID’ value:
My save slots use Runtime Mode: Background Task, and I’m using the [SAVIOR] Load Game World (Async) node to load them, and the load operation is causing the game to lock up, not sure what I’m doing wrong there
Use filters “Component Scope” and “Actor Scope” to save only the classes you need to be saved.
Somebody had same problem and the thing was they were actually saving over 2 million objects to the save file without need… when they just had to use “Save Game Mode” instead.
Not really, the plugin also have Save/Load Actor.
You can spawn instances manually then pick individual actors to use “Save Actor” and “Load Actor” instead of let the Load World function do a massive work for actors that you don’t need to save.
That new “Find Actor with GUID” will also be useful for that.
Hi Bruno. Sorry if this has been asked before, but is there a tutorial on how to get started with your plugin? I just got it, and I can save and load, but I’m not seeing a splash screen even though I configured it from the slot, and I’d like to make sure I’m not doing anything stupid by using “Save Game World” whenever I save, then when I load I use “Load Game World” then “Load Level”. Whenever I use Load Game World on its own nothing happens.
Once again, sorry I’m a total noob at this. It’s my first time tackling getting a save system to work.
Hi Bruno!
I’m trying to access some plugin functions like USavior2::CreateSGUID(this); and the interfaces in c++ by including your plugin header like this: #include “…/Plugins/Marketplace/Savior/Source/Savior2/Public/Savior2.h”
But I’m getting this error:
d:\programs\epic_games\ue_4.24\engine\plugins\marketplace\savior\source\savior2\public\SaviorTypes.h(15): fatal error C1083: Cannot open include file: ‘SaviorTypes.generated.h’: No such file or directory
in the output log, how do I fix it? I’ve tried reinstalling the plugin, and regenerating visual studio project files
This version I have introduced algorithms to save/load hierarchy chains of UObject pointers referenced by arrays of object references in *Outer *actors.
That means when you have actor instances with an array of object references (array marked as SaveGame), and the UObject default class is properly setup, the load system can restore object references when loading back the array or respawn the missing objects and reload their properties before restoring the references back into the array.
Previously the plugin would only go as far as restoring the references or respawning from CDO, with default class properties applied.
What this is useful for:
Loading back inventories based on UObject* ptrs (object references).
Restoring dialog trees created by *nodes *based on UObject classes.
Loading quest log tree states that are based on UObjects, etc.
!! WARNING !! :
This operation is expensive and is run on Game’s main thread, if you are not careful you can face screen freezes when using this.
I would personally avoid using this feature unless I have no choice.
You can download a test project from here to learn more on how to setup your classes to use this:
It only works for classes you whitelist in project settings on the “Instance Scope” list:
Feature request:
Add a callback / interface event that triggers when Mark Actor is called on an actor, to enable that actor to have custom code execute to make it “fake destroyed” until the save