Download

[PLUGIN] Savior 3

[SAVIOR] Procedural (brunoxavierleite.github.io)
[SAVIOR] Serializable (brunoxavierleite.github.io)

I followed these links earlier. There is only a basic description of pins and that’s it. There is not what you wrote above. For example, it is not written there that some components can be loaded after this event … I would like there to be such a description as, for example: [SAVIOR] Load Actor

There was still an unanswered question. What is better to use for Save Spawned(Dynamic) Actors Generete Once: SGUID or Make SGUID in construction script?

I prefere Make Guid (Resolved ID), but if the class is some actor just stored in an array, the Generate Once will also be enough because the SGUID value will be injected from slot into the newly spawned actor anyway.

Another important thing:

Since Fortnite cheaters, Epic Games is encrypting ID of some core actors, like the main playable character. But they only do this at runtime (shipping package), it’s some weird functions hardcoded into the engine.

For the main character, it’s better to simply Invalidate the SGUID and use it that way, instead of using the Make SGUID nodes in constructor.

You won’t notice that until you package for shipping. In shipping mode Epic seem to add memory address encoded into the internal name of the actor… and that is going to change every time you launch the game (to difficult the work of memory scanners used by cheaters).

So, for a main character, I simply do NOT use the SGUID making nodes… I just leave it as a 0000-0000-0000 guid.

Did I understand you correctly that your plugin in this case will save the position but not the variables of the main character?
And in this case, I will need to save the character’s parameters to a different place, for example, in GameMode, so that it can be restored later?

No. I was just saying to set the SGUID for the main character, manually.

Because the Make SGUID nodes will be based on Actor internal name.

But in shipping package, that internal name may not be reliable for the main character…

So just generated the SGUID for main blueprint character by hand on blueprint editor, instead of using Make SGUID node in construction.

Hi,
I was wondering if there’s a way to get the loading screen videos to play during the transition between levels (i.e. start playing while in one level and then stop playing a bit after we’re in the new level). From what I can tell, when calling OpenLevel, the video is being displayed and played, and then it’ll wait until the movie finishes to start the transition. It seems like all this is happening synchronously on the game thread, but I was wondering if there was a way to get it working asynchronously so that the level starts playing while the loading screen is still up.
Thanks!

You can’t async use “Open Level”. The Engine won’t allow doing that.
You can setup streaming levels and do custom “Load Level” with the plugin, but with Open Level, nope.

Hi Bruno,

I am trying to repossess a pawn on load. In order to do that, I saved a soft reference of the pawn pre-save and try to possess it after loading.
Setup looks like this:


The soft reference does not work while the saved GUID does.
Am I correct to assume that soft reference saving/restoring is not supported?
EDIT: Controller has a SGUID marked with a save game, as well as both pawns that can potentially be controlled have SGUIDs marked with a save game. My primary concern is that if soft references are not supported, it might require a large effort to restore all the references that actors have to each other (will need a duplicate GUID variable that needs to be resolved and set on load for every reference)

Every time you hit play…
The first time your pawn will have an internal name like: MyPawn_C_0;
And then you play again and its internal name will be MyPawn_C_1_C_2_C_5_C_10, etc.

That’s why SGUID struct and its helper functions exist.
The soft reference you have is pointing to something that doesn’t exist anymore.

Hi. Faced the problem of saving Actor Component. I created my own ActorComponent that stores all the specific data and processes it. On the OnBeginPlay event, I generate an SGUID (StaticNameToGUID) (since the ActorComponent has no ConstructionScript). On the OnPrepareToSave event, I duplicate my variables to save. And on the OnLoaded event, I move the duplicated variables to the main ones. And here I have a problem. On save, the OnPrepareToSave event occurs, and on load, the OnLoaded event does not occur, also does’t the OnFinishRespawn event occur. How do I load the ActorComponent?

I saw above in this thread discussing a similar problem but it didn’t help me.

Check the SGUID value of your component.
If it’s not always the same then your setup is wrong.

You can also manually generate Guid values instead of using those nodes if they confuse you.

I will add these nodes, can’t get any easier than this:


You can paste base string from online Guid Generators:
Generate GUIDs online (guidgen.com)

