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 .
×

Simple help with scaling damage on level, specifically Fire Bolt (5E)

Hi, I'm trying to implement the number of dice being rolled for Fire Bolt automatically increasing as level goes up, and I'm almost there. I'm using the  basic if/else statement by Greg S.  to check if the character is above level 5, and increase by 1d10 for every 6 levels above that.  The closest I got was this: {[[{5,@{level}}dh1 -5 +1]], 0}dl1 * (((@{level}+1)/6)d10) which outputs the correct number of die for some levels, but not all, due to rounding. So of course I look up rounding functions and find floor(x) which is exactly what I need: {[[{5,@{level}}dh1 -5 +1]], 0}dl1 * ({floor((@{level}+1)/6)})d10 which only outputs as the rounded value, and not the d10s (i.e. for 11 it will give 2 as an output instead of 2d10). I'm sure there's an easy fix I just don't know about. Any help would be appreciated!. 
1612985474
GiGs
Pro
Sheet Author
API Scripter
Firstly: do you need to check if the level is above 5? If the macro is only used by a character who is level 5 or above, you dont need to check it. Secondly your floor calculation shouldnt be inside curly brackets. Try this * (floor((@{level}+1)/6))d10 or * [[floor((@{level}+1)/6)]]d10
Hi, thanks GiGs; it works perfectly! I'm pretty new to Roll20, and guessed it would be something simple. Thanks. It does need to check if the level is above 5, as they are currently level 4, and this is just preparation for the future.
1613001226
Oosh
Sheet Author
API Scripter
Which character sheet are you using? The Roll20 5e sheet has Cantrip scaling built in.