There are a few customization for loading screen on slot assets. Structural changes only if you create your own loading screen system or change the C++ classes in plugin source code.
Yeah, I was afraid of that. The blurred background and all the other stuff are really nice to have, but still per-project tailoring is needed. And for BP-only guys like me digging into the code is an unlikely option. Anyway thanks for the info and tips, hope you don’t mind newb questions
I’m preparing to submit Savior 3 update next week.
Here’s some of the things that I have been working on to add / improve:
[Improvement]:
- Savior 3 is nearly 30% faster on heavy data loading.
- Restores Relative Transform attachments on respawn.
- Load World: added “Reset Level on Load” option.
- Load Level: added “Stream Level on Load” option.
- Mitigating ‘Child Actor’ transform conflicts on load.
- Added support for Class Reference properties.
- Added support for Int64 properties.
[New Built-in Systems]:
- Save/load Skeletal/Mesh Reference (root component mesh).
- Save/load Animation Blueprints’ properties (Variables).
- Save/load Movable Lights’ native properties.
- Save/load Dynamic Materials’ properties.
[New Nodes]:
- [SAVIOR] Open Level (+HUD).
- [SAVIOR] Open Level (+HUD) +Callbacks].
- [SAVIOR] Load Object : (Slot Data).
- [SAVIOR] Load Component : (Slot Data).
- [SAVIOR] Load Actor : (Slot Data).
[HR][/HR]
Open Level (+HUD) nodes:
These nodes can execute an action to open a persistent level while triggering a Savior Slot’s loading screen.
It doesn’t perform any data load from any slot, just opens a regular persistent map.
[HR][/HR]
Load Object nodes:
The Load xxx (Data) internally were called StaticLoadxXx functions…
This have changed, you will have to replace them to new ones now they have been renamed in C++.
[HR][/HR]
Animation Blueprint Variables:
I have added support for directly saving and loading properties of Anim Instance Blueprints that are marked ‘Save Game’ on spawned Characters;
Removing the need to pass data through Characters to their AnimBP after a slot was loaded.
Your Animation Blueprint must implement the ‘Savior Serializable’ interface for this to work.
[HR][/HR]
Skeletal Meshes, Static Meshes, and Dynamic Material Instances:
A bundle of new algorithms that allows us to save and runtime load skeletals or meshes of root components;
As well as restoring dynamic material instances’ parameters, such as scalar params, vector params, and texture object params.
This was the hardest one to add since it touches stuff from a bunch of different threads, including the rendering thread.
[HR][/HR]
Movable Light Sources:
And finally, native C++ properties of movable light sources can be saved and restored without requiring ‘Save Game’ flags.
Only ‘Movable’ light sources are supported.
[HR][/HR]
Some notes to keep in mind with Savior v3:
-
Savior 3 can save and restore scalar public parameters, vector parameters, and public texture parameters of dynamic material instances on Actors’ meshes.
-
So “Save Actor” function automatically saves Dynamic Material Instances for Actor that implements the ‘Serializable’ interface.
-
And “Save World” function makes use of the Save Actor node, so the same rule from above applies when using this function.
-
Dynamic Material Instances does not require ‘Save Game’ check box on properties.
-
Check Epic’s documentation on dynamic material instances.
-
To save an Animation Instance, the Anim BP class must implement the ‘Serializable’ interface.
-
When serializing Animations, it’s not desirable to add a SGUID to Animation Instance if owning Actor already has a valid SGUID (it’s just not necessary).
-
Animation Properties to be saved require to be marked with the ‘Save Game’ check box, just like properties of regular Blueprints.
-
Light Component properties are only saved/loaded if the light source transform is set to ‘Movable’, dynamic lights.
-
None of Savior 3 features work for the ‘Minimal’ data set, only slots using ‘Complex’ data format (‘Compression’ setting on Slot class) support these new features.
Hello,
Sorry for the newbie question, I’m completely new to this plugin and currently trying to get the logic of it.
So i wrote this small test code:
ESaviorResult SaveToSlotResult = ESaviorResult::Failed;
ESaviorResult SaveToFileResult = ESaviorResult::Failed;
USavior2* ThisSavior = NewObject<USavior2>(this);
ThisSavior->SlotFileName = FText::FromString(SaveFile);
ThisSavior->SaveGameWorld(this, SaveToSlotResult);
if (SaveToSlotResult == ESaviorResult::Success)
{
ThisSavior->WriteSlotToFile(ThisPC->PlayerState->PlayerId, SaveToFileResult);
}
bSaveSuccess = SaveToFileResult == ESaviorResult::Success;
SaveGameWorld is a success, but WriteSlotToFile always fails.
I think the problem is SlotFileName: currently, SaveFile is a FString containing the full path of my save, something like “C:\MyPath\MyFile.MyExtension”
Is that wrong ?
If wrong how do i choose the full path of my save ? I didn’t see any path variable in the USavior2 Object.
Thanks
Cedric
If you don’t want to use slot assets then see the code in “NewSlotInstance()”.
You shouldn’t create a slot with NewObject<>() without a template and without initializing default sub objects, check the NewSlotInstance() function.
And yes, slot name only, never full paths.
Hi Bruno,
Thanks for your answer.
NewSlotInstance needs an already existing slot so that doesn’t seem to solve the problem, just put it one step further.
And well, it’s not that i don’t want to use an asset, i really have a priori here It’s more that i was looking for a full c++ treatement.
What would be the correct/recommanded workflow to use Savior in c++ ?
Creating an asset in the editor, then loading it with StaticLoadObject or some equivalent function, then using it for all my saving/loading operations ?
No way to create it from scratch ?
I could generate (but not yet load) a save giving only a name and not a path, but the save appears in a directory named “SaveGames”.
But i need to customize the saving path: my users should be able to easily get and exchange their saves and i have a dedicated directory for that.
So is there a way to customize the path and extension of the save file or should i add some code to move/rename it ?
Thanks
Cedric
You will have to change NewSlotInstance(), change WriteSlotToFile(), and change ReadSlotFromFile() functions to control those aspects you need.
v3 just released on Marketplace for Unreal 4.25.
You can find version release notes here
Hi, Bruno
Thanks for the update! By any chance did you get to look into the game non unpausing issue when saving/loading?
Also after Savior 3 update everything kinda broke After restoring and recreating the HUD I still can’t get the plugin to work - it simply does not save or load anything on keypress. Even when load screen is set to default 1s I get a glimpse of it flashing on keypress and nothing happens afterwards. Can you please advise where to look for issues?
Epic did not include the /Config/ folder I added.
Copy this config folder to your plugin installation, somewhere like:
C:\Program Files\Epic Games\UE_4.25\Engine\Plugins\Marketplace\Savior
https://www.dropbox.com/s/9z75aff1wyzemgp/Savior3Config.zip?dl=0
Thanks for the answer. I’ve done it, but nothing changed - still menus are flashing fast. But the save/load functionality seems to work now
What do you mean “flashing fast”?
The loading screen lasts while the loading process is running… Loading is much faster now, so if you don’t see a loading screen is because it was completed too quick (small level to load).
I meant that previously I could set Load-screen duration in slot’s preferences and it would set the time the actual duration of the load screen showing (default is 1s). Now whether I set 1 or 100 it still flashes fast (seems like it’s hidden as soon as the actual save process is done) and it does not show at all on load, not even flashing. And checkbox “Pause game” does nothing also
The loading system is much faster now, and I indeed removed the screen timer because of the bug where loading wouldn’t fade away if you end a session while the screen is there.
I will probably remove that timer from slot settings, I just forgot about the variable was public.
I see. Can you please not do that? this loading screen is a handy feature to have actually, just maybe rework it a bit?
I will see if I add it back, but it’s becoming tiresome emails reporting the issue with loading screen even though there’s a “Remove Load Screen” node in the HUD class.
I’ve added back the load screen timer.
Also I’ve checked the issue with pause on load… The load screen resume the game executing after loading is done, so if your level is very fast to load the pause won’t be noticeable.
I also don’t know why the /Config/ folder is not included on Marketplace package, I am still waiting for a reply from Epic.
Thanks! As for the pause - maybe tie it to the time that loading screen is showing? (the one I define at “Show load screen” in slot preferences). It will be really handy and will save the trouble of controlling the loading screen via something else
If I do that it becomes a problem for setups that do not use the loading screens.
BTW, from an event “On Loaded” event you can just trigger a pause again while your loading screen is visible.