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

What's the syntax to put a cap on bonuses in a macro?

For example, let's say I have something like this: [[1d8+@{casterlevel} ]] And that should give a bonus to the roll based on the level of the character. But I want to put a cap on how far that goes--perhaps no greater than +6. How would I do that?
1439312946

Edited 1439313066
DK Heinrich
Marketplace Creator
Sheet Author
[[ 1d8+{@{selected|casterlevel}, 6}kl1 ]]  will work assuming you have the token with the macro selected. I think you can nuke the selected portion also but all my macro's use it or target so its easiest for me to test using them. EDIT:  kl1 = k.eep l.owest 1 result  your results are (casterlevel) and 6 - so if you are from lvl 1-5 it will pick that result, if you are 6th level or higher it will pick the 6 result -- and in both cases it will add the result to the roll of 1d8.  
Thanks Heinrich, I'll try that out!