LCVg's Serialized Saves Plugin

Nice, if i remember it was a boolean “ArNoDelta” variable to set to true or false to fix this problem to force serialization of defaults values.

I will test my scenario when the update arrive on my side and confirm that it is fixed

thanks for you reactivity

Ok i updated the plugin and the bug is now fixed.

There is another bug or i do something wrong, its about the “event object load complet” it seem that i need to load my game two times to get the good value

Here is the “event object load complet” on my sphere (the sphere represent a gold coin pickup)
5c738e7b89d00fb6f19365ae4bc92e8b1f16f733.jpeg

the variable “BeenCollected” is set to true when the pickup has been already collected, to false when it has never been collected so i can hide it or not on the load.
the variable “BeenCollected” has the “Savegame” checkbox checked.

the bug is on this boolean variable, i need to load my game at least two time to get this variable value correctly

here is what i do:

i launch my game and save it on the begining (BeenCollected is false at this moment and the spere is visible)
0f1c7023bc6eb5bbf2e8ebc78f8369f7966b87b8.jpeg

i pick the gold by walking on it, the sphere is collected and hidden (BeenCollected is now set to true)
58a7bbeca9663470d291f101839c964483b2d108.jpeg

i now decide to load my game, it should restore the gold pickup since i saved it when it was still visible but it dont, the variable BeenCollected is printed to true and it should be false!!!0319872e1c77cae62ec6bfe9fa6d5a95bab4f58b.jpeg

i load a second time, and now it work the variable BeenCollected is now false and it is correct the pickup is now visible again
f139805737495bb0b655ea668b4a0c47acd8fc61.jpeg

is this a bug or i did something wrong ?

i tried to add a delay but it didnt fix it i really have to load my game 2 times to get the correct value.
96883e9c4ce7974df3e6a69ced0df294460a2652.jpeg

Hello Skeleton60 I don’t have my pc on hand right now. But i will look into this tomorrow and come back at you as soon as possible.

Hello again Skeleton60. I can confirm this is not a bug and there migh be something wrong with your implementation. This is the setup I’m using for a coin pick up actor and its working as intended:

Instead of just hiding it I also destroy the actor to reduce memory usage. If you want a complete example of this you can download the example project from here

On this example the loading works correctly and only needs to be done once. Hope this helps! Have a nice day!

Thanks you :slight_smile:

I will try to see what i did wrong, your project work fine and that what i want, it will help me to find my error !

edit: ah no, i found the same bug in your project and i know why see my next post

Hello, quick question,

I seem to be having an issue with saving a door BP. I have a door with a timeline (for the open/close) and I have it saving if it is open or close correctly, but when I load my game, the actual door itself will reset to x 0 y 0 z 0 world coordinates instead of where it’s placed. This only happens every other load however. If I load the game it will appear 0,0,0 however when I load it again it will be in the correct position, and it switches back and forth every time I reload the game. Any idea on what might be causing this?

Hello, i thougth your project was working fine, but i found the same bug in your demo project, i have to load two time to respawn the coin pickup.

Following this scenario:

-Launch your game
-Select warrior
-Press * to save game
-Go pick a gold coin, and stay where the coin pickup was with your character
-Press / to reload the last save

the coin isnt respawned

-Press / again to reload a second time

the coin is now respawned


second scenario that is working:

-Launch your game
-Select warrior
-Press * to save game
-Go pick a gold coin, but move away from the coin location with your character
-Press / to reload the last save

it work fine this time.

that why loading the game two time is working because our character is now on another location than our pickup location

i hope you can fix this easily :slight_smile:

I was able to reproduce this problem. This is happening because persistent actors are actually being respawned before loading the player data. There are two possible work arounds for you until a new version for the plugin gets released (next version should be coming before the summer sale in july, but i can’t guarantee it will happen because epic is really bussy with the sale right now). It is very easy to fix on my side, but until the patch gets released try this:

  1. Instead of doing a full load, load the player data first and then the actors data (with the individual nodes instead of the one that does everything).
  2. Teleport your player pawn to a safe location before loading (0,0,999999999 for instance).

