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 .
×

Multi Attack Macro Question

1546190532

Edited 1546190897
Hey everyone, I am trying to set up macros for a mass attack, a set amount of archers attacking at the same time vs a set AC. I have everything working except rolling 1d20 multiple times. I am playing dnd 5E and I am a first time poster in the forums, please be kind. I have been searching for a while for a fix. /r [[1d20+?{ToHitMod|0}]]>?{AC|0} This is what I have so far but is there a way to roll the first bit multiple times without copying it out for each attack instance?  The work around I've found is  /r {1d20+?{tohitmod|0},1d20+?{tohitmod|0}, 1d20+?{tohitmod|0},1d20+?{tohitmod|0},1d20+?{tohitmod|0}, 1d20+?{tohitmod|0}}>?{AC|0} but this is clunky. Hopefully someone has a more elegant solution. I have been checking the forum but I haven't found anything about it. The end goal is to take X archers with +Y mods to attack vs an AC Z so it comes out to 1d20+Y>Z rolled X number of times
1546214351

Edited 1546214417
vÍnce
Pro
Sheet Author
Roll a macro, X amount of times (w/out being prompted for the same query each time. thank you).  Seems like it would be an easy task, but alas...  You might have to settle for rolling them all together like you are already doing.  If you tuck the attacks within a roll template you could save a little chat space. This macro would show 5 attacks.  Add/remove to taste. Ignore any additional attacks.  You could also include damage... &{template:default} {{name=Mass Attack}} {{Attack 1= [[ 1d20+?{ToHitMod|0} ]] vs AC:[[ ?{AC|0} ]]}} {{Attack 2= [[ 1d20+?{ToHitMod|0} ]] vs AC:[[ ?{AC|0} ]]}} {{Attack 3= [[ 1d20+?{ToHitMod|0} ]] vs AC:[[ ?{AC|0} ]]}} {{Attack 4= [[ 1d20+?{ToHitMod|0} ]] vs AC:[[ ?{AC|0} ]]}} {{Attack 5= [[ 1d20+?{ToHitMod|0} ]] vs AC:[[ ?{AC|0} ]]}}
1546236614

Edited 1546236682
You might try moving the modifier so that subtracts from the AC, something like this ( I am not sure it will work) /r ?{numberofd20}d20>[[ ?{AC|0} - ?{tohitmod|0} ]]
Thank you both for responding, from what I've read and tried there doesn't seem to be a way to make a simple macro query for multiple single rolls. 
1546332403
GiGs
Pro
Sheet Author
API Scripter
jbokcrusader's suggestion seems to be a pretty elegant way to solve the issue, though it does present the output in an unfamiliar way.