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

Mob attack + damage macro using average damage dice?

1592787617

Edited 1592788051
My party is currently about to face a big ol' mob of Duergar next game and I'm looking for an easy way to deal multiple attacks with them using mob attack rules, and also a way for this supposed macro to take average damage dice into account instead of having to roll for each attack hit. Is this possible? Here's what I've been using for attacks. Mass-Attack /roll {?{CR of 1st Attacker|1/8, 2d4dh1|1/4, 1d4|1/2, 2d6dh1|1, 2d4d1|2, 2d8dh1|3, 3d4k1|4, 1d6|5, 2d10dh1|6, 2d6d1|7, 1d8|8, 2d12dh1|9, 1d10|10, 2d8d1|11, 3d8k1|12, 1d12|13, 2d10d1|14, 2d20dh1|15, 3d10k1|16, 2d12d1|17, 3d12k1|18, 1d20|19, 2d30dh1|20, 2d20d1|21, 3d20k1|22, 1d30|23, 2d50dh1|24, 2d30d1|25, 3d30k1|26, 1d50|27, 2d50d1|28, 2d100dh1|29, 1d100|30, 2d100d1}+?{CR of 2nd Attacker|None, 0d0|1/8, 2d4dh1|1/4, 1d4|1/2, 2d6dh1|1, 2d4d1|2, 2d8dh1|3, 3d4k1|4, 1d6|5, 2d10dh1|6, 2d6d1|7, 1d8|8, 2d12dh1|9, 1d10|10, 2d8d1|11, 3d8k1|12, 1d12|13, 2d10d1|14, 2d20dh1|15, 3d10k1|16, 2d12d1|17, 3d12k1|18, 1d20|19, 2d30dh1|20, 2d20d1|21, 3d20k1|22, 1d30|23, 2d50dh1|24, 2d30d1|25, 3d30k1|26, 1d50|27, 2d50d1|28, 2d100dh1|29, 1d100|30, 2d100d1}+?{CR of 3rd Attacker|None, 0d0|1/8, 2d4dh1|1/4, 1d4|1/2, 2d6dh1|1, 2d4d1|2, 2d8dh1|3, 3d4k1|4, 1d6|5, 2d10dh1|6, 2d6d1|7, 1d8|8, 2d12dh1|9, 1d10|10, 2d8d1|11, 3d8k1|12, 1d12|13, 2d10d1|14, 2d20dh1|15, 3d10k1|16, 2d12d1|17, 3d12k1|18, 1d20|19, 2d30dh1|20, 2d20d1|21, 3d20k1|22, 1d30|23, 2d50dh1|24, 2d30d1|25, 3d30k1|26, 1d50|27, 2d50d1|28, 2d100dh1|29, 1d100|30, 2d100d1}}kh2
1592826300
David M.
Pro
API Scripter
Not familiar with mob attack rules, but would this work for you? <a href="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" rel="nofollow">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</a>
David M. said: Not familiar with mob attack rules, but would this work for you? <a href="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" rel="nofollow">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</a> Aye, it seems to work fine, but is there a way I can use it with average damage instead of damage dice for the second damage macro?
1592828804
David M.
Pro
API Scripter
I think this should do it. Using Floor() to round the fractional damage down. If you want to round up, replace "floor" with "ceil" [[floor(?{Number of hits|1}*?{Damage Die|1d4,2.5 |1d6,3.5 |1d8,4.5 |1d10,5.5 |1d12,6.5 |2d4,5 |2d6,7 |2d8,9 |2d10,11 |2d12,13 |3d4,7.5 |3d6,10.5 |3d8,13.5 |3d10,16.5 |3d12,19.5}) + ?{Number of hits|1}*?{Damage bonus|4}]] ?{damage type|bludgeoning|slashing|piercing|fire|acid|cold|lightning|thunder|force|radiant|necrotic}
1592830357

