One of the most useful things you can do in macros is set a maximum or minimum, but the way to do it is convoluted. Some systems use "roll some dice, and keep the highest two". You'd represent that with the "keep highest" symbol, kh. /roll 7d6kh2 You can also put dice into groups. Say, roll 3d6 twice, and keep the highest set. To group dice in this way, you need to use {}, like so /roll {3d6,3d6}kh1 So you can use this approach to simulate a Minimum and Maximum function. Like in your recoil example, you want to treat any result below 0, as zero. Ideally, you'd do it like this: /roll {(15-3d6)/2,0}kh1 The problem is that you cant mix dice and numbers in a { } group. You have to use both dice, or both numbers. But by using 0d0 you can trick roll20 into thinking you rolled dice. So this macro will give you the amount you hit by, and treat all misses as zero. /roll {(15-3d6)/2,0d0}kh1 By the way, in writing this, I realised I made a mistake in the above macro I posted earlier, since it assumes a hit exactly is a miss. I'll correct that at the end. You can nest the above calculation in another group, to set a maximum. If ROF is 5 /roll {{(15-3d6)/2,0d0}kh1,0d0+5}kl1 In this case kl means keep lowest, so if you hit with more than 5 rounds, its set to a max of 5. (Note the syntax above isn't necessarily accurate, I'm typing this to explain, not produce robust code. The code below is accurate,) So, fixing that error I made earlier. we need to treat a hit exactly as a positive number, and all misses as 0. /roll [[{{floor((?{Skill|10}+2-3d6)/?{Recoil|2}),0d0}kh1,0d0+?{ROF|5}}kl1*2]]d6 The above calculation replaces round with floor (round towards zero) and adds a +2 to make the calculation work. Here, a miss results in 0 dice, a hit by 0-1 gets 1 hit, a hit by 2-3 gets 2 hits, 4-5 3 hits and so on, assuming Recoil 2. You have to surround the entire calculation in inline roll brackets [[ ]] to return a number you can use with the d6 at the end.