“Save World” saves ‘everything’. Even object pointers.
BUT, to actually load back what you have saved, you need to provide a unique ‘SGUID’ property for the save system to know that this is the object it has stored in the save file.
There are several different scopes as well:
There are nodes to save the group of classes that compose the “Game Mode” (including the player’s pawn).
There are nodes to save individual actors.
There is a node to save everything inside the Game Instance, etc.
So, basically what your instances of objects need to have are two things:
Properties marked with the ‘Save Game’ tag.
The actor instance itself must have a Guid property called all-caps ‘SGUID’ which is the Id of the object used to store its records within the save file.
I read that about the actor that I spawn in but you said in the docs you do not use the SGUID.
“So, for a main character, I simply will NOT use the SGUID making nodes in constructor”
OK, so in order to save it just saves it all.
In order to load it back I have to tell each var and component to ‘save game’ and in the ones i want to spawn back I need ‘DESTROYED’ and (like a dropped rifle) I have to do the SGUID in constructor like the docs say?
So items that do not spawn back in the game just need ‘DESTROYED?’ bool and I’m good.
Yes. Just remember that if you save again after auto destroyed pickups are deleted, then their records containing ‘destroyed’ mark will be erased because the actors don’t exist anymore so the next time you save that is also removed.
What you do to avoid losing those destroyed states: you always “read the slot from file” before you proceed with saving the state of the current level (world).
Not defining a Guid value in my main character means that the main pawn is Guid (0000-0000-0000-0000), but it’s still there.
OK, not sure I understand why I would read my save first.
And I am guessing if the bool default is false then I do not need to worry about setting it.
Any way, thanks for the info, I will email you from a username ‘Notso’ with my invoice number once i get it.
Feel better having you respond (this is a lot for me so wanted to make sure I get support…)
I have 2 save systems running already, but I don’t think this will be an issue as long as they are chained in the right way. My player and inventory and game settings are 1, my mission system is second one then the rest of the world(which is what I need yours for).
I might try to figure out how to save the player and inventory etc with yours as well so it would be just your save and the mission system.
(I just bought it but I do not see an email, a link to your web page with a contact page to fill out)
Yeah, sorry. There used to be a ‘Email…’ hotlink button from the installed Plugins panel.
I guess it was removed and now you must click the link to website of the plugin provider or the ‘Documentation’ buttom.
I am planning to build a demo project based on new 5.6 template + mutable plugin, but I am in crunch mode still. I believe my schedule will calm down by the end of this year because games are supposed to ship this year!
Hello, when i call load level from my savior slot my enemies are properly loaded again but their behavior tree doesn’t restart, they simply resume their current task, I’m not sure if there is a way to make the ai controller attached to them completely reset when the enemies are loaded.
Thanks, and props for the great support of the plugin !
Hello Bruno. This plugin looks excellent and seems to solve nearly all of my problems. Only concern I have is related to World Partition support. How is that coming along? Is it already available? Do you have any recommendations if I am using it? My project is currently set in a single massive streaming level using WP, could probably switch back to typical level streaming, but critically I am using the experimental FastGeometry plugin to optimize static geometry representation at runtime and find it is working exceptionally well. So WP is a feature I would really want to not give up. If you have any updates or advice I would be happy to hear. Thanks for your hard work.
For the most part, the World Partition internals are private code.
There are no exposed API.
What we have support for is the visibility of partition runtime data layers and proxy actors.
The plugin remembers which data layers are loaded and visible and which ones are not.
If you setup data layers on your world, when the game is loaded, previously invisible layers will be set invisible, and the state of visible ones will be restored to visible again (and all the actors that are owned by that layer as well).
Thank you for the quick reply. You suggest, then, that I use data layers for any actors participating in save/load behavior? What is the behavior if I:
Start the game in a loaded data layer
Modify actors (with save game properties) in that data layer
Unload that data layer and load a different layer, before saving the game
Save the game
My intuition suggests that the modified actors will not be saved because their associated data layer is unloaded (maybe I should experiment first). In any case, I am sure I can figure out a workaround, and appreciate your taking the time to respond to me. Cheers.
You can keep a perpetual runtime instance of a savior slot in the game instead where every actor “saves itself to”, without having to write the savior data into a file every time they change a property.
Once you decide to save it, you can just call “write slot to file “. The actors from these layers would always reload themselves from the slot at their BeginPlay event.
Then the usual “Save/Load World” nodes to manage the state of the world + layers from another slot.
Hi!. Iam looking for solution how to save Widget with progress bar - that is inside Character/Pawn class as component. Bar get values from Actor Component (calculation of health variables current/max and float output to == healthbar representation in the world. i use that for spawning widgets on the enemies heads in the level so can navigate of their lives . Tried to handling all variables and make sguid for components in construction script. Still out of effects to store that info - All the best!
Thank You Bruno! -Spent a little time to get things done. Finally had to implement Savior into my c++ component that store HP Variable inside class - i wasnt able to catch that info from promoted BP with save flag in character class.
Now on Saved Event HP is stored
And loaded from the point of being stored so Pain Volume continue to hit characters on the Level.
All the best!
little update. Ive looked what is minimum required to have saved data (Transform of character on the level and Variable) found that:
with Save Game World.
Code were reduced only to saving variable in component!
Intefaces,guids,included headers were unnecessary even for character in my case!
i have only that code:
UPROPERTY(SaveGame)
float VHP = 100.f;
Iam Amazed Just WOW!
EDIT: Component must be added with BP procedure
CPP attachment doesnt work with that “Variable” only method. Maybe its to fast called or something i cant figure out.