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 apply a level cap to Roll Template for a spell

I am trying to use the cool new roll templates for spells. I wanted to know if there is a way to include level caps when applicable. For instance for the SRD spell Burning hands you could use {{notes=Targets in the 6 or 7 squares take [[@{casterlevel}d4]] fire damage}}. Except that the spell stops improving after level 5. So, how do you apply that automatically. It seems like there should be MAX(@casterlevel},5) function or something similar. Am I just missing something in the docs? Thanks!
1426115672
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Try: /r [[({@{casterlevel},5}kl1)]]d4
1426595234

Edited 1426595411
if you want the roll to be fully inline then you'll need something more along the lines of [[{((@{casterlevel}/2)-0.5)d4}kh3+{(@{casterlevel}/2)d4}kl2]] This will roll half your casterlevel in dice for each side of the equation and then after CL5 it will keep only the highest 3 on the first half and the lowest 2 on the second half... you can switch which side keeps more if you wish... it's not a perfect solution but it's the most reliable option when it comes to inline rolls.... Due to how the system rounds fractional dice rolls a CL 1 character will still only roll 1d4 with this since the first one will output as 0d4 and the second as 0.5d4 which will round up to 1d4. CL2 will roll 0.5d4+1d4 etc.... at least until we can get official support for nested inline rolls...
Thanks guys. I decided to just hard code them for now to not mess with the random feel. If they code nested inline rolls, do you think the macros for the SRD spells will be put in the Roll20 Compendium?