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

Rolling a lot of eldritch blasts at advantage in a macro

I am making a character in a homebrew high-level game that can roll up to 28 eldritch blasts at a time and usually has advantage. The current macro I am using to track hits is: " Attack rolls for ?{Number of Attacks} beams against ?{Enemy AC} AC /roll {?{Number of Attacks}d20s+20}>?{Enemy AC}" This works well when rolling flat, but I cannot get it to work at advantage. Using kh1 just makes it keep the highest of all of the attacks. Any advice?
1735033637

Edited 1735033673
There is no easy way to make n complex rolls via a macro - you cannot multiply iterations in macro, only the numbers in those iterations. So you'd end up having to do something like {?{Number of Attacks|1,2d20kh1|2,2d20kh1,2d20kh1|3,2d20kh1,2d20kh1,2d20kh1|...,more}}>?{enemy AC} up to the maximum number of rolls you can make.
There is a workaround for advantage thats works by rerolling misses once. /r ?{Number of Attacks|28}d20ro<[[{1,19,?{Enemy AC|10}-20-1}k2dh1]]>[[{2,20,?{Enemy AC}-20}k2dh1]] The limits have been set so a natural 1 is always considered a miss and a natural 20 a hit (after advantage). To make this work the +20 hit bonus is subtracted from the target numbers rather than added to the roll. Whislt this is fine for hits, crit chances are lowered since only misses get an advantage roll, there is an open suggestion for custom dice syntax that could handle complex rolls like this easily.
1735079998

Edited 1735081131
RainbowEncoder said: There is a workaround for advantage thats works by rerolling misses once. /r ?{Number of Attacks|28}d20ro<[[{1,19,?{Enemy AC|10}-20-1}k2dh1]]>[[{2,20,?{Enemy AC}-20}k2dh1]] The limits have been set so a natural 1 is always considered a miss and a natural 20 a hit (after advantage). To make this work the +20 hit bonus is subtracted from the target numbers rather than added to the roll. Whislt this is fine for hits, crit chances are lowered since only misses get an advantage roll, there is an open suggestion for custom dice syntax that could handle complex rolls like this easily. This got me thinking, by removing the criticals from the pool first, we can get around that issue - and then we can bring up the criticals at the end with a reused roll: [[(?{Numer of Attacks}-[[?{Numer of Attacks}d20ro<19=20]])d19ro<[[{1,19,?{Enemy AC|10}-20-1}k2dh1]]cs>20>[[{2,20,?{Enemy AC}-20}k2dh1]] ]] hits, plus $[[0]] criticals.
1735095762
David M.
Pro
API Scripter
Since you have a Pro sub, I'm assuming mod scripts are on the table. The example below is a modification of an old Animate Objects attack Scriptcard that I put together a while ago.  Queries for num attacks, and bonuses for attack and damage, and Normal/Adv/DisAdv rolls. Checks against the target token AC and calculates damage individually (including crits) and then totals them all at the end. The queries currently have  default values in them but those can be changed as needed. !scriptcard {{ --#title|Eldritch Blast --#targetToken|@{target|token_id} --=AttackCount|?{How Many Attacks?|10} --=AttackBonus|?{Attack Bonus?|8} --=DamageBonus|?{Damage Bonus?|4} --=TargetAC|@{target|npc_ac} --?[$TargetAC.Total] -gt 0|DoneWithAC --=TargetAC|@{target|ac} --:DoneWithAC| --=DisplayCount|1 --=TotalDamage|0 --&rtype|?{Attack Type?|Normal,Norm|Advantage,Adv|Disadvantage,DisAdv} --?"[&rtype]" -inc "Norm"|[ --&d20|1d20 --&rollType| --]| --?"[&rtype]" -inc "Adv"|[ --&d20|2d20kh1 --&rollType|[#009900][b](Adv)[/b][/#] --]| --?"[&rtype]" -inc "Disadv"|[ --&d20|2d20kl1 --&rollType|[#990000][b](DisAdv)[/b][/#] --]| --#leftsub|Roll Type:[&rtype] --&AttackRoll|[&d20] + [&AttackBonus] --:Loop| -->FireMissile|[&AttackRoll];1d10;[$DamageBonus] --=DisplayCount|[$DisplayCount] + 1 --?[$DisplayCount] -le [$AttackCount]|Loop --+[c]~~~~~~~~~~~~[/c]| --+Total|Total damage is [$TotalDamage] --X|Exit macro --:FireMissile| attRoll, damRoll, damBonus --=AttRoll|[%1%] -->ResolveAttack|[%2%];[%3%] --?[&Result] -inc "Miss" -or [&Result] -inc "Fumble"|[ --+[$DisplayCount.Total]:|[b]Roll:[/b][$AttRoll] [&Desc] --]|[ --+[$DisplayCount.Total]:|[b]Roll:[/b][$AttRoll] [&Desc] [b]Dmg: [/b][$DamRoll] --]| --<| --:ResolveAttack| --?[$AttRoll.Base] -eq 20|Crit --?[$AttRoll.Base] -eq 1|Fumble --?[$AttRoll.Total] -ge [$TargetAC.Total]|Hit --&Result|Miss --&Desc|[#990000][b]( [&Result] )[/b][/#] --=DamRoll|0 --^Final| --:Fumble| --&Result|Fumble --&Desc|[#990000][b]~~[&Result]~~[/b][/#] --=DamRoll|0 --^Final| --:Hit| --&Result|Hit --&Desc|[b]( [&Result] )[/b] --=DamRoll|[%1%][BASE]+[%2%][MOD] --=TotalDamage|[$TotalDamage] + [$DamRoll] --^Final| --:Crit| --&Result|Crit!!!! --&Desc|[#009900][b][&Result][/b][/#] --=DamRoll|[%1%][BASE] + [%1%][CRIT] + [%2%][MOD] --=TotalDamage|[$TotalDamage] + [$DamRoll] --^Final| --:Final| --<| }} Example output with 27 attacks at advantage:  
[[(?{Number of Attacks|28}-[[?{Number of Attacks}d20?{Advantage?|Normal,=20]])d19|Advantage,ro<19=20]])d19ro<[[{1,19,?{Enemy AC|10}-20-1}k2dh1]]|Disadvantage,ro=20=20]])d19ro>[[{2,20,?{Enemy AC|10}-20}k2dh1]]}cs>20cf<0>[[{2,20,?{Enemy AC|10}-20}k2dh1]] ]] hits, plus $[[0]] criticals. Added query for advantage, damage would be fairly simple to add too (as a chat button) but I elected to skip it this time.