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

how to roll half an attribute dice rounding down

I have a character sheet with an attribute defined of CASTER = 7 I want to make a macro that calls that CASTER attribute and rolls a number of dice equal to half that, rounding down. (@{CASTER}/2)d6 works, but it rounds up. So with CASTER =7, it returns 4d6 floor(@{CASTER}/2)d6 does not work. It takes CASTER =7, divides that by 2, rounds down, doesn't know what to do with that d6 after the ), so it returns 3 any way to do this?
1766114925
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Wrap the floor expression in inline roll brackets: [[floor(@{CASTER}/2)]]d6
Huzzah, that worked! I was not aware you could run multiple calculations of square brackets within square brackets. so [[1d6+[[floor(@{CASTER}/2)]]d6]] with CASTER = 7 properly calculates the 7/2 first (returning 3), then uses that 3 as the number of d6s to roll. And the macro returns 1d6+3d6 as intended.  Thank you.