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

round to nearest 10 feet

1597449025

Edited 1597449113
i want to put a line roll into a description of an ability or attack to round to the nearest 10 feet. example: the juvenile kraken flings someone up to 40 ft. in a random direction and if they strike a solid surface they take X dmg for every 10 ft.  my brain doesn't wont to work this our right now, but is this it? [[round(((4d10)/10))*10)]] ceil would give me 10 to 40, floor would return 0 to 30 right?  testing round & fixing the dice rolls to 2,1,1,1 returns 10 and only zero on 1+1+1+1 mechanically, increments of 5 ft. might be nicer on a grid but i think i'm happy enough with ten feet and only one chance of zero feet out of however many. Also if the monster manages to roll four 1's i'm happy for it to drop the victim at it's "feet" for no damage (lucky, lucky character). any cleaner way of rounding to ten?
Are you trying to randomize the distance thrown or the damage taken? If you want to randomize the distance from 10 feet up to 40 feet, rounded to the nearest 10 feet, use [[ [[1d4]] * 10 ]].
Rabulias said: Are you trying to randomize the distance thrown or the damage taken? If you want to randomize the distance from 10 feet up to 40 feet, rounded to the nearest 10 feet, use [[ [[1d4]] * 10 ]]. simple! & thank you - i was overthinking it that was hurting my head :) 
Happy to help! And if you do want to do increments of 5 feet, use [[ [[1d8]] * 5 ]].