[PLUGIN] Savior

If will not find any actor with that Guid if you never applied the guid to the actor you spawned.

  • Find Actor with Guid.
  • If found -> Skip spawning -> Load actor data from Slot.
  • Nothing found? -> Spawn Actor -> Apply target Guid value to spawned Actor’s SGUID property -> Load actor data from Slot.

I’m currently generating the SGUID in the Construction graph using the generate once, and on spawn adding it to an array on the player. so I should be able to For Each loop that and Load Actor Data From Slot right?

really wish this load world thing worked for me

It seems like when I call load world, it calls begin play again. I’m wondering if I should even be using begin play for loading the world.

No, that is wrong. “Create Once” doesn’t work for that.
You have to create either a guid value you define yourself that doesn’t change or use Guid maker node in “Resolved Name to GUID” mode.
The generated Guid value will always be the same unless you change the name of the actor:

thats good to know…Thank you for the 20th time haha, is there any documentation somewhere that I am missing so I can avoid asking dumb questions? lol.

Questions are good. Always ask questions :slight_smile:

This node is recent, it wasn’t in the plugin since some weeks ago, so nothing in the original post talk about them.
I have to regenerate the git.io page to include them there, but I’m always in a hurry and end up not doing it.

Yeah, my issue is I’m trying to restore an old project that I spent a lot of time on and upgrade it in to something new, and I can’t remember where half of anything is so I’m relearning my application at the same time as trying to implement the save & load so that future development continues to stay on track with it. Load world works, but if I call load world on event begin play it calls load world again and breaks half of my stuff for whatever reason.

So right now I just have it attached to my K Key. but I need to figure out “Why” and I can only assume because it’s overriding something it shouldn’t.

So the only “Appropriate” Method I can think of is to create lists of objects that need to be saved during runtime with their SGUID’s.

What does this mean? I understand there are transient properties, but. idk

I can’t know what cause that without a crash log file with a callstack in it.

You could have marked as “Save Game” some mesh property or something that shouldn’t be loaded outside main process.

Heres my log for my most recent crash.

I think its trying to save my voxel world. which… I dont want it to do

@Jdfskitz94

Both plugin and Unreal Engine warns you that you are doing something dangerous:

Whatever it is, in current stage of your development, these things probably shouldn’t be marked to be saved into save slots at all.

the last one is a container for spells, however its simply a class container… I’m unsure why its trying to create actor ID’s because thats something I changed to the soft class reference… I’ll have to look in to that.

So I’ve managed to remove Most of the errors. My question now, is there a log I can find somewhere that indicates why something is failing to load?

I want to say that it “Does” Exist because when I call Load world they do appear, however. when I call load world a load of other issues occur.

There’s only two main reasons something would fail to load data from slot:

  1. Object is invalid (not fully spawned before loading save, pending kill, destroyed)

  2. Guid is not the same that’s stored into save file.

You can turn on “Debug” and “Deep Logs” on slots from advanced drop-down list to watch logs from Output Panel and see what is going on there.

Trying not to pull what little hair left I have out.
okay. so I Created a Chest in the world as a template.

This chest has a Reference Name GUID marked as Saveable, and the Save Game Object references BP_Chest as a save-able actor.
on the MainCharacter Blueprint, I have a save call and a debug call.

in the debug call I decided to make it so when I press the key, it outputs every GUID being saved that is not the main character, and when I spawn a chest, it outputs the actor as part of its scope and presents its GUID Correctly.

The moment I call save world, or even save actors of class and write file, it removes the GUID from the save game object completely. I have to be missing something. if I can figure this out, I should be able to figure out every other object.

Every time you Play in Editor, your Game Mode blueprint will spawn your Main Character with a different Instance ID generated by the engine at runtime.

You can simply edit the SGUID manually on your Main Character blueprint and ditch the “Make SGUID” node from constructor…

Or you can change node mode to “Static Name to GUID” mode.

Verify that the SGuid value of your spawned MainCharacter blueprint is always the same every time you enter play mode.

Oh, and uncheck “Save Game” option from SGUID property if you never want it to be loaded from save file (in your case you don’t).

In the video; the make node I showed was for the BP_Chest, but I did have the SGUID set to Save Game on my main character. I’m not having issues with the main character. my issue is the chest/anything constructed in the world.

I showed 2 blueprints in that video.

BP_Chest and MainCharacter

Well, the same applies to Chest actor.
Every time you use “Spawn Actor” node, a new actor ID is coming out of that. It’s not the same instance.

Either change chest constructor to “Static Name to GUID” or manually give it a pre-defined Guid value that doesn’t change if you want that chest to represent an inventory data in slot.

Same results after setting the BP_Chest to Static and turning off the save game checkbox, the moment I hit Save World, the GUID Disappears from the list of actors. (Every Chest has a different inventory storage which would indicate to me that reference name would make more sense?) But the issue here is the moment I save it physically Removes the actor from the list of objects in the savior game slot.

In my head, this node is the issue. indicating I’m re-creating the slot

Okay, so you want to keep “dead records” in Slot when you save.

Try this:
“New Slot Instance” -> “Read Slot from File” , then proceed as usual.