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

Making decisions based on dice roll results in macros

I am working on Coverting D&D Onslaught Board Game to Roll20.  My biggest issue is this in a macro Player attacks by rollling 2d20.  If either of the two dice is a nat 20, then it is a critical hit. If either of the two dice is not a 20, but one of them is a nat 1, the attack misses reguardless of other die roll. If neither the higher roll is the attack roll. Examples:    20 & Anything else = Critical Hit 1 & anything beside a 20 + miss Any other combo is rolled with advantage. The first one and the last one are easy to do in macro as they are determined by /roll 2d20kh1, but that does not consider if the die is a 1 or not. Thoughts?                  
1682567881

Edited 1682598766
timmaugh
Forum Champion
API Scripter
I can do this with metascripts: !&{template:default}{{name=Onslaught Attack}}{{Roll 1=[[1d20]]}}{{Roll 2=[[1d20]]}}{{Result={&if $[[0]] = 20 || $[[1]] = 20}**Critical Hit!**{&elseif $[[0]] = 1 || $[[1]] = 1}**Miss!**{&else}{&if $[[0]] > $[[1]]}$[[0]]{&else}$[[1]]{&end}{&end}}}{&simple} That requires ZeroFrame and APILogic. Here are examples of the output:
1682589325
GiGs
Pro
Sheet Author
API Scripter
You have to use a script, like Tim suggests. If you want to do this without a script, you need to show the numbers and let the GM and players decide, the way you would at a game table.
Thank you both