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

Multiple zombie/ghoul attack macro

How do I multiply damage by number of hits? ‘/em orders her ?(Sisters Primal|3) Sisters Primal to attack! [[ (?(Sisters Primal)d20+4)>?(AC|16) ]] of them manage to hit for [[ (2d4+2)*]]
1675891325

Edited 1675891685
GiGs
Pro
Sheet Author
API Scripter
Probably the best way is using Resusing Rolls and a RollTemplate, like so: &{template:default} {{name=?{Sisters Primal|3} Sisters Primal Attack!}} [[ [[{?{Sisters Primal}d20+4}>?{AC|16} ]] * [[2d4+2]] ]] {{hit=$[[0]] of them manage to hit}} {{total damage=$[[2]]}} However, the damage roll is rolled only once - not once per attack. For that, you'd need a much complicated roll and would have to estimate the maximum range of Sisters Primal, and build a query that accounts for every possible number. This, if there could be 5 at most, you would have: ?{Sisters Primal| 1, -- full macro for a single attack --| 2, -- full macro for two attacks --| 3, -- full macro for three attacks --| 4, -- full macro for four attacks --| 5, -- full macro for five attacks --} This is because roll20 cant repeat something X number of times, where X is unknown. PS: your queies were using ( ) brackets, but they need to be { } brackets.
Thank you so much! I don't think it will be an issue if the damage is only rolled once tbh.
Because the damage per hit is 2d4+2 it's possible to use the trick Rolling multiples of dice plus modifier . With that trick you could roll damage per hit instead of only once. 2d4+2 can be equivalently rewritten as 2d5r1 and that can be done X times by using (X*2)d5r1 This would update GiGs' macro as &{template:default} {{name=?{Sisters Primal|3} Sisters Primal Attack!}} [[([[{?{Sisters Primal}d20+4}>?{AC|16} ]]*2)d5r1]] {{hit=$[[0]] of them manage to hit}} {{total damage=$[[1]]}} However it does prevent 3D dice from working since it cannot roll d5's
1675902100
GiGs
Pro
Sheet Author
API Scripter
2d4+2 can be equivalently rewritten as 2d5r1 That's an interesting suggestion.