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

Floor inside of an inline roll

I'm not sure if what I am trying to accomplish is possible but I am trying to roll a number of dice that is variable to a character's level. I am using floor to remove the decimals as [[(3/2)d6]] will roll 2 dice. However when I put floor in front: [[floor(3/2)d8]] I get an error, am I doing something wrong?
1415840083

Edited 1415840119
Gauss
Forum Champion
Floor is calculated after rolling dice. If you would like it to round down without floor use the following: [[((3/2)-0.5)d8]]
So, if I want to do this with something that increases every 6 levels, I would need to do something like this: [[((@Level/6)-(1/6))d6]]?
1416264181
The Aaron
Roll20 Production Team
API Scripter
[[ ((@{Level}/6)-.5)d6 ]] The number of dice rolled is rounded up when a floating point number is supplied. [[(1.5)d6]] rolls 2d6, [[(1.499999)d6]] rolls 1d6. Here's a table that shows this: Level /6 -0.5 Rounded 1 0.17 -0.33 0 2 0.33 -0.17 0 3 0.50 0.00 0 4 0.67 0.17 0 5 0.83 0.33 0 6 1.00 0.50 1 7 1.17 0.67 1 8 1.33 0.83 1 9 1.50 1.00 1 10 1.67 1.17 1 11 1.83 1.33 1 12 2.00 1.50 2 13 2.17 1.67 2 14 2.33 1.83 2 15 2.50 2.00 2 16 2.67 2.17 2 17 2.83 2.33 2 18 3.00 2.50 3 19 3.17 2.67 3 20 3.33 2.83 3 So, you can see that the Rounded Column will go from rolling 0 dice to 1 die at 6th level, 2 dice at 12th level, 3 dice at 18th level, etc. If you didn't subtract the .5, you'd start rolling 1 die at 3rd level. Hope that helps!!
Thanks, that helps a lot.
1416264525
The Aaron
Roll20 Production Team
API Scripter
We aim to please! =D