Announcement

Collapse
No announcement yet.

[PLUGIN] Savior 2

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

  • replied
    BTW, Epic added Savior plugin to this April flash sale happening right now ^_^

    https://www.unrealengine.com/marketp...product/savior

    Leave a comment:


  • replied
    I am submitting for review v2.9.1; for Unreal 4.22+..
    There's no heavy changes, I just included helper functions to aid working with UObject blueprints that must be saved (not Actors or Components):






    Also included a "Find Actor" that searches in level for an Actor with a specific 'SGUID' value:

    Leave a comment:


  • replied
    Originally posted by Fr0hst View Post
    Saving the game world is instant for me, but loading the game world takes a significant amount of time. I have several thousand actors I'd like saved/loaded, is this more then the plugin is expected to handle? Are the scope settings the primary method of managing performance for the plugin?

    Also as an aside, I would like to show some kind of UMG loading bar widget while my async load is performed, but the entire game appears to be locked during the load, even UMG. Any idea how to enable the non-locking behavior you have in your example projects?
    Configure your slots assets to create a background thread (async task won't lock the game).
    Also there's a builtin loading screen system you can setup in your slot assets.



    They are not universal for every slot asset you have, you have to setup those options for each slot.

    Leave a comment:


  • replied
    Hey Bruno, thanks for the tip about soft class references. It works like a charm.

    Saving the game world is instant for me, but loading the game world takes a significant amount of time. I have several thousand actors I'd like saved/loaded, is this more then the plugin is expected to handle? Are the scope settings the primary method of managing performance for the plugin?

    Also as an aside, I would like to show some kind of UMG loading bar widget while my async load is performed, but the entire game appears to be locked during the load, even UMG. Any idea how to enable the non-locking behavior you have in your example projects?

    Thanks again!

    Leave a comment:


  • replied
    Manspear please read this topic from here:

    https://forums.unrealengine.com/unre...97#post1696597


    When you have multiple instances of same class in the level, now you NEED a 'SGUID' property due to changes Epic made to internal object IDs.
    I began to ignore internal IDs in that case in particular;

    Before the data ID was something like: "ErrorActor_123"...
    Now it is this: "ErrorActor_"+SGUID.Value()

    Because your instances have no Sguid property, the plugin thinks they are all just ONE instance: "ErrorActor".
    The code to read guids is correct, it's just this little detail about multiple instances I forgot to mention in docs because this change to the engine is very recent, sorry.

    -----

    If you try to read the save file and search for "Someguid" you will see that there's only 1 actor record. And that's because there's no Sguid property available.

    Leave a comment:


  • replied
    Maybe this'll help you figure that out:
    I've made a minimum sample project where I've reproduced the error in a blank project.
    1. Press play in editor
    2. Press Save button
    3. Click on the "ErrorActor" actors placed on the map, see that their integers and Guid variables are different from each other
    4. Press Load button
    5. Click on the "ErrorActor" actors, see that both their integers, and Guid variables are identical to each other
    Attached Files
    Last edited by Manspear; 04-12-2020, 03:43 PM.

    Leave a comment:


  • replied
    I have no idea how you managed to do that.
    I always check for the name of the guid case sensitive.

    Leave a comment:


  • replied
    While trying to make a spawner I found a Guid bug:
    1. Add a Guid variable to a blueprint actor
    2. mark it "Savegame", public variable, and NOT name it SGUID,
    3. then place multiple such actors into the game,
    4. generate unique guids for each of them
    5. save & load
    6. BUG: All actors get the same Guid, all other variables marked savegame are the same too. It's as if all of the objects "think" they're the same object instance.

    I expected Guid to behave as any other variable as long as it wasn't named "SGUID". I can't make it behave like any other variable marked savegame, not even adding it to a struct works...
    Last edited by Manspear; 04-12-2020, 01:12 PM.

    Leave a comment:


  • replied
    @BrUnO XaVIeR haven't yet learned how to generate/replace DLLs,
    but I made the "get object with guid" function in blueprint, it was pretty simple here's how:

    1. In the game instance, create a map/dictionary with GUID as key, and UObject as value.
    2. Create a function library with AddGUIDObject and GetObjectWithGUID functions
    3. In a dynamic object: OnFinishRespawn -> Call AddGUIDObject where it adds itself and its GUID to the dictionary
    4. Wherever: after all objects got loaded: GetObjectWithGUID(GUID)

    This was really easy. You could probably add the Dictionary to your "Savior Singleton" (if you have one). Automatically do the OnFinishRespawn -> Call AddGUIDObject in the C++ OnFinishRespawn function. Add the GetObjectWithGUID to your function library.

    Neat thing is that the Dictionary doesn't need to be saved in the savegame since it'll be refreshed every time a load happens.
    Last edited by Manspear; 04-10-2020, 10:10 AM.

    Leave a comment:


  • replied
    I have no idea how complex it is, will know when I write it down...

    If you know how to patch source code in Visual Studio and generate/replace DLLs you can totally do it yourself, the plugin is distributed with c++ sources included.

    Leave a comment:


  • replied
    I don't like my solution, so could I add that function to your plugin? I could send you my solution and you could release an update. Or is it super advanced deep level stuff that would take 20+ hours to implement?
    Last edited by Manspear; 04-10-2020, 09:30 AM.

    Leave a comment:


  • replied
    It's not impossible, I will add to ToDo list.
    But you should go on with your solution because I have no idea when that function will be included in plugin!

    Leave a comment:


  • replied
    @BrUnO XaVIeR That solved it, thanks for the help!
    Now I think it would be nice with a "get object with guid" function to get the object reference, but I guess this is impossible because the object ID of the engine changes every time... In these cases is my only option to do "get all actors of class" -> "compare GUID" -> "if match save reference" ?
    Attached Files

    Leave a comment:


  • replied
    Manspear your references are lost in arrays because the procedural spawned instances are not the same you had on save. Their internal object ID to the engine are different.
    Instead of keeping an array of Actors your spawner should hold an array of GUIDs, then re-assign GUIDs that have been lost once loading was done.

    Leave a comment:


  • replied
    How about object pointers for procedural actors? Is doing a get all actors of class + compare SGUID the way to go?
    Attached Files

    Leave a comment:

Working...
X