There was a macro for this posted over on the roll20 discord a few days ago by admiralnlson. It's pretty scary: [[[[{1e3,14}<[[{?{Step},0}kh1%22]]+floor(([[{?{Step},0}kh1]])/22)]]d20!+[[{0,1,1,2,6,10}=[[{?{Step},0}kh1%11]]-{-1,1}=[[{?{Step},0}kh1]]+floor(([[{?{Step},0}kh1]]-3)/22)]]d10!+[[{0,5,9}=[[{?{Step},0}kh1%11]]+{1,2}=[[{?{Step},0}kh1]]+floor(([[{?{Step},0}kh1]]-3)/22)]]d8!+[[{-1,8}=[[{?{Step},0}kh1%11]]-{0,1,5,6}=[[{?{Step},0}kh1%11]]+{-1,1}=[[{?{Step},0}kh1]]+1]]d[[4+2*{4,8,9,10}=[[{?{Step},0}kh1%11]]+8*({2,7}=[[{?{Step},0}kh1%11]]*(1-{-1,2}=[[{?{Step},0}kh1]]))]]!-[[{1,2}=[[{?{Step},0}kh1]]*(3-[[{?{Step},0}kh1]])]]+?{Modifier?|0}]] Here's a gif of it in action (the gif doesnt include the modifier) Fair warning: this will be quite slow for large step amounts. If you need to include the dice roll in a query, this even more horrifying version is the one to use [[[[{1e3&#44;14&#125;<[[{?{Step&#125;&#44;0&#125;kh1%22]]+floor(([[{?{Step&#125;&#44;0&#125;kh1]])/22)]]d20!+[[{0&#44;1&#44;1&#44;2&#44;6&#44;10&#125;=[[{?{Step&#125;&#44;0&#125;kh1%11]]-{-1&#44;1&#125;=[[{?{Step&#125;&#44;0&#125;kh1]]+floor(([[{?{Step&#125;&#44;0&#125;kh1]]-3)/22)]]d10!+[[{0&#44;5&#44;9&#125;=[[{?{Step&#125;&#44;0&#125;kh1%11]]+{1&#44;2&#125;=[[{?{Step&#125;&#44;0&#125;kh1]]+floor(([[{?{Step&#125;&#44;0&#125;kh1]]-3)/22)]]d8!+[[{-1&#44;8&#125;=[[{?{Step&#125;&#44;0&#125;kh1%11]]-{0&#44;1&#44;5&#44;6&#125;=[[{?{Step&#125;&#44;0&#125;kh1%11]]+{-1&#44;1&#125;=[[{?{Step&#125;&#44;0&#125;kh1]]+1]]d[[4+2*{4&#44;8&#44;9&#44;10&#125;=[[{?{Step&#125;&#44;0&#125;kh1%11]]+8*({2&#44;7&#125;=[[{?{Step&#125;&#44;0&#125;kh1%11]]*(1-{-1&#44;2&#125;=[[{?{Step&#125;&#44;0&#125;kh1]]))]]!-[[{1&#44;2&#125;=[[{?{Step&#125;&#44;0&#125;kh1]]*(3-[[{?{Step&#125;&#44;0&#125;kh1]])]] +?{Modifier?&#124;0&#125; ]]