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

Combining two macros... more help please!

1525358144

Edited 1525358188
Hi, I was after some help if possible again! I now have two working macros to help me out when my group are battling a group of relatively low level enemies with lots of attacks... The first macro results in this.... The ??? attack ??? a total of ? times, with ? resulting in a successful hit! Second Macro results in... As a result of the successful hits, you receive ? HP's of damage! I'm happy in answering the few prompts such as damage dice, hit modifier and AC, I also know that this would fall apart if the enemy damage had multiple dice (e.g. 2d6+STR)....However, I need to currently use the 'result' of the first macro in the 'calculation' of the 2nd macro. MACRO 1 - How many hits? /emas The ?{What enemy?|enemies} attack @{target|token_name} (AC @{target|ac}) a total of ?{How many attacks} times, with [[?{How many attacks}d20>[[@{target|ac}-?{modifier}]] ]] resulting in a successful hit! MACRO 2 - How much damage? /emas As a result of the successful hits, you receive [[(?{Number of hits}D?{Damage Dice})+([[?{Number of hits}*?{Damage Mod}]])]] HP's of damage! Is there a way that I could perhaps,..... um... inbed/nest? One macro inside the other? - So the ending result would be.... So in practice it might say... The Bugbears attack Sir Bearington  a total of 6 times, resulting in 4 successful hits which cause a total of 34  HP's of damage! Thanks again!
1525387926
vÍnce
Pro
Sheet Author
Without using an API script (powercards come to mind for something like this) you can't use the results from one macro to "feed" another.  Not what you're asking for, but one option is to just create a macro attack "array" that rolls the X number of attacks and damage all at once and player's/GM just look to see which attack rolls were higher than the target's AC and if so apply the damage rolled. maybe something like; &{template:default} {{name=The ?{What enemy?|enemies} attack @{target|token_name} (AC @{target|ac}) }} {{Attack1=[[ 1d20+?{Attack mod|0} ]] vs AC:[[ @{target|ac} ]] Dmg:[[ 1d?{Damage Dice1d|6}+?{Damage Mod|0} ]]}}  {{Attack2=[[ 1d20+?{Attack mod|0} ]] vs AC:[[ @{target|ac} ]] Dmg:[[ 1d?{Damage Dice1d|6}+?{Damage Mod|0} ]]}} {{Attack3=[[ 1d20+?{Attack mod|0} ]] vs AC:[[ @{target|ac} ]] Dmg:[[ 1d?{Damage Dice1d|6}+?{Damage Mod|0} ]]}} {{Attack4=[[ 1d20+?{Attack mod|0} ]] vs AC:[[ @{target|ac} ]] Dmg:[[ 1d?{Damage Dice1d|6}+?{Damage Mod|0} ]]}} {{Attack5=[[ 1d20+?{Attack mod|0} ]] vs AC:[[ @{target|ac} ]] Dmg:[[ 1d?{Damage Dice1d|6}+?{Damage Mod|0} ]]}} .