Announcement

Collapse
No announcement yet.

[PLUGIN] Savior 3

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    The update for 4.25 was already published.
    It should give a warning with name of Object if ERROR:ID happens.
    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

    Comment


      Awesome. Now running Savior v3.1.0 on UE 4.25.

      The refresh nodes explanation did the trick for getting rid of all the Savior2 warnings. ✓

      Somehow all of my 'ERROR:ID' errors from my previous post have vanished (yay!), only to be replaced with a series of other issues which I'm assuming were previously masked or I just didn't notice.

      When saving
      Actor !Save Tags don't seem to be working - any components that don't also have a !Save tag on them are still in debug output (and serialized file from what I can tell). This seems to include some generated components that don't appear in the world inspector detail panel (e.g. a BP_MyActor_StaticMeshComponent_0). Since they don't appear in the inspector I'm not even sure where they come from aside from that they're parented to the actor.

      When loading
      1. This error appears a few times:
      Code:
      LogJson: Error: Json Value of type 'String' used as a 'Number'.
      I have no idea what's causing this one. As per your previous post, I'm wondering if this is a different symptom of a soft reference?

      2. It seems like Scene Component transforms are not loading correctly - they seem to have the actor transform being loaded into them, instead of the default transform from the blueprint class (previous behaviour I think?) or any serialized values - unless it's correctly deserializing an incorrectly saved transform? I'm not sure if this only applies to Scene Components that are a part of a hierarchy, or if that would relate to the "Mitigating 'Child Actor' transform conflicts on load." bullet from the Savior 3 update notes? In my particular case I think I can get away with going around all the relevant scene components and using the !Tran tag as they'll all be using a relative transform that shouldn't change from the default, although that seems like kind of an odd solution and one that wouldn't necessarily scale to other game types.

      Sidebar
      Finally, more of a set-up-y type question - previously I have not been serializing any game state references and instead just "rediscovering" the game state and re-setting the reference on load. With the game state being auto-serialized as a part of the "Save Game World" node, am I better off making sure any game state references are also serialized to try and help pick up the serialized version of the game state? I have a funny feeling like that would be the case, I just want to confirm that aligns with how you'd expect that kind of reference to work with serialization.

      Comment


        Xandemon all the things you describe above are caused because of this:

        * You save actors when they have an specific parent "owner" (are they child actor components?).
        * When loading from save, plugin tries to find "owner" parent of actor it is loading... But for whatever reason, on load, the parent is null.

        It's hard to say why parent of your actors on load is not valid.
        | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

        Comment


          I am submitting another update with some glue code, trying to "guess" what is happening to parent transform on load.
          If it is null in a record then it will just assume that it never changed before loading.
          | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

          Comment


            Hello, back with a strange behaviour.
            Until yesterday I was using 4.25. As mentioned in a previous post, I'm saving both the game instance and a save level in the with callbacks version. Everything was perfect after having solved a previous problem.

            Now today I moved the game to UE4.26 and updated the plugins accordingly. This was necessary to try to solve other problems rrelating the lightmass baking that in fact is now solved.
            Problem now is that saving operation seems to be ok (in the sense that the relevant files are created with a size that is similar to the one of the previous engine version), but loading will not in effect load anything. The game is in the state of the original situation before saving. Any idea what could have been changed by the former plugin for the UE4.25 that could cause this issue?

            Just for safety, I re-run again now my old game in Ue4.25, and evrything is ok. This morning I really just opened a copy of the game in UE4.26, nothing else.....
            Last edited by Andrea66; 01-04-2021, 12:41 PM.

            Comment


              Originally posted by Andrea66 View Post
              Problem now is that saving operation seems to be ok
              but loading will not in effect load anything.
              I didn't really change anything from 4.25 to 4.26;
              Basically I just added a log + object name if there is an error with generated ID.

              You have to enable logging + "deep logs" on slot assets and mail me the log file for me to have any clue.
              The only thing I can think of is, somehow when upgrading your project, "SGUID" values of your entities have changed.

              Last edited by BrUnO XaVIeR; 01-04-2021, 12:56 PM.
              | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

              Comment


                I checked the SGUID, but they are ok. SGUID are exposed and setup per instance once placed in the editor (I do not have any runtime spawned actors, and setting up them when placed in the world, is perfect because in this case this GUID will never change and any saved file is loading perfectly even if in the meanitme I had to recompile some BP. Originally I was using the create once SGUID in the CS, but this has the problem that I mentioned before, that after recompiling, the GUID is again generated, and the saved file becoume not useful anymore ).
                I've also a debug BP that is checking that there are no doubled SGUID (essentially all zero's) in the world.

                Now I'm baking the light again, after I run a short saving operation with the deeplogs activated and I then pass you the file via mail...
                Thanks as usual for the quick reaction....

                EDIT
                Solved!
                For the other users, the issue was the I was having the "read slot file" unchecked in the Savior function Load Level +Callback, and therefore this was the reason why level was not loaded. My fault!

                Last edited by Andrea66; 01-04-2021, 03:08 PM.

                Comment


                  Hello Im actualy trying to save an empty UObject that contains some variables and in the mean time this UObject is a variable from the playerController But for some reason when i try to load the save nothing happen the Uobject variable in the actor is empty .

                  I checked the log when im saving the Uobject seems to be correctly saved ( even in the save file there is mentions of the variables inside this uobject) .

                  Did i miss somethings ( if its the case would love to know what im not doing right ) or it's just not working as intended ?

                  Im on ue 4.26 .
                  Last edited by FAKlR; 01-04-2021, 10:21 PM.

                  Comment


                    Originally posted by FAKlR View Post
                    Did i miss somethings ?
                    When you spawn an object the engine can name it anything.
                    You have to give a proper identifier if you want it to be loaded correctly.

                    The plugin expects objects to have a Guid struct variable called "SGUID" with a valid unique value to identify different instances of a same class:

                    https://forums.unrealengine.com/unre...94#post1467094


                    And if you want the object to auto respawn in arrays, it must be a child of classes in scope of auto respawn list on project settings.
                    Last edited by BrUnO XaVIeR; 01-05-2021, 07:16 AM.
                    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                    Comment


                      Originally posted by BrUnO XaVIeR View Post

                      When you spawn an object the engine can name it anything.
                      You have to give a proper identifier if you want it to be loaded correctly.

                      The plugin expects objects to have a Guid struct variable called "SGUID" with a valid unique value to identify different instances of a same class:

                      https://forums.unrealengine.com/unre...94#post1467094


                      And if you want the object to auto respawn in arrays, it must be a child of classes in scope of auto respawn list on project settings.

                      Seems you already posted somethings related to exactly what im facing https://forums.unrealengine.com/unre...23#post1747987

                      I just found the soluce randomly while in the project settings and then checked the forum page for the word " Instance Scope " . I just passed a really bad day trying to fugure it out and bam i found it in a deseperate try lol .

                      I tried what you told me about , but it's seems not to be relevant for UObject ( i wasnt able to use Create Once SGuid guess it's tied to actor , and respawn interface wasnt triggered ( it should have been ?))




                      Ps : You really should update the front page to add thoses plugin update and explanation you give all along the forum thread ( I know its a long and tedious task , it's just there is real solutions lost in the middle of user post wich dont help ) .

                      Thanks for your time !

                      Comment


                        Originally posted by FAKlR View Post
                        Ps : You really should update the front page to add thoses plugin update and explanation you give all along the forum thread
                        It's not realistic for me to write documentation for everything that exist in code, every function, every class, every change.

                        Unfortunately these plugins don't pay my bills, I still have to maintain my real job and for documenting all the details like that, I would have to work on this 24/7, which I can't afford to do.

                        I can reply to questions from my phone, but I can't quit my job to create all kinds of examples and video tutorials that some people expect. I also wouldn't be able to sell it for so cheap if this was my main job.
                        | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                        Comment


                          I will submit v3.2.0 for Unreal 4.26+ this weekend.
                          I have completed the process of converting default slot's subobjects from UObject types to Struct types (USlotMeta* and USlotData*);
                          This is a change that affects every blueprint that implements the "Serializable" interface, so if project is deep in development I probably would not touch this update for some time.

                          This won't break compatibility, however you most likely will be required to go through all your blueprints that implement the Serializable interface and click "Refresh All Nodes".
                          If it's a large project, this process can be tedious if you don't have some kind of editor script to do that for you.

                          If you use the "Get Meta Data" node or consume Meta Data fields somewhere, you will be required to replace references to those nodes as well since meta class is now a struct and not an UObject any more. Here example, meta members used on slot GUIs have to be replaced to pick members of struct now:





                          So... Why this change?!
                          Structs consume less memory, better performance in all threads raised to save the game, Garbage Collection won't have to worry about the old USlotMeta* and USlotData* sub objects to collect.
                          Prevents GC failing to clean USlotMeta* pointers in case they become unreachable, not a issue on shipping builds, but can be fatal on debug builds.


                          And why not back port to older engine versions?!
                          I don't want to force projects that don't have to upgrade to newer engine version, to go through the annoyance of fixing old meta references like posted above.
                          That could cause a deadline penalty for some, and from my experience many upgrade to new plugin versions without reading release notes at all.




                          Another thing that I am trying to solve is the issues some new people seem to still have with generation of uuids, the "SGUID" global identifier for instances of a same class spawned in the world.
                          When you drop an actor in the level by hand, the "Create Once GUID" node in class constructor will suffice your needs, it generates a guid if the current value of "SGUID" property is zeroed.
                          Now, when you spawn a class at runtime, if using the "Create Once GUID", an actor will generate a new Guid value different from previous every time, because in this case the default value will always be invalid and the construction script will always generate some new value. When that happens, the save system cannot identify your instance correctly.

                          Some people are really falling confused by this I will try to explain a bit more;
                          When you place an Actor manually in the world, it is usually displayed as a white label from world outliner, but when you spawn that actor at runtime its label is yellow:




                          That Actor usually also contains a suffix generated at runtime, in Editor it looks like "_C_0", "_C_1", "C_2", etc.
                          Each time you hit play, that number may increase... When shipping a final build, the suffix is actually several numbers, example: "_C_53265472".

                          So since Epic implemented that, it's no longer viable to try and identify instances of a class by name, as used to be possible before.
                          So we use "SGUID" for that now. But, if you spawn that Actor with "Create Once GUI" node, the problem remains the same unless you set manually the SGUID to a fixed value that you control.
                          Some people are storing lists of guids in data tables, to then apply them manually once an instance of Actor is spawned. That works, but does not scales well with a growing project.

                          So there's two scenarios:
                          1: We want to always generate a new guid value IF current value of SGUID is zeroed.
                          2: We want some instance of a class, spawned at runtime, to always generate the same guid value. No matter this class have been spawned already or not.

                          Case one, usually will be your Actors that you placed by hand in the level. So use the "Create Once GUID" node in class constructor.
                          Case two, this is what is causing trouble to a lot of new users, because initially they assume that the "Create Once" node is deterministic. It isn't.

                          So to address this problem in case two, I have implemented into this update a different method to save you from the headache of having to keep tables of Guid values.
                          A "Make SGUID (Type)" node. This is actually deterministic, the node will always generate the same guid value based on the full name of the instance spawned at runtime:





                          So, to recap, if thingy appears Yellow in World Ouliner then you probably want to use these nodes.
                          If white label, "Create Once SGUID" node in constructor will do the job.

                          Gotcha to watch out:
                          If you are spawning several instances of same class and apply "Make SGUID" generated value to their "SGUID", the value generated can collide (same guid value for different Actors).
                          So if you're making something like an Item Inventory, you probably should implement a "Stack" system where 1 class contains a "Amount" field, instead of spawning several instances of the same class. If you still want to brute force several instances spawned at runtime and guarantee that no ID collisions are going to happen, then it's your job to insert manually "SGUID" values
                          Last edited by BrUnO XaVIeR; 01-09-2021, 11:14 AM.
                          | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                          Comment


                            Submitted version 3.2.5 for Unreal 4.26+:

                            * Instances of classes that don't implement 'SGUID' property will now skip loading by default.
                            * This will prevent multiple instances of actors spawned on top of each other when there's no SGUID present.
                            * 'Debug' settings on Slot class, when enabled, will print to output log name of instances of classes spawned that have been skipped on loading.
                            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                            Comment


                              Hello! I've been implementing this plugin in my project and it's been incredibly easy to set up. However, I have one portion of my data that I'm having issues saving. In my game, I have an inventory object that contains a TArray of pointers to UDataAssets. When loading the game, the objects in this TArray aren't repopulated. I've read over your suggestions for handling UObjects (primarily in this post), but haven't had any luck. Is this something that the save system doesn't support, or am I just missing something? Thanks!

                              Comment


                                thatdevjeremy data assets are meant to hold static data, they shouldn't be instantiated either, so I'm confused by why would you want that array of data assets to be marked save game.
                                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                                Comment

                                Working...
                                X