Hello,

I'm running into rounding errors when dealing with a combatant's 'health' status value.

Once I've done maths adjustments for defence and resistance, most of my attacks are doing damage over time involving fractions, and these are all being rounded down (sometimes to zero). Over time this is leading to a significant disconnect between how much damage should be being recorded and what is being shown. I would prefer the health value to be a float, and only rounded to an int if and when I'm displaying in the UI.

Is there a simple way of me implementing this tweak? If not, I'm guessing I have to modify the 'statusValue' source file? But if I just go ahead and chance all the ints to floats will this cause a cascade of issues throughout the rest of the framework?

Cheers!
  • Status values are int, and there's no way around that built-in. You'd have to change this in the source code, which will certainly require you to do changes all across the framework ...
    If you're enjoying my products, free updates and support, please consider supporting me on patreon.com!
  • ok no worries. I'll try scaling everything up by a factor of 10 or something.
Sign In or Register to comment.