Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Calculating Carrying Capacity - Need Exponents

I've boiled down the carrying capacity formula from D&D 3.5, however I require the ability to use exponents, because a Strengths of 20 and higher, the values are just the 10-19 values, multiplied by 4^(floor(@{STR}/10)-1). I've looked into the CSS Wizardry thread, while there is a rudimentary pow(x,y), but it looks like calling it requires you to know both numbers at design time. I know X will be 4, however Y won't be known until run time.
1420586710
Lithl
Pro
Sheet Author
API Scripter
@{STR} is going to be in the range [10,30]? I think the following gets the right values, but I'm not 100% on that: 9 * floor(@{STR}/10)-1 * floor(@{STR}/10)-1 / 2 - 21 * floor(@{STR}/10)-1/ 2 + 7
Creatures can have over 30 STR simply by virtue of their size. Colossal creatures get a +32 to Strength from size. I understand the point, though, and I was hoping to avoid doing that. The inability to do exponents means I'll have to apply your advice from another question I asked and catch the changed STR value and send the carrying capacity to the character sheet from the API.