I apparently do not understand something. The SGUID is the same unique identifier for serializing the actor / componentet / object save. And as I understand it, a plurality of such objects with the same SGUID cannot be saved and loaded. For example, using your hint, now all these actor components in my world with one SGUID and still do not work.
I am trying to achieve the following. Each ActorComponent in question stores data about a specific game resource (water / sand / oxygen). I have containers in the game for such resources. Some containers can only hold one resource, and some can hold several. And now it turns out that I need to keep ActorComponent (Resource) inside Actor (Container), as well as keep Array of ActorComponent (Resource) inside Actor (Container).
Moreover, the ActorComponent that stores data about resources can be freely destroyedd and added in runtime.

Here is a small visual representation of what it usually looks like at runtime.
1

I also managed to create a unique SGUID for such an ActorComponent via the Parent Actor in ConstructionScript, but that didn’t help, I still lose data on load and don’t get the OnLoaded event

I have modified the Make SGUID node to check previous components IDs first, before generating new value.

Let’s wait for Epic to process update then you try again.

But, are these components spawned at runtime or are they fixed to the Actor class??


Judging from the image above, I would not use components for that. Sounds expensive at runtime.

I would use an Array of Objects (resources) instead. Not because it can’t be done, but because UComponent has much more runtime overhead than UObject.

But, are these components spawned at runtime or are they fixed to the Actor class??

In those Actors that store only 1 resource, the Actor Component is fixed in the Actor and is not deleted in the runtime. And those actors that can contain several resources initially do not have any ActorComponent, as the player adds resources, the ActorComponent is added.

Those. each ActorComponent simulates a specific resource with its own parameters. And for single containers, these are fixed ActorComponent, and for multiple containers, they are runtime (Add / Destroy) ActorComponents.

I will wait for Epic to update the plug-in, then you try again.


But for those dynamically spawned, “Static” guid will not work. Should be resolved if you use the Make SGUID node.

You will also have to implement the Procedural Interface on the component class…

And add the component class to Savior Settings - Auto Respawn list of classes, on your Project Settings panel.
By default only the AutoInstanced class is set to self-respawn from save data.

And yes, the components will have to be referenced by an array somewhere on the Actor. (the array marked SaveGame)

But for those dynamically spawned, “Static” guid will not work.

I forgot to mention all the actors (containers) spawned by the player at runtime.

Should be resolved if you use the Make SGUID node.

For fixed (single) Actor Component MakeSGUIDs with Memory Address to GUID mode in the ConstructionScript of the parent actor works fine, I get a unique GUID for each such ActorComponent, other modes constantly generate the same (fixed) SGUID for this ActorComponent for me, and if I generate it in OnBeginPlay then I get different every time. I kind of found a solution here, I am writing this so that you know, maybe you will find it interesting.

But I do not yet know how to get a unique and at the same time the same SGUID for dynamically added ActorComponent. It would be cool if it would be possible to combine several SGUIDs in the plugin and generate a new SGUID based on SGUID and index. For example, I would use it like this: I would take the SGUID of the parent actor and the index of the ActorComponent array for which I need the SGUID, and based on the SGUID and Index, we get a unique SGUID for the ActorComponent. I think in this case it would theoretically be easier to save ActorComponent like this.

You will also have to implement the Procedural Interface on the component class…

Already added

And add the component class to Savior Settings - Auto Respawn list of classes, on your Project Settings panel.
By default only the AutoInstanced class is set to self-respawn from save data.

Do you mean add to the Respawn Scope in the Reflector tree or Instance Scope? I think you mean second one, it right?

Actors and Component classes → Respawn scope.
Standalone Object classes (inventory items) → Instance scope.


So I confused myself, sorry.
The problem seem to really just be the Unique + Constant ID, because Components constructors.

If building from a Literal, I think you could inject the Array index of the component into the generated Guid. (from the Make SGUID Literal node above).

In general, the update did not help. When saving, I still get a normal save file with all the data, ActorComponent has Procedural and Serializable interfaces, ActorComponent is also added to ComponentScope in SlotSettings and ProjectSettings, as well as a stable and unique SGUID, but it does not load when loaded, and in the logs when loading no entries about this ActorComponent.
And I also don’t see any new nodes you mentioned MakeSGUID (Literal), MakeSGUID (Input).
Yes, I updated the plugin via EpicGameLauncher.

What version of Unreal are you using?