[PLUGIN] Savior

Hi Bruno

I’m trying to use the Save Actors of Class (and Save Actor) node, but I can’t get them to work. I’m doing New Slot Instance → Save Actors of Class → Write Slot to File, but the save Actors of Class node fails

Two things worth noting:

  1. Save Actors of Class (and Save Actor) only fails on actors inheriting from the Character class from me (for testing this I made a new class inheriting from character, with only a single bool marked as SaveGame and an SGUID added for testing, along with the savior interface and setting the SGUID in the construction script of course). Any actor not inheriting from character gets saved just fine from my testing

  2. The Save Game World node saves the test character mentioned above just fine, and the Load Actors of Class node works perfectly as well after saving the test character with Save Game World

Any ideas what the issue might be?

Give me some time to test this on Sunday.

Unfortunately I am unable to reproduce the issue you describe.
I would avoid storing the instanced slot and using the slot reference that comes from the nodes output, that would help simplify things I guess…


That’s what I’m doing too, but this is the result I get

For the sake of clarity, I also get a success on the save actors of class node if I don’t put the test actor in the scene, since there’s nothing to save at that point, so nothing that can fail I guess. Given that you know how this system works better than anyone, I feel like a jerk for asking, but I assume that you put the test character of the class you’re saving in the level, or changed the player character, right?

I’m hoping that I’ve just set up something incorrectly - I just don’t know what that’d be. And like I said, the Save Game World node works perfectly, and so does LoadActorsOfClass, so I’m kinda at a loss here. I’ve also tried updating the engine to 5.2.1, making a new empty project, and redownloading savior. I’ve also tried on my coworker’s computer. But none of it helped

Are there any logs I should look at that might give any insight as to why this happens? Or any test you think I could do to figure out the issue I’m having? I could also send you this new empty project I made for this test, if that’d help?

Yes.

You can filter the output log panel by log categories.
I would filter it with Savior category and search for any signs of error/warning.

If you create a clean map and add only this class does the problem remains the same?

Yeah, the problem happens on a map with nothing in it except the character too

The log gives me this output when I enable Debug and Deep Logs on the save slot

Seems like it’s saying it saved the actor even though it failed?

Does 5.2 have issues with building? This is what i’m getting whenever i try and build from 5.1 to 5.2
Screenshot 2023-07-01 142325

You must download the 5.2 plugin from Unreal launcher. Unreal 5.2 is different API, the plugin for 5.1 will not work on 5.2.

I’m still investigating this.

Thanks for the update, Bruno. Let me know if there’s something I can do to help, like sending you a project affected by the issue or something

Yes, a Dropbox link with a sample would help.

I’ve just now sent an email to the contact info you have on the plugin’s documentation with the link to the test project

I got the email with Dropbox link.
I will download it and try it soon.

So the problem is that actually a second thread is trying to save the animation blueprint data from the character and, since that class never implements the interface to save anything from the ANimBP, far down the road that thread overrides the result value as Failed operation although the actor itself always saves successfully.

I patched this little mistake and will send an update soon for UE5.2.
( my test projects always implement the AnimBP interface so I never seen this )

The AnimBP, huh? Yeah, that certainly explains why I only saw the issue with characters. Thanks for the update, Bruno!

Hi, the plugin has been working great for single levels, but I have some troubles with saving streamed in level of an open world.

This is what I am trying to achieve: An open world which has dark-souls like bonfire to save the game. There is one persistent level and each sublevel is streamed in through a streaming volume.

However, I am seeing an error in static void DeserializeActor(const FSaviorRecord Record, AActor* Actor) when loading my save game, because the World is NULL. I assume this has to do with the sublevel not being streamed in yet. Can you suggest some best practices to use Savior3 for streamed in open worlds like mine? I am using C++ and currently use Savior’s SaveGameWorld function.

In your case I would work with the Save/Load Level functions instead.
Maybe even making the streamed level manage its save data by itself as well.

Hi Bruno! I bought your plugin some years ago and used it for a personal project, and now we’ve got it for the project at work. Sorry about the formatting, I haven’t posted much since they changed the forum layout.

I’m not able to get any of the saving or loading to work on my project. I’m trying to do (currently testing this in Play in Editor):

  1. Kill an actor
  2. Spawn in actors in run time

Here’s how I’m saving things:

For the object that gets killed, I mark it destroyed and when I save it savior handles destruction as expected. However, when I load the same slot the object is still there.

When I spawn in actors in run time, save, then load they aren’t there.

I think this is because I ticked “Reset Level On Load” when Loading Game. When I untick this, the map looks exactly how it should look when loaded.

For my runtime actor spawning, here’s how I’m doing it. The Hit Vectors array is marked as “SaveGame”.


The actors I’m spawning here, BP_Procedural, have SGUIDs generated on constructor.

It doesn’t look like any state is being saved because when I quit the game in editor and load it after playing in editor the loaded slot doesn’t load anything that was saved. Furthermore, I’ve noticed that only the “On Prepare to Load” and “On Prepare to Save” interface events get fired.

I’m not sure what I’m doing wrong here, I spent the day reading through this forum post, the documentation pages and the example project.

Thanks a lot for your help!

You can’t save state of actors that have been destroyed. They aren’t there anymore when the new data is written.

This is why they ni longer self-destroy anymore after records from them are erased by second save.

You can do a load old slot data from file, before saving, to avoid loss of records like that.

I am experiencing a problem where all but one instance of an actor Blueprint in the world disappear.

I have in my world:
BP_Gate
BP_Gate2
BP_Gate3

In the constructor I tried creating SGUID in two ways, but with both ways I see the problem.

void AMyActorBase::CreateActorSGUID() {
	SGUID = USavior::CreateSGUID(this);
	// SGUID = USavior::MakeActorGUID(this, EGuidGeneratorMode::ResolvedNameToGUID);
}

Everytime I save and load, only one of the BP_Gate is visible in the game, eventhough they all still show up in the World Outliner list of the editor. Are they invisible for some reason?

If I duplicate the Blueprint BP_Gate to create a new Blueprint and place that in the world it works fine and I save and load them both, but I want to avoid creating a different Blueprint for each instance of my gate.

Interestingly, I have another class which just like the gate inherits from AMyActorBase for which I do not experience this problem. I can basically drop as many instances of that Blueprint into my world as I want and they all save and load.