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

need help with a multiple attack roller macro

hey brains trust.  

anyone help me out here.  i want a macro that when i have a bunch of archers or other mass attack situation where i can input 

- the number of d20's (attacks)
- the total attack mod for the shooter 
- the target AC 

and then have it spit out the seperate rolls and how many success. 


I can do it with the dice roller on the toolbar (image below) but want a macro to make it accessible quickly when i need it.

 


and go!

June 21 (5 years ago)
Oosh
Sheet Author
API Scripter

Which sheet are you using? Do you need an advantage/disadvantage query?

Short of using the API a standard macro cannot group multiple d20 rolls and give you the results separately. You could probably build a macro to roll the separate roll d20 but it would be static (it could use the same bonus). However that can get complicated and is not going to save on chat spam. You might look into Powercards Script as it can do like what you would want being a pro user. 

June 21 (5 years ago)

Edited June 21 (5 years ago)
Oosh
Sheet Author
API Scripter

Here's an example macro, if you save this as an Ability macro on a test character and run it it will give you an example output for multiple rolls. This is for Scorching Ray, not for your specific use, but if the general layout it what you're looking for it's easy to tweak to include a Queried modifier and @{target|npc_ac} call, and then do a custom damage roll macro. The advantage is a huge saving on screen space, but there is only ONE check for advantage/disadvantage, rather than a per-roll query. Not a huge issue, since you can adjust the number of attacks ("spell level" in this example macro) and roll 4 normal and  5 advantage or as required.

The "Spell Level" query is a pretty easy modification to "Number of Attacks to roll".


This is for 5E - if you are not using 5E, it can be adjusted for the default template.

&{template:npcaction}{{rname=Scorching Ray}} {{name=Target: target}} {{description=**Ray 1: ** ?{Advantage?|No,[[1d20 + @{spell_attack_bonus} ]]|Yes,[[2d20kh1 + @{spell_attack_bonus}]]|
Disadvantage,[[2d20kl1 + @{spell_attack_bonus}]]}
?{Cast at what level?|2,**Ray 2: **?{Advantage?}
**Ray 3: **?{Advantage?}|
3,**Ray 2: **?{Advantage?}
**Ray 3: **?{Advantage?}
**Ray 4: **?{Advantage?}|
4,**Ray 2: **?{Advantage?}
**Ray 3: **?{Advantage?}
**Ray 4: **?{Advantage?}
**Ray 5: **?{Advantage?}|
5,**Ray 2: **?{Advantage?}
**Ray 3: **?{Advantage?}
**Ray 4: **?{Advantage?}
**Ray 5: **?{Advantage?}
**Ray 6: **?{Advantage?}|
6,**Ray 2: **?{Advantage?}
**Ray 3: **?{Advantage?}
**Ray 4: **?{Advantage?}
**Ray 5: **?{Advantage?}
**Ray 6: **?{Advantage?}
**Ray 7: **?{Advantage?}|
7,**Ray 2: **?{Advantage?}
**Ray 3: **?{Advantage?}
**Ray 4: **?{Advantage?}
**Ray 5: **?{Advantage?}
**Ray 6: **?{Advantage?}
**Ray 7: **?{Advantage?}
**Ray 8: **?{Advantage?}|
8,**Ray 2: **?{Advantage?}
**Ray 3: **?{Advantage?}
**Ray 4: **?{Advantage?}
**Ray 5: **?{Advantage?}
**Ray 6: **?{Advantage?}
**Ray 7: **?{Advantage?}
**Ray 8: **?{Advantage?}
**Ray 9: **?{Advantage?}|
9,**Ray 2: **?{Advantage?}
**Ray 3: **?{Advantage?}
**Ray 4: **?{Advantage?}
**Ray 5: **?{Advantage?}
**Ray 6: **?{Advantage?}
**Ray 7: **?{Advantage?}
**Ray 8: **?{Advantage?}
**Ray 9: **?{Advantage?}
**Ray 10: **?{Advantage?}|
0, }

[Roll Damage](~bob|ScorchDmg)
}}



June 21 (5 years ago)
David M.
Pro
API Scripter

Would this work for you?

https://app.roll20.net/forum/post/4608575/trying-to-get-a-macro-to-properly-work-one-that-rolls-for-multiple-hits-and-then-for-multiple-instances-of-damage




David M. said:

Would this work for you?

https://app.roll20.net/forum/post/4608575/trying-to-get-a-macro-to-properly-work-one-that-rolls-for-multiple-hits-and-then-for-multiple-instances-of-damage



aahh mate that is EXACTLY what i was looking for.  perfect.  thanks to everyone who responded.  LOVE this community




June 21 (5 years ago)
David M.
Pro
API Scripter

Awesome!