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

Non-sequential Scaling Modifiers using variable attributes

I'm looking to set up my weapon macro to scale it's bonuses properly according to the value of an attribute. However, the scaling doesn't follow a sequential pattern. It's for a weapon with the Psychic property so my weapon's enhancement is based on the current total of my PsiPoints attribute. 1-4 +1 5-29 +2 30-79 +3 80-129 +4 130+ +5 I thought I could use something like (@{PsiPoints}>1)+(@{PsiPoints}>5)+(@{PsiPoints}>30)+(@{PsiPoints}>80)+(@{PsiPoints}>130) but it doesn't work since the < > operators only function off actual dice rolls... and making them all roll any sort of dice would give broken and misleading results.
Something like this should work: floor({@{PsiPoints}, 1}kl1 / 1) + floor({@{PsiPoints}, 5}kl1 / 5) + floor({@{PsiPoints}, 30}kl1 / 30) + ...
Thanks, that's exactly what I needed.
Ok, so bringing this topic back up... is there a way to simplify this down? The string of commands gets the result I'm after, however, when the results of the individual dice rolled in the attack need to be looked at (such as deducting resisted or immune damage types) it adds an excessive amount of bulk to the header and pushes the actual rolls off the bottom of the page when mousing over an in-line roll
1415284946
The Aaron
Roll20 Production Team
API Scripter
Probably not without writing something custom in the API. Sounds like a great suggestion though. It would be nice if you could define rollable tables in ranges and then consult the range with a number to get it's value.