edited April 8 in ORK Support
Hello.
1. To exclude variables that are not needed in the save game,
Changed to Save Game Menu> Game Variables "ALL" to "Select".
And below that, I entered the variables to be included.

Then when I started the game, the floatvars, stringvars, etc. in the variablehandler of the equipshorcuts in my inventory were null.
(So, all actions using the variable of the equipshortcut do not work.)

And when i call equipshortcut.variables.floatCount, equipshortcut.variables.stringCount etc., it prints 0.
(When "all" is checked, the count is output 2,2 (since a total of 4 are entered))

When saving the game, only the specified variables are saved(works well), but the game function does not work properly.
(In other words, Game Variables "ALL" works normally, but when Game Variables checked "Select" ,instances of variablehandler.floatvars,stringvars of each shortcut become null)

When accessing equipshortcut.Variables.floatVars, "an object reference not set to an instance of an object" error occurs.
(Change floatVars to public for testing)

So, as a workaround, I used "all" to exclude variables that I don't need.
(It is more convenient to use "select" to write down only what i need)

2. When an error occurs in the Orc internal code (dll), can't it be displayed on the Unity console?
When an error occurs in the codes in the dll, it seems that the error message does not appear.
How do I check it?

3.One weapon has a float variable value3 of "damage" in the level 3 setting.
And if the save variable is "false" when saving the weapon after creating it, does the weapon have that variable when loading the game?
Or is there no variable?

4.When is the getcopy method of equipshortcut.cs used?
Is it simply making a replica?
Or is it used when loading?
Post edited by KESHYAS on
  • 1) All variables types are initialized to null until some variable is actually stored in them, e.g. the floatVars will be null until some float variable is added to it.
    Each non-existing variable in a handler returns the value type's default value (e.g. 0 for float, false for bool, etc.).
    If you e.g. don't save any of the float variables, the floatVars will naturally be null when loading.

    2) Any error in ORK's code is printed in the Unity console, if there's no error in the console means that there was no error.
    E.g. the null variable dictionaries don't throw errors because all of that is checked before accessing it :)

    3) If that variable is saved, yes.
    Though this also depends on the weapon's Equipment Variables settings, e.g. if it has Save Variables enabled.

    4) It's not used when loading, but otherwise used in different parts of the framework, mainly inventory related, though.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited April 8
    1) In the equipmentVariable Setting of my weapon, 2 float variables and 2 string variables are set.
    And use that variable in the init event.

    When I use the savegame menu> game variable "all" it works fine without any problems.
    But if I change it to "select", the variable disappears (floatvars null).
    Isn't this a problem?

    It's just an option to save the variable when saving
    It doesn't seem normal for variables to disappear while the game is running.

    your answer:
    1) All variables types are initialized to null until some variable is actually stored in them, e.g. the floatVars will be null until some float variable is added to it.

    Since 4 variables are registered in the level 1 equipment variable setting of the weapon, the weapon must have a variable when the game starts.
    (Because it exists in the start inventory)
    But when I set the "select" option, the variable is not set.


    3) With the save variable "false"
    I want to use only the variable entered in the equipment variable setting, but does the variable not exist when loading?
    When viewing equipshortcut.cs, it seems to execute initVariable() when the save variable is false.
    I am not sure about it, so I ask you a question. Thank you.
    Post edited by KESHYAS on
  • 1) Oh, you mean in-game without loading?
    Hm, that might be an issue, as e.g. copying takes the save data of the variables to create a copy ... I'll check it out.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited April 8
    I am not familiar with English, so I am not good at expressing it. Sorry
    I tested it several times, but it seems to be a copy related problem like variableHandler.savegame(Loadgame(dataobj();).
    Currently it works fine with the "ALL" option, but this seems to be a bug though
    and Can you test question 3 as well?
    thanks!
    Post edited by KESHYAS on
  • 1) Yeah, it's a bug - will be fixed in the next update. Copying currently also uses the game variable save option, I'll change that.

    3) Most likely related to #1, as not saving variables for equipment will initialize them again based on your setup. Though, if you use equipment levels, keep in mind that variables of lower levels than the saved level will only be used if Use Previous Variables is enabled in the equipment's variable settings.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.