[Plugin Discussion] Rama Save System Plugin Thread

Thank You @RianeN and @OverRated_AU especially for your help in this thread!

And Thank You @rdeforest for sharing your research and code with us!

I am still investigating the World Partition issue, as @OverRated_AU mentioned.

I am hoping 5.3 opened something up in this regard.

:heart::heart::heart: @Tonakien @sparkness1179 @s54780478 :heart::heart::heart:

:sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles:
:sparkles: Saving Actors and UObjects :sparkles:
:sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles::sparkles:

Regarding questions about saving actors / uobjects,

I made a Feature Design Choice to not serialize entire actors/objects with all their data (which often does not need to be saved as most of it never changes).

The focus here is on maximizing File Size Reduction <~~~ by not saving data that will never change during runtime.

Instead, you have the ability to save individual properties of any actor or ubject being used by a main actor who has the Rama Save Component, and then reload this runtime state after a load has occurred.

Conceptually, you can ask yourself “What data really ever changes during runtime and thus has to be saved/reloaded ?”

:sparkles: You can then organize this data into a UStruct like a SubActorSaveState or SubObjectSaveState for each actor or object that a main actor is managing.

You can recreate the actor (Spawn Actor) or uobject from its class using construct object (in the ActorFullyLoaded event in Rama Save Component).

:heart: This is where the fast majority (usually upwards of 98%) of the data that does not really have to be saved, gets recreated, and continues to never change during runtime (Ever).

:sparkles::sparkles: Then, 15 actors or objects managed by a main actor with the Rama Save Component simply store an array of the SaveState UStructs, and for each save state, you recreate the appropriate Actor/Object, and apply the save state data, to recreate Your World!

Some amount of Blueprint coding logic and planning is required here, all toward the goal of having:

:zap::zap::zap: The Smallest Possible Save Files Ever :zap::zap::zap: in The Gaming Industry :zap: <~~~ Storing Entire Worlds in less than 1kb

:heart:

Rama

1 Like

Rama you being a Engine Contributor you could submit changes to the LevelStreaming.cpp to epic games, just a idea.

Its just a edit to a Delegate signature and every location its called there are 3 files.

// Delegate signatures
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FLevelStreamingLoadedStatus, const FName&, PackageName);

Example
OnLevelLoaded.Broadcast(InLevelPackage->GetFName());

On 5.3 this returns some GUID rather than the grids name which was happening on 5.2.

1 Like

Hey @Rama , Thanks for all the hard work setting this pluggin up.

Doesn’t seem like one of your components can be applied to a UI blueprint.

Was wondering, what would be the best way to save the contents of a list view using blueprints?

Any input or resource you would point to would be greatly appreciated.

Thanks,
SBK

I came to the same conclusion as you, but how do you get the cell id in blueprint?

@OverRated_AU , thank you for sharing your research and for this idea!

This is the sort of thing that a GlobalSaveActor is ideal for!

You can save any data you want in a GlobalSaveActor.

I have an example of a GlobalSaveActor in my new 5.3 project!

Rama Save Project Examples For 5.3 (Plugin Required)

For those of You who have purchased my Save System Plugin already, you can now download a 5.3 project where I demonstrate basic save and load features in a project with lots of commenting!

This project features:

  1. Save and load of simple bool, integer, and color data

  2. A Global Save Actor, and creating it via a Game State Subclass so it loads in every level automatically. You can store any data you want in this Global Save Actor using just two events, Pre Save, and Actor Fully Loaded.

You save and load any aspect of your game, including UI elements or complex interactions between world objects!

  1. Saving and Loading of AI units, including their position, rotation, velocity, and their logic of where they are moving to within the world.

  2. Saving and Loading of inventory, and making the pickup objects in the world reflect their state properly (was this object picked up already?)

:heart:

Rama

Hello Rama,

I’m currently trying to use your save plugin with “Menu System Pro”, which has a Save Game Manager included.

However, the save game manager isn’t an actor (only an object).

I don’t have access to most Rama’s function there. Is there a way I could use them from there? A lot of menu related information are coming from this save manager and if I could avoid rebuilding it differently, I would be very glad!