Edited 1592830496
Oosh
Sheet Author
API Scripter
I'd probably consider putting this in a template, just because of the potentially game-wrecking numbers involved. Same math as David M has posted, but a different output: &amp;{template:default} {{name=Mob Attack Roll}} {{Total Damage=[[ floor( ?{Number of hits|1}[HITS] * [[(?{Damage die type|d4,4|d6,6|d8,8|d10,10|d12,12|d20,20}/2+0.5)*?{Damage dice per attack?|1} + ?{Damage bonus|4}]][DMG PER HIT]) ]] ?{damage type|bludgeoning|slashing|piercing|fire|acid|cold|lightning|thunder|force|radiant|necrotic}}}{{Number of successful attacks=?{Number of hits} }} {{Damage per hit=?{Damage dice per attack?}d?{Damage die type}+?{Damage bonus}, $[[0]] average}} with a /w gm at the start if you prefer. A slight mistype in your damage queries with the original macro is going to result in some extraordinary damage - you're more likely to catch a mistake if you can see the breakdown. Of course if it's only NPCs attacking each other, it may not matter and the single output is probably fine. I'm personally terrified of large damage numbers where I can't see the working, though!
1592831844
David M.
Pro
API Scripter
+1 Oosh
Oosh said: I'd probably consider putting this in a template, just because of the potentially game-wrecking numbers involved. Same math as David M has posted, but a different output: &amp;{template:default} {{name=Mob Attack Roll}} {{Total Damage=[[ floor( ?{Number of hits|1}[HITS] * [[(?{Damage die type|d4,4|d6,6|d8,8|d10,10|d12,12|d20,20}/2+0.5)*?{Damage dice per attack?|1} + ?{Damage bonus|4}]][DMG PER HIT]) ]] ?{damage type|bludgeoning|slashing|piercing|fire|acid|cold|lightning|thunder|force|radiant|necrotic}}}{{Number of successful attacks=?{Number of hits} }} {{Damage per hit=?{Damage dice per attack?}d?{Damage die type}+?{Damage bonus}, $[[0]] average}} with a /w gm at the start if you prefer. A slight mistype in your damage queries with the original macro is going to result in some extraordinary damage - you're more likely to catch a mistake if you can see the breakdown. Of course if it's only NPCs attacking each other, it may not matter and the single output is probably fine. I'm personally terrified of large damage numbers where I can't see the working, though! Awesome! A lot cleaner than the previous macro. Do you have one for mob attacks as well as this mob damage one?
One problem I've found with this is that it seems to want to add up fractional averages instead of rounding down the average damage per hit, then adding them up. For example, it's currently it's doing:&nbsp; 1d6+4 average = 7.5 2 out of 5 attacks hit. 7.5 x 2 = 15 Whereas I'm aiming for it to do: 1d6+4 average = 7.5 (rounded down) = 7 2 out of 5 attacks hit. 7 x 2 = 14 Just to prevent it from skipping over the 'always round down' rule.
1592921750

Edited 1592921953
David M.
Pro
API Scripter
You would move the "floor() operation to the die averaging section. Using Oosh's template, try this: &amp;{template:default} {{name=Mob Attack Roll}} {{Total Damage=[[ ?{Number of hits|1}[HITS] * [[ floor( (?{Damage die type|d4,4|d6,6|d8,8|d10,10|d12,12|d20,20}/2+0.5) ) *?{Damage dice per attack?|1} + ?{Damage bonus|4}]][DMG PER HIT] ]] ?{damage type|bludgeoning|slashing|piercing|fire|acid|cold|lightning|thunder|force|radiant|necrotic}}}{{Number of successful attacks=?{Number of hits} }} {{Damage per hit=?{Damage dice per attack?}d?{Damage die type}+?{Damage bonus}, $[[0]] average}}
1592922626
GiGs
Pro
Sheet Author
API Scripter
Note that if you always round down on each individual roll, before creating a total, you are going to be doing lower damage than average. I dont know what system you are using, but if you want to approximate actual damage rolls, you should only do the rounding of the final total, not each individual roll.