[PLUGIN] Savior

Well, let’s say I’m going to keep the maximum possible length of the array for Windows x64 as AnswerHub says is 2,147,483,647 (signed int32). Will the plugin do it?
I need to save the Map for the Actor as Enum: Int. Is this possible?

Yes

Windows x64 platform. Will the plugin save the full data array with length of 2,147,483,647 ?

You won’t have problems save 2GB files on windows.
Can only have problems if user’s hardware is doing heavy IO tasks while you save, like windows indexing directories .

Hey Bruno,
I have stumbled upon saving Actors that can have dynamic StaticMeshComponents added with multiple levels of hierarchy at runtime.

I’m trying to implement save/load such Actor but it’s easier said than done.
I save components’ names and soft-object references to the parent component. But the problem is that creating components at runtime can make random names and I must change the name after the components are created and have it reference its parent component.

Well, I got it to work but it’s more like a hack. The correct way is to use GUID and I just ran into your Asset that makes use of GUID.

Does your asset support saving/loading Actors with dynamic components?
Please let me know, I would like to give it a try.

Thanks.

ps. I saw another Asset that uses GUID, ie. Rama Save System. If you don’t mind and if you used it before, can you please tell me what the differences are? I would like to try them both but it’s not cheap to buy them both, knowing that I’m going to use just one. Yeah, I’m giving your asset the first shot as I got helps from you before. ^^

I use my own plug-in since 2014 so I have no idea how Rama’s system work.


To respawn dynamic components from save files you’d have to add the “Procedural” interface to the class and use the “Load Game World” node.

However, I want to add a dedicated function to respawn Components from the “Load Actor Hierarchy” node to make the setup less laborious, but I just didn’t have the time to do it since I am involved with contract matters.

Hi @BrUnO_XaVIeR ,

is there a way to call the Load Game World function (or the others) with custom option strings for the level to load?
E.g. starting a listen server via “?listen”
If not, could you let me know where I’d need to change that, please.

Thanks alot!

You would have to change the “Save Location” string that is used to open levels or modify the source where OpenLevel is called.

I submitted v3.7 for review where checks to SGUID have been relaxed a bit (no “!Guid” tagging checks in found records).

Since that’s what majority of developers expect, the plugin will try to load the record anyway if a record exists, but a SGUID isn’t present in the class…

That means however if you spawn several copies of the same class, well, you have to setup a SGUID property for that class, or the plugin might think that all of them are the same and may teleport all of them to the same world position found in the record without a SGUID.

1 Like

Hi Bruno,
I am new to your plugin and I am trying to figure out how things work. I have the following issues:

  1. What should I use to save/load my game? What is the difference between Save game instance and Save game world for example?
  2. I managed to create and save an actor that spawns on runtime via SGUID. I want to do the same for an object, but it does not work. I have an empty object that inherits from the AutoInstanced class you provide. I save and load without stoping the game from running- no issues- But when I save, stop the game, restart and load, the object doesnt load. I do not know how to proceed here.

The only node that tries to respawn destroyed objects is the “Load Game World” variations.
Because any other nodes requires a reference to the object, you cannot use them to an object that doesn’t exist anymore…

So the “Load Game World” tries to recreate destroyed objects, before loading…
You can simply create an instance yourself before loading data for the object.

How would I go about automatically re-instanciating them? My quests are objects, I want to not lose them or their current progress while playing.
I wanted to automatically instanciate the quest objects via loading. Is this a wrong approach?
Is there something else I should try instead?

Mark the property as “Instanced” and make the Object class “DefaultToInstanced / EditInlineNew”.

You might need c++ for that.
Don’t know if you can build instanced objects from blueprint code.

Thank you for information!

I asked a question in the marketplace about the world composition.
It seems that I have not formulated the problem accurately enough.

Will changes be automatically saved to the level before it is unloaded?
And will I be able to save the same level in several states for the chapter system?

If you use something like “Save Level” node before you unload the Level then yes.
And yes, you can save things to any slot.

1 Like

Hi, Bruno,
I followed your direction to add the Interface, SaveGameWorld, and try to LoadGameWorld.

There were no errors but it didn’t load the dynamically added components. It seems like it just loaded the level back to the initial state.

Do I need to implement the Interface and recreate the components myself?
I tried to trace the source code but it’s hard to tell what gets saved.

Yeah, sure. having the direct support in the SaveActorHierarchy would be good as I need to load (just) the actor from a different level later on.

Thanks.

If you recreate them manually, it’s more predictable. You then just have to call LoadActorHierarchy() on the actor.

But if you want Load Game World to respawn the components for you instead, did you read about the SGUID property?
The plugin needs the instances to own a FGuid property called “SGUID” to tell if an instance was already respawned or not:

Understanding SGUID · Wiki

@ChrisK take a look at this chain of posts…

You should as well keep an Array (marked ‘SaveGame’) that stores references to the Components if you want them to auto-respawn, if not wanted to respawn them manually.

That’s because the Unreal Reflection System requires a reference to the object stored somewhere:

Yeah, I did have SGUID and initialized according to the doc and it didn’t work.
Perhaps I need to make the dynamically create component marked “SaveGame” I didn’t do that yet.
I’ll give it a try and let you know.

In the meantime, I’m going to need to save/load a single actor later on and I’m experimenting Save/LoadActorHierarchy. But the problem is that it does not trigger Interface callback events, like On*
Hm…