Hi there!

Are you saying you can’t access static bp library nodes from the uobject blueprint of the Menu System Pro Save Game Manager BP ?

If that is the case you will want to move your core game functionality for save and load somewhere where you can!

My Rama Save System Plugin BP nodes can be accessed anywhere that static BP library nodes for any part of the unreal engine can be accessed.

I wish you luck with this!

Victory to You @woodencase01 !

:heart:

Rama

Hi Rama~ Is world partition available?

Hi there, does this plugin work in the editor on mac os? i use windows and mac, and it seems to install fine on my desktop pc. When i try to install the plugin on my macbook, nothing happens and it isn’t available in the editor.

hello again :slight_smile: new question:

I have an actor that acts as a world “chunk” and will spawn in ISM (instanced static mesh) objects. What is the best way to reload these meshes? When reloading the actor with the save system, the ISMs are not loaded in.

My world is procedurally generated. I am already saving necessary data like seed, loaded chunks, etc. Everything is working pretty well with the exception of loading the ISMs.

You have to use arrays to store the data onsaved and reuse the data on actorfullyloaded, then loop read your meshes/transforms .

Maybe It’s me but I don’t see any mention on your video tutorial about data stored in a components.
For example: I have an inventory component (in c++) which stores via UStruct and a Map the items stored by the player.
How do I save such data considering that component can’t hold any component?
Are those automatically saved by putting the Rama Save Component as player component?
Thanks for your time

Read the docs you can save components using the details on the save component.

Thanks for answering.

As far as I am aware (and i know because I have watched all video tutorial) there are no docs. Could you please post a link?

Thanks

Async Save and Load

Hello! I just purchased the Rama Save plugin in order to replace my entire game’s save system, but I have hit some issues when updating my system…

Basically I’m having issues with the Async Save and the fact that there is no Async Load.

First the Async Save, it’s not a latent node and there is now way to know when the save is done, my game saves on exit, and the game used to exit when the save was done, unfortunately the bool “all components saved” doesn’t work… I would like to avoid having a huge hitch when saving (since my game is entirely dynamic, all objects are spawned)

Then there is loading, there is no Async Load, and as mentionned, my game is made entirely of spawned objects, which means when loading a save, it freezes for a few seconds before loading everything at once… This makes my loading screen useless and the freeze is not what I would have liked…

I hope that can be added soon ^^

Love the plugin so far otherwise!

1 Like

Hello Rama, I have some feature requests:

  1. We need asynchronous loading.
  2. We need to know when the saving process is complete (and if there is asynchronous loading later, we also need to know when the loading is complete).
  3. During asynchronous saving, if the game is paused, the asynchronous saving will stop. Is there a way to handle this outside the main thread?

Thank you!

In plugin settings (inside of Project Settings ~ Game) you can specify a custom RamaSaveEngine Blueprint class, and in that class you can implement these events!

//From RamaSaveEngine.h

/** Value proceeds from 0 to 1 during async save <3 Rama */
	UFUNCTION(BlueprintImplementableEvent, Category="Rama Save System")
	void Async_ProgressUpdate(const FString& FileName, float Progress);
	 
	UFUNCTION(BlueprintImplementableEvent, Category="Rama Save System")
	void Async_SaveStarted(const FString& FileName);
	
	UFUNCTION(BlueprintImplementableEvent, Category="Rama Save System")
	void Async_SaveFinished(const FString& FileName);
	
	UFUNCTION(BlueprintImplementableEvent, Category="Rama Save System")
	void Async_SaveCancelled(const FString& FileName);

This is how you can also display an async saving progress bar!

:heart:

Rama

PS: Async loading is something I will think about, it brings up some issues of the AI of some creatures starts activating before all the other creatures are fully loaded, will think about it!

When you save can you save to an index under the save name? Like you do with a game instance and slots.

Hello Rama,
I wanted to ask for your advice. Since you might be quite busy, updates sometimes come a bit slower. For instance, Unreal Engine has already reached version 5.5. In such cases, do you recommend that we update to the new version ourselves, or is it better to wait for your update?
Thank you very much for your response!