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

Trying to make a "but no greater than" Macro

I'm working on a fairly simple macro, pulling on a sheet function, it being: [[ 1d8+(@{casterlevel} ]] However, I want @{casterlevel} to never be able to exceed 10. Even if my caster level is 20, it should only add 10. Is there any way to do this? I'm sorry if this is answered a lot, but I just wasn't sure what to even search for other than "greater than" and "no greater than", but nothing I found seems to relate, or if it does, I don't understand it.
1520900043

Edited 1520900120
vÍnce
Pro
Sheet Author
[[ 1d8 + {@{casterlevel},10}kl1 ]] <a href="https://wiki.roll20.net/Dice_Reference#Grouping_Ro" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Grouping_Ro</a>...
1520900067

Edited 1520900089
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yes, the keep lowest syntax does what you want: [[1d8+[[ {@{casterleve},10}kl]] ]] or [[1d8+[[ {@{casterlevel}d1,10d1}kl]] ]] Ninja'd by Vince :)
1520900216
vÍnce
Pro
Sheet Author
I didn't know we were racing.&nbsp; Otherwise I would have tried harder.&nbsp; ;-P
Thanks a lot guys, I'll try that out! :3