Hey, Chesko, love / hate your mod, I have a bug to report. Everything was hunky-dory for (10 - 50) hours of gameplay. Then, suddenly, I started losing all of my exposure points really fast and I don't know why. Can you help?
(background primer for those that might not play Frostfall; Exposure Points are my method for tracking player condition from exposure to the elements. The primary reason it goes down is from being in a cold place. Equipping warm clothing slows the rate of exposure down.)
So I did some digging and asked a user to run a debug command I had left in the script files. This debug command allows me to return the value of what Frostfall thinks their clothing "value" should be, which is the largest contributor to keeping exposure rates low. Lo and behold... the value was 0, even though the player was fully clothed. This value is obtained by reading another script's property that runs asynchronously to my primary script.
There are only two explanations for this that I can see:
- The clothing variables in the Clothing Script suddenly and mysteriously reset themselves to 0. (Extremely unlikely, never seen anything like that happen before. Also, this script does not operate on an OnUpdate loop; it only runs when OnObjectEquipped() events fire. The times this happens for players is while running around, not equipping or unequipping stuff. Which leads me to believe that this isn't the problem.)
- The main script attempted to read the clothing script and it failed to do so.
I went on a long development cycle of "Wow properties are great!", and now I'm having to go back and reanolyze all of those decisions. Any ideas?