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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Adding Results together from a MACRO

Hello! i was wondering if there is a way to get this macro &{template:default}{{ Full round =HIT/DAMAGE Gore: [[ 1d20+25 ]] [[4d6+6d6+17+1d6+4d6]] Tail x1  [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tail x2  [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tail x3 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tail x4  [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex1 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex2 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex3 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex4 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex5 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex6 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex7 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex8 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex9 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Tentaclex10 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Wingsx1 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Wingsx2 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Wingsx3 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Wingsx4 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Wingsx5 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Wingsx6 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Wingsx7 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Wingsx8 [[ 1d20+25 ]] [[ 2d8+6d6+17+1d6+4d6 ]] Clawsx1 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Clawsx2 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Clawsx3 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Clawsx4 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Clawsx5 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Clawsx6 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Clawsx7 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Clawsx8 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Clawsx9 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Clawsx10 [[ 1d20+25 ]] [[2d8+6d6+17+1d6+4d6]] Bite [[ 1d20+25 ]] [[4d6+6d6+17+1d6+4d6]] }} To add up the all the damage at the very end! is there a way?
1595474648
GiGs
Pro
Sheet Author
API Scripter
How would the macro know which of the damage results are hits and which are misses and thus dont get counted?
it wouldn't?
1595514729
Oosh
Sheet Author
API Scripter
You could do an attack roll macro: &{template:default} {{name=Multimultiattack}} {{Gore=[[{1d20+25,0d0}kh1>@{target|t1|ac}]] hits}} {{Tail=[[{1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26]] hits}} {{Tentacles=[[{1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26]] hits}} {{Wings=[[{1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26]] hits}} {{Claws=[[{1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26 + {1d20+25,0d0}kh1>@{target|t1|ac}f26]] hits}} {{Bite=[[{1d20+25,0d0}kh1>@{target|t1|ac}]] hits}} {{[Roll Damage](~Macros|BigDamageRoll)}} which links to a damage roll macro (in this case BigDamageRoll saved as an Ability macro on a character sheet called Macros: &{template:default} {{name=Damage Roll}} {{Total Damage=[[ [[[[?{How many Gore/Bite attacks hit?|2}*15]]d6+?{How many Gore/Bite attacks hit?}*17]] + [[ [[?{How many other attacks hit?|30}*2]]d8 + [[?{How many other attacks hit?}*11]]d6 + ?{How many other attacks hit?}*17 ]] ]]}}{{Total attacks hit=[[?{How many other attacks hit?}+?{How many Gore/Bite attacks hit?}]]}} Or, given that it has a billion attacks and does enough damage to outright kill anything, you could simplify the macro down to this: You all died. DM wins.
1595516194
GiGs
Pro
Sheet Author
API Scripter
More seriously you could use the recent discovery of a quirk, like this. I'll just show the first three attacks because I;m not typing all those out!: &{template:default}[[ [[4d6+6d6+17+1d6+4d6]] + [[2d8+6d6+17+1d6+4d6]] + [[2d8+6d6+17+1d6+4d6]] ]] {{name=Full Round Attack: Attack | Damage}} {{Gore=[[ 1d20+25 ]] | $[[0]]}} {{Tail x1 =[[ 1d20+25 ]] | $[[1]]}} {{Tail x2 =[[ 1d20+25 ]] | $[[2]]}}{{Total damage=$[[3]]}} The basic principle: somewhere near the start of the template, you create a special inline roll. Inside this inline roll, you put each damage roll in order, as an inline roll of its own, with + signs between them. For the first three attacks, that looks like [[ [[4d6+6d6+17+1d6+4d6]] + [[2d8+6d6+17+1d6+4d6]] + [[2d8+6d6+17+1d6+4d6]] ]] Then you can refer to those rolls later by using $[[0]], $[[1]], etc. The first roll is 0, the second is 1, and so on - with the total being the number of rolls, in this case $[[3]]. 
1595516824
GiGs
Pro
Sheet Author
API Scripter
Now, you could take it further, and have attack rolls be included. The version below has you use the attack rolls, it asks for a target, and then will roll each attack, report whether it succeeds or fails, and the total damage will be of only those that hit. /w gm &{template:default}[[ [[ {1d20+25}>?{Target|35} ]] *[[4d6+6d6+17+1d6+4d6]] + [[ {1d20+25}>?{Target|35} ]] *[[2d8+6d6+17+1d6+4d6]] + [[ {1d20+25}>?{Target|35} ]] *[[2d8+6d6+17+1d6+4d6]] ]] {{name=Full Round Attack: Attack | Damage}} {{Gore=$[[0]] | $[[1]]}} {{Tail x1 =$[[2]] | $[[3]]}} {{Tail x2 =$[[4]] | $[[5]]}}{{Total damage=$[[6]]}} It's not ideal because doesnt display the actual attack roll, just a 1 for success, and 0 for miss. You have to hover over to see what the roll was: But if you do want to use the total of only blows that hit, this is the way to do it. See the progression in the $[[ ]] numbers, its easy enough to add each extra one. I woyuld have liked to show the attack rolls, but havent figured out a way to get them to display, and have the hit test work. Displaying the attack roll breaks the target comparison, and you end up with something slightly inaccurate: The first one works pretty well though - if you need the actual attack roll, you can hover over the roll sections.
1595563198

Edited 1595563427
Oosh
Sheet Author
API Scripter
GiGs said: I woyuld have liked to show the attack rolls, but havent figured out a way to get them to display, and have the hit test work. Displaying the attack roll breaks the target comparison, and you end up with something slightly inaccurate: Silly GiGs, you just need to use your own trick from the other thread! &{template:default} {{name=Show attack roll}} {{Claw= [[ {[[1d20+25]],0} kh1>[[{?{Target AC|40},27}kh1]] + {[[1d20+25]],0}kh1>[[{?{Target AC|40},27}kh1]] + {[[1d20+25]],0}kh1>[[{?{Target AC|40},27}kh1]] + {[[1d20+25]],0}kh1>[[{?{Target AC|40},27}kh1]] ]] hits, ($[[0]] $[[2]]$[[4]] $[[6]]}} Wrap the attack in [[ ]] to call it later, then use your fiendishly clever group roll trick so it still works with the success operator. This also adds a check to the target AC Query where a hard-coded 26 (natural 1) will always miss. You could get extremely silly and try to get the tallied hit successes to auto-roll damage dice, but calling back to the nested attack rolls would probably cause a wibble attack.
1595563355
GiGs
Pro
Sheet Author
API Scripter
oh of course! haha, nice work.
1595563481
Oosh
Sheet Author
API Scripter
All your work, really. I'd given up on doing useful things with the success operator until your post.