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

Is there a MIN or a MAX function?

Or, if not, is there any other way that I can limit dice rolls for untrained knowledge checks to 10?
You can use the kh/kl (keep highest/lowest) dice syntax on groups: /r {1d20+3,0d1+10}kl1
Sure, but what I want is to do min(10,[[1d20+@Kror|Bluff]]) and have either the roll result or 10, whichever is lower.
So you want /roll [[{0d1+10, 1d20+@{Kror|Bluff}kh1]]
1409791093

Edited 1409791819
Thanks HB! I didn't know that it was possible to use the keep function to compare two separate values like that. Apparently I should have read manveti's comment better, because now I see that he explained exactly that to me. Thank you both; I now have my Knowledge skill macros working the way I wanted.
1409846995
Sam
Pro
Sheet Author
This needs to be added to the wiki, I had no idea roll20 was capable of min/max rolls.
1409849821
Lithl
Pro
Sheet Author
API Scripter
Samuel T. said: This needs to be added to the wiki, I had no idea roll20 was capable of min/max rolls. It's on the wiki: <a href="https://wiki.roll20.net/Dice_Reference#Grouping_Rolls" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Grouping_Rolls</a>
1409860041
Sam
Pro
Sheet Author
Ah true, but nothing calls it out as a way to do min / max functions.
1409868208

Edited 1409868223
Lithl
Pro
Sheet Author
API Scripter
I suppose that's true. But, it's a wiki: you can edit it and make it better! =)