Add offset parameter to formula calculations in Resource effects
Currently when using the formula calculation for things like Resources you can only define a multiplier, which means the value always starts at 0 and linearly increases from there. A possible enhancement would be to allow an offset to be specified to more precisely tweak the linear growth curve.
Example use case is an ability that has 1 charge from lvl 1 to lvl 10, 2 charges from lvl 11 to lvl 19, and 3 charges at lvl 20. I did the math and I don’t think it is possible to achieve that progression with just a multiplier as the multiplier must be both less than 0.1 and greater than 0.1. However it is possible to achieve this progression with a multiplier of 0.11 and an offset of -0.12 and a minimum of 1.
This is a pretty specific example from the Genefunk 2090 total conversion, so it might not be something that crops up often (if ever) in standard D&D. I’m adding it in my fork with the patch attached, feel free to integrate it if you think it’s worth adding.
Comments (3)
-
reporter -
reporter - attached offsetWithCeilFix.patch
Found the issue. Even though the sheet was displaying an integer rounded up from the calculated max value the sheet was storing it as a fraction, which caused issues trying to use the last charge. Easy fix with Max.ceil().
-
repo owner -
assigned issue to
-
assigned issue to
- Log in to comment
Actually there seems to be a bug in my patch. You can’t remove all the used charge markers from abilities that use the offset in their scaling for some reason. Wouldn’t recommend merging it as is.