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

Minimum and maximum caps on a dice roll

Is there a command to cap a dice roll within certain ranges? Example rolling a d20, any result of 16 to 20 returns as 16, and similar for the other way around, any result 1-4 returns as 4. Either one or the other, or both on the same roll.
You can use Keep/Drop syntax to handle that. A d20 with a minimum and maximum could look like this /r {MIN +0d0, d20, MAX +0d0}k2dh1 As for why the min and max have a +0d0; that's a workaround to let static numbers coexist with rolls. There is an open suggestion to rewrite the dice roller to remove such needless syntax and other quality of life changes, consider adding your voice and vote to it. If you need to do this for multiple dice however it gets a bit janky so you might prefer Rollable tables if the min and max values aren't variable otherwise it'll be a vote for custom dice syntax
Thank you that's exactly what I needed. I got it working for an example of 2d10 (minimum of 6s on each) {1d10,1d10,0d0+6,0d0+6}kh2 Basically adding a 0d0+#  for each dice. Having a simpler CAP-HIGH or CAP-LOW syntax would definitely be useful.