[PLUGIN] Savior

I’ll try it and write it right now, but I think I’ve already tried it.

Another question arose. If, for example, an actor will have a unique SGUID, and its component is static. Will the plugin be able to load the data in this case? Theoretically, if there is one component and only one, then the unique identifier of the actor is enough

I tried it, it didn’t help. In the log when saving, I see that components are now with static SGUIDs, and actors with dynamic.
This is what the log shows when saving. But when loading identical lines in the log no longer exist.

HandContainers_Bucket2_00000298000002290000028A0000020C_BCP_ExtendedResource_79E3054444D26682097E3AB8D12F6CC1
HandContainers_Bucket3_000002F3000001E10000022D0000022F_BCP_ExtendedResource_79E3054444D26682097E3AB8D12F6CC1

I will make a sample project on weekend then you can compare to what you’re doing.

What node you’re using to load the data?


Also please send an screenshot of the structure you’re trying to save in the generated component.

Will be good. I will also now try to make a separate project with my hierarchy and my problem, but without unnecessary dependencies. And if it comes out, I will send it to you.

LoadGameWorld (+Callbacks)

Bruno I messed up again … I recreated a separate project from my system … and everything worked there, then I started looking for differences and I found the problem. Since I integrated the savior into my old save system, there is still a function that removes actors and components before loading. And it looks like it somehow influenced the work of the savior. Sorry for your wasted time. And thanks for the help

1 Like

@Irakli , Those warnings will be gone next version and vehicles should teleport correctly.

Thank you, I’ll be glad to remove the manual fix for this

EDIT: Sorry forgot to ask, will the fix be also applied to 4.26 version?
And sorry to pile on with the problems, but we had another problem:
While implementing a workaround to above bug, we created a variable that we saved the actor’s transform to and subsequently apply the transform to the affected actor at load time. While testing the fix all actors would teleport to 0,0,0 on load. So we double checked the variable’s savegame tag and it was fine. After enabling logs we saw that while deserializing the savegame, the location was somehow missing (rotations had some values but we cant verify if those where correct). We changed the implementation and save location and rotation into separate variables, and it works, I was wondering if saving transform variables is supported?

Yes, will be backported to 4.26.

Internally the plug-in assume the transform to be recorded in local space, not world space.

Hi Bruno. I have a question about game updates and game load after updates. I noticed that after updating the code for Actor, I can not always load the game. I figured out for sure that changing the order of declaring variables would result in the inability to load data. I also noticed that sometimes changing a simple code that does not affect the data that is saved and loaded leads to the fact that the Actor is not loaded. I am guessing that this is due to the change in SGUID after compilation. And now I have a question. What should and should not be done with the code so as not to lose the save later? And how to eliminate losses after updates?

Create SGUID from a Guid string and never generate guids based on Actor’s name.
Either using the FGuid constructor from string or the “Make SGUID (Input)” node.


Some projects go as far as defining the Guids in a Game Design Document and it never changes project wide.

Let’s say I created an SGUID in this way for each actor class, for 100, 1000 actor clases, etc. But as soon as I put 2 identical actor classes with the same SGUID in the world, and they will be the same in this case, they will not be saved, I checked it now. How then to keep the same actor classes and at the same time not lose data with any change?

Here’s a simple construction script example of things you can do with IDs:


That would always use the GDD id, but the final piece would consider already existing instances of the same class.

The loop actually isn’t required, but it’s to remind you that you can query things in the world and build Guids with that…

I didn’t quite understand the meaning, but won’t Resolve Name to SGUID give a dynamic ID that will then be changed and the laod won’t happen? And I don’t understand the meaning of the append of the two SGUIDs. What is GDD ID?

There I create an ID independent of Actor Name.

I take out the last 8 digits of resolved ID and append to the fixed ID because that part of resolved guid is changed by instance counting. Then I discard all the rest from resolved guid body.

But of course, if you change the name of the CLASS then as I said there’s no way to avoid what you’re asking unless you keep a data table of Guids for actors that you think are important to define by hand then set ID value manually without using any generator node.

Now I understand your idea, but then something incomprehensible happens to me. I have a class with the assignment of SGUID only through the Resolved Name to SGUID and I put several of these in the world and they are saved and loaded normally.

Yes that’s how it should work… but when you change the name of the class all data would be lost, you would probably have to use class Redirectors in your Slot to retain the old save data from when your class was named something else:


But would be required c++ changes to the plugin to allow mapping between classes.
Can’t do it from the UI.

I placed this “code” in my ConstructionScript without a loop and the actors are no longer saved, after loading the actors did not spawned.

If you want fixed Guid you can’t spawn multiple dynamic copies of the same class.

If you want it dynamic you will have to define some policy within your project to determine how you’re going to generate those Ids regardless of which instance was currently spawned and regardless of class name.

For that, none of the Make SGUID or Generate Once nodes can solve for you. All of them rely on Class Identifier.

So only you can define that rule, not the plug-in.


HandContainers_Bucket2_xxx

As soon you modify that class id, the data saved is lost.


I can add an ID override like in the USQLite plug-in, but that can drive into another set of different bugs if you aren’t paying attention when using it.

Is there any limit on the length of the stored data array? Does the plugin store Map and Set variables?

All platforms have limits, the size will depend on platform, usually you should not go over 2GB per save file.

Sets and Maps are supported.

If you are talking about Object Instances, Maps can save [Name , Object] and [Object , Object] types.

Other mappings for Object References are not implemented and if you need it to be stored within a Struct you should use Soft References instead.