Then I am sure the name of your GameInstance have changed. You can compare them by looking inside both old and new save files from a Notepad++ app.
If isn’t loading your GameInstance identifier now doesn’t match anymore what is in old save file.
I didn’t make any changes to my game instance. I checked the save files and they both have “/Game/CCGToolkit/Blueprints/CardGameInstance.Default__CardGameInstance_C”. I think this is the class path.
But the old one has “CardGameInstance” and the new one has “None”.
Old save - GG_SaveGame_02.sav - Google Drive
New save - GG_SaveGame_03.sav - Google Drive
Hmm… Yeah there shouldn’t be “None” as ID.
I will read them later, can’t read on phone, but if identifier is really None have to figure out why the Instance is null at the time you execute loading.
@Jujaswe Ok I took a look into your save files and what I see is that the “Outer” ID to your GameInstance have changed after you ported your project.
The thing is, instances of a GameInstance shouldn’t even consider outers to begin with, so after the changes I had to do inside of MakeObjID() function, getting identifier to the GameInstance running was failing silently. This is why there is a “None” there.
So, instead of asking for an outer and building an ID, I had to just ask for the instance identifier using GetFName().
I didn’t realize the changes inside of MakeObjID() function was suppressing GameInstance identification like that.
I will submit to marketplace a fix for this, but if you can’t wait for it, this is a one-line fix; we just need to change this line:
Savior2.cpp : line 774, also line 795:
const auto ObjectID = Reflector::MakeObjectID(Instance);
change both lines to this:
const auto ObjectID = Instance->GetFName();
Then recompile plugin binaries.
[USER=“434”]BrUnO XaVIeR[/USER] that fixed the compatibility issue! Thanks for the awesome support!
Can I see an image of how game instance is saved and stream levels please?
Also does a slot need to be put in the game world for reference or something to start this?
Slots can’t be placed in world, that was old plugin version when it was an Actor.
There is a node in plugin called “Save Game Instance”, to do exactly that: save the game instance.
There’s a demo project with all important nodes in use for reference.
@**BrUnO XaVIeR Hello i have trouble with the plugin , i saw on previous post the fact the plugin dont save static mesh attached to an actor but we could bypass that by saving the static mesh in a saved var and then set back the static mesh model with the loaded one . **
Lets explain , I have a Hat A on my character , i want this one to be save so i create a static mesh actor Var to store the hat reference ; once done i buy the Hat B but i dont like this one but i dont want to pay again the hat A so i try to reload my save when i had the Hat A , the problem is even if the var is clearly displayed in the save file to be the Hat A i still got the Hat B for some reason , sometimes i even got a bug where the var inside the save file was set back to Null even if i didnt save but only loaded . So how i should proceed to avoid this kind of trouble . ( the character is saved normally but the hat var dont seems to be saved correctly ) To test it i make an actor choose between multiple hat and then set the var Hat . im on ue4.23 .
Ps : I know i could save instead the integer to get a copy of th array ( and what i done ) to avoid trouble but was wandering why the game is acting like that about references .
Show a save file where you save A, and another where you save hat B (the sav files, I can’t read that screenshot)
Also I don’t know how your graphs make changes to that array of hats so it’s hard to suggest anything.
I would just use an index or enum because it doesn’t seem like you can control in any way the object IDs of those hats doing that. Unreal will generate object IDs for them in whatever way it wants to and every time the game starts that can be a different one (4.24+)
I’ve identified some inconsistency regarding that behavior.
I’m submitting an update with a small correction for that, but your case with StaticMeshes I doubt it’s going to change the results.
I’ve also updated demo projects since the fixes are relevant for all current engine versions (the nomad “then” exec pin has been removed from nodes, only “On Success” and “On Fail” exec pins remains):
Demo Projects:
Oki Thanks for the update , once i will get it i will retry to use only mesh reference to see if thats been fixed or not , if needed i could send you save file and the project files , sorry for late answer was quite busy !
Hello Bruno. Before purschase I want to clear something:
- for example I start new game on Level A, kill few NPC’s and spawn new ones, then save and go to Level B, where I do the same with other actors and save again to the same slot. Will all this maps be saved in one save slot? I can travel between levels and every level will have its actors saved? or you just save your current level?
- I have ItemInfo structure in my inventory system for example, it contains item actors class reference for spawning this item in future. will this struct save correctly?
If you want a slot to record which actors were destroyed in that level, it will reset if you overwrite with data from another level.
You can either create 1 slot per level or keep a list of dead actors yourself in game instance with soft references to those actors and save/load game instance. If an actor is in that list after load then just destroy or hide it.
Yes structures and struct blueprints are safely supported unless are doing crazy things there, like having a deep chain of nested arrays of structs with arrays of object pointers with more array of structs and so on.
Savior.2 is in flash sale right now (march 2020), 50% off:
There seem have a bug in plugin.
First,open the example project.In level 1,Knock down some robots,remember where they are,and save game.
Then oepn level 2,and load what you save before.
You will notice that the robots you knocked down do not lie down in where they should be.
Ragdoll state is not recorded because they would inflate save files size. That’s intentionally ignored when loading.
But should save the transform of these character,this will not inflate save file size.For now,the transform is completely wrong.
The transform saves.
What doesn’t save is the location of the ragdoll skeleton.
You think it’s the character moving, but no, the character capsule isn’t moving when you kick the ragdoll around.
Yes,after I set capsule visible in game I see what you say.
Can I turn on the ragdoll record?
You can simply move the capsule X/Y to ragdoll location before saving.