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(x/y)d8 does not work

I want to roll a number of dice equal to character level divided by 2 rounded down. I tried: [[floor(@{selected|level}/2)d8]] but the result is always the level divided by 2. It does not roll. Is there something wrong, or does it just not work?
1524215778

Edited 1524216077
Ziechael
Forum Champion
Sheet Author
API Scripter
Try: [[ [[floor(@{selected|level}/2)]]d8 ]] Although you may run into issues if their level is 1 as 0d8 is pointless, in which case you can use the  kh syntax to ensure at least 1d8 is rolled: [[ [[ {floor(@{selected|level}/2),1}kh1 ]]d8 ]]
Thanks! Not so pointless as it may seem, it's for the channel energy (1d6 + 1d6 for every 2nd caster level after the first.. 1d6 at level 1 and 2, 1d6+1d6 at 3 and 4, 1d6+2d6 at 5 and 6..) Yes, I know I have to substract 1 from the level first, but I wanted to keep it simple for the example here ;)