Announcement

Collapse
No announcement yet.

[PLUGIN] Savior 2

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

    I submitted the plugin version for Unreal 4.24 and, due to severe and very deep changes to how the engine generates object IDs in 4.24 when the project is packaged in Shipping mode*,
    I recommend you guys to setup the "SGUID" property in your Blueprints that you spawn at runtime even if you don't want them to auto-respawn from SGuid.

    * Epic is now attaching random integer suffixes to Actor IDs whenever they are spawned in runtime, so now I completely ignore those IDs and only check for base names + SGuid if your Actor have any.

    That in general means that save files from previous engines will not be compatible with saves from UE4.24+ with this plugin, or they won't be completely compatible.
    | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

    Comment


      Originally posted by BrUnO XaVIeR View Post
      That in general means that save files from previous engines will not be compatible with saves from UE4.24+ with this plugin, or they won't be completely compatible.
      So in case they change something again in 4.25+, will newer version of the engine be compatible with 4.24.x saves ?

      Comment


        Originally posted by motorsep View Post

        So in case they change something again in 4.25+, will newer version of the engine be compatible with 4.24.x saves ?
        Yes, because with SGuid property you generate yourself the "ID" suffix attached to class names, so it doesn't matter anymore whatever Epic does to internal object IDs.
        | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

        Comment


          I'm getting crashes while just trying to save my Player's State.

          Click image for larger version

Name:	Crash.png
Views:	96
Size:	69.0 KB
ID:	1696628

          Comment


            Originally posted by Schwingggg View Post
            I'm getting crashes while just trying to save my Player's State.
            Because you're not supposed to do that.
            You have to create an instance of your slot and then you use it. There's plenty examples in this forum topic, for example this one:



            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

            Comment


              Originally posted by BrUnO XaVIeR View Post

              Because you're not supposed to do that.
              You have to create an instance of your slot and then you use it. There's plenty examples in this forum topic, for example this one:


              My bad, thanks a lot for your explanation. Works great now

              Comment


                BrUnO XaVIeR is there a way to make the saves compatible? We have an existing game on Steam that has beta testers with their own saves. I'm only using the game instance and nothing else for saving so hopefully there is a way since the change is for runtime actors, right? I have a source build too. Will compiling an older version of the plugin work?
                Grand Guilds | Twitter | Facebook


                AI Behavior Toolkit - UE4 Marketplace

                Comment


                  Originally posted by Jujaswe View Post
                  is there a way to make the saves compatible?
                  Compatible with what ?
                  The default save system?
                  Last edited by BrUnO XaVIeR; 01-15-2020, 03:13 PM.
                  | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                  Comment


                    Originally posted by BrUnO XaVIeR View Post

                    Compatible with what ?
                    The default save system?
                    Sorry, I meant for 4.24. We recently upgraded the engine coming from 4.21 so now the saves are not compatible in a packaged build. I was hoping there's a solution for it since we're only saving variables from the game instance and not saving spawned actors.
                    We need to make the old save files (Savior) compatible so that our beta testers don't lose their save files.
                    I'm using a source build so I can recompile the plugin if needed.
                    Grand Guilds | Twitter | Facebook


                    AI Behavior Toolkit - UE4 Marketplace

                    Comment


                      GameInstance didn't change anything, they are still saved and loaded the same way.
                      Even after changes Epic did to packaged builds you should be able to load any old save files if all you save is GameInstance property.
                      Unless you change its class.
                      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                      Comment


                        Originally posted by BrUnO XaVIeR View Post
                        GameInstance didn't change anything, they are still saved and loaded the same way.
                        Even after changes Epic did to packaged builds you should be able to load any old save files if all you save is GameInstance property.
                        Unless you change its class.
                        That's what I was doing but the game instance and all of its properties aren't being loaded from the old save file. I'm using "Save Game Instance" and "Load Game Instance". I also tried using "Load Game World" but that only loads the last map I was in and the game instance's variables are still at their default values instead of what was in the old save file.
                        I think it fails to read the old save file.
                        Grand Guilds | Twitter | Facebook


                        AI Behavior Toolkit - UE4 Marketplace

                        Comment


                          Originally posted by Jujaswe View Post

                          That's what I was doing but the game instance and all of its properties aren't being loaded from the old save file. I'm using "Save Game Instance" and "Load Game Instance".
                          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.
                          | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                          Comment


                            Originally posted by BrUnO XaVIeR View Post

                            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 - https://drive.google.com/file/d/1dgE...ew?usp=sharing
                            New save - https://drive.google.com/file/d/1Din...ew?usp=sharing
                            Grand Guilds | Twitter | Facebook


                            AI Behavior Toolkit - UE4 Marketplace

                            Comment


                              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.
                              | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                              Comment


                                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:
                                Code:
                                const auto ObjectID = Reflector::MakeObjectID(Instance);
                                change both lines to this:
                                Code:
                                const auto ObjectID = Instance->GetFName();

                                Then recompile plugin binaries.
                                | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                                Comment

                                Working...
                                X