But for some reason, might is always "57", no matter what, when I try to get it back with GetValue(); And its the same in the Unity inspector, when I inspect combatant.
I just can't understand - where does this "57" comes from at all, how should I set my own value?
I event ticked "No status development" for this particular combatant, and set value to 0, but it is still 57.
No, it can be just any value I have, actually. Without any script, it is still "57", so it must be set from somewhere else, but I can't figure out where.
Inside "Combatants", as I mentioned, I have custom development settings set to 0. But, if I set "Might", say, to "10", might value becomes 67. So it is adding to it, instead to overwriting.
Wait a second! Actually, I think I know what might be going on. I see now that I have all status effects I have assigned to combatant at start 0_0 Likely that is the culprit. I'll get back here once I investigate it further
Status effects aren't assigned by default, so you must have made some changes somewhere.
I'd make sure that your auto-apply settings for the status effects are correct, and that you don't have the status effects set on your combatant, or that any possible equipment isn't giving you the status effects, etc.
Well, what value is stored in charStats[i][MIGHT]? Also to consider - what's the min/max value of the status value (set up in it's settings), are you using the correct index, do you have the correct combatant, etc.
Usually this should work, that's also the function used by ORK to set a status value. You can also try to set the last two bools to true, if you want to display a change notification and on a console HUD.
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!
Are you working with already initialized combatants (i.e. added/spawned by ORK) or are you initializing them yourself?
Also, the class change will mark the status for a complete recalculation based on equipment/status effects and other things - so if you need permanent changes to status values, you should use the function:
public void SetBaseValue(int val)
Or, if you want to initialize the status value, you can also use:
public void InitValue(int val)
Edit: moved to scripting.
Post edited by gamingislove on
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!
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
Without any script, it is still "57", so it must be set from somewhere else, but I can't figure out where.
Why "combatant.Status[MIGHT].SetValue(charStats[i][MIGHT], false, false, false, false, false)" is not assigning a value?
And why do I get all status effects assigned to my combatants by default? How can I disable it?
I'd make sure that your auto-apply settings for the status effects are correct, and that you don't have the status effects set on your combatant, or that any possible equipment isn't giving you the status effects, etc.
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
So, only 1 question remains:
Why "combatant.Status[MIGHT].SetValue(charStats[i][MIGHT], false, false, false, false, false)" is not assigning a value?
I tried to find other way to assign it, but can't.
Also to consider - what's the min/max value of the status value (set up in it's settings), are you using the correct index, do you have the correct combatant, etc.
Usually this should work, that's also the function used by ORK to set a status value. You can also try to set the last two bools to true, if you want to display a change notification and on a console HUD.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
This line completely resets my stats changes. But it comes at the very top, before status. My idea was to firstly assign new class, the new stats.
Why ChangeClass, even that it comes first, makes Status Changes totally obsolete later?
Also, the class change will mark the status for a complete recalculation based on equipment/status effects and other things - so if you need permanent changes to status values, you should use the function:
public void SetBaseValue(int val)
Or, if you want to initialize the status value, you can also use:
public void InitValue(int val)
Edit: moved to scripting.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!