Its a little bit hacky but it should work until the patch comes out.

The reason of the bug is because the actors get respawned, the coin gets picked up and then the player gets its data reserialized (hence, the coin count gets reseted to the last save point).
Thank again for pointing this problem out. you are contributing to make this a better plugin! I will let you know as soon as the new update is submitted! Have anice day!

Thanks, i will wait for the plugin update.

I was testing some more stuff with your plugin and i have some questions about blueprint based on “object” only (i hate doing blueprint based on actor for thing like data only)
and it seem that reference are lost when its a blueprint based on object (look like object are not reconstructed), and saving & loading does not work too.

In your wiki you say that your plugin search for all actors with the interface “persistent object interface” and manage them to be saved & restored, but when you say “search for all actor”, it mean that blueprint based on object wont be find by your plugin right?

do i have to use “Add Object Save Data” and “Get Object Save Data” nodes in order to save&load my blueprint based on “Object” ?

if yes, do you plan to make blueprint based on object saved & loaded like actors or it is impossible by design ?

That is correct. Right now the only way to save objects that are not actors is to manually add them to the save file. It is my intention to make the plugin save objects automatically (hence the name of the interface), it is more complicated than I originally expected and I decided to add the posibility as its currently implemented to provide an alternative to the automatic process until i finish it (even knowing is not the most elegant solution).

Here is an example of how to doit currently:

You would normally have to spawn your objects manually before serializing them from bytes.

The main problem to do this automatically is that lots of times objects have a particular way of being spawned (like UMG objects, need to be spawned and added to viewport etc). As those are particular use scenarios I cannot possibly cover all of them in an automatic universal solution. Instead, the possibility I’m considering now is to keep the manual process for special objects and the automatic process for generic objects, such as simple data objects.

I hope this info comes in handy to you. Thanks again for all your useful input! Cheers!

Just an update to my last post here, the location seems to be resetting every other load to 0,0,0 for any movable blueprint that I use the Persistent Object Interface on for some reason now. I can’t seem to figure out why that is.

Do you have an script for your movable object? can you provide more details about the situations this happens on? Thanks for pointing it out, ill investigate this and fix it for the next update.

Ok I seem to have found what the issue was! The BP’s parent class were “StaticMeshActor”, anything parented as that would reset to 0,0,0 every OTHER load (if I load, it would be correct, however if I reload again it would be at 0,0,0, and so forth). However, BPs with the class of “Actor” don’t seem to load back to the location that they were left, instead moving back to where they spawned, whereas “StaticMeshActors” do. I hope this helps!

Hello Auriam. Thanks for thw input. I’m investigating this issue. A new update should come soon.

Hello Guys. Just a small update since the forum has been pretty silent during the last week.
The update should be ready for monday (available on the marketplace around wednesday) and it will include several bugfixes and a couple of experimental features:

Bugfixes:
. Static Mesh actors not loading correctly, components not registering. (Auriams Bug)
. Overlap Events triggering on reload if the player was in the area of the trigger when loading. (Skeleton60)

Experimental features (will require testing):
. Automatic Saving/Loading of non actor objects (UMG widgets will not be supported).

New documentation for the wiki will also come during next week. Stay tuned.

Thanks a lot for your patience and input!

Nice, i will test this automatic saving/loading of non actor objects when the update is available (and when i have time :p)

Hello guys! The update 1.3.2 for the plugin has been submitted to epic, it should be live around wednesday.
Sadly only the bugfixes where include since I’ve been really bussy during weekend. Automatic saving for objects will come with update 1.4 of the plugin around the 20th (maybe before but I cant promise). Thanks a lot! If you have any other minor issue with the plugin please let me know!

Hi there, I recently updated the plug in, however on load all of my static mesh actors with the interface attached don’t re-spawn back in, they just disappear from the level! I’ll keep testing to see if I can find out is causing this

Does this happens when loading an old save or when creating a new one? I’ll check it now.

With the current version loading takes 2 frames to allow components to register and avoid this problem. Do you mind sending me your log when this problem happens?

It happens with saves of the most recent version.

Also sorry, which logs did you need?