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:
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.
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.
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.
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.