Wow. This script is simply amazing. It has sped up so many things for my playgroup that it almost doesn't feel like we're playing on roll20 anymore! So thank you so much for making this! I am currently trying to streamline the combat macros we are using so that the most common actions can be done at the touch of a button (and a few confirmation boxes), but I'm a bit stumped as to making a macro that can handle several attacks with all of our group's special cases. I currently have a macro that works wonderfully when it comes to making a single attack. It checks for crits and confirms them, deals damage depending on the type of attack, etc. And it does it's job wonderfully (though I will be making it look nicer at a later point, it's fairly basic now) But it has gotten rather big, and when I tried to basically copy the same rows of texts with different variables for a second attack I noticed it simply ran for a certain amount of lines, and then sorta... stopped. After some debugging I concluded that the macro ran just fine, but became too big and/or too convoluted so likely failed somehow. What I am wondering is if anyone has done anything similar and has any ideas on doing this that doesn't involve making a bunch of rolls and tons of conditional statements? Or perhaps some pointers to reduce the clutter down to a few rows of checks per roll? What follows is the macro I am using currently for a single attack. I use hidden rolls at the beginning to be able to make the rolls and then be able to access the ones that are relevant when the time comes, kinda like variables I guess. Perhaps this is a bad way of using them? Is there a way to access the actual roll at a later point and not just the total? Then, for the actual hits, you can see that they come in pairs, checking for the same conditions. This is because I couldn't figure out if there was a way to use the alterbars command right after another tag, so first I have the text saying what type of hit and damage dealt, then I have a separate row which actually changes the health. If anyone has any pointers I'm all ears! !power {{ --name|Ranged Attack! --$test2 |?{Sneak attack? 1 for yes, 0 for no.|1|0} --$test3 |?{Haste? 1 for yes, 0 for no.|0|1} --$test4 |?{Special ammo? 1 for yes, 0 for no.|0|1} --$test5 |?{Additional to Hit modifier?|0|1|2|3|4|5|6|7|8|9|10|-1|-2|-3|-4|-5|-6|-7|-8|-9|-10} --hroll|[[ [$Atk1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo? 1 for yes, 0 for no.} + ?{Haste? 1 for yes, 0 for no.} + ?{Sneak attack? 1 for yes, 0 for no.} * 5 ]][[ [$Crit1] 1d20 + ?{Additional to Hit modifier?} + 16 + ?{Special ammo? 1 for yes, 0 for no.} + ?{Haste? 1 for yes, 0 for no.} + ?{Sneak attack? 1 for yes, 0 for no.} * 5 ]][[ [$Dmg1] 1d4 + 7 * ?{Special ammo? 1 for yes, 0 for no.} + 1 + ?{Sneak attack? 1 for yes, 0 for no.}*5d6]] --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Atk1 < @{target||bar3} ?? First attack Missed|**[^Atk1.total], You missed!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Atk1 < @{target||bar2} ?? First attack Missed|**[^Atk1.total], You missed!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Atk1 >= @{target||bar3} ?? First attack Hit!|**[^Atk1.total], You Hit! Dealing [^Dmg1.total] damage!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Atk1 >= @{target||bar3} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1.total] _show|all --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Atk1 >= @{target||bar2} ?? First attack Hit!|**[^Atk1.total], You Hit! Dealing [^Dmg1.total] damage!** --?? $Atk1.base <> 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Atk1 >= @{target||bar2} ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1.total] _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[5]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[12]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[5]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[12]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[10 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-10 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[24]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 0 AND $Crit1.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-24 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[5 + 30]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 30 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Miss [^Crit1.total]. Dealing [[12 + 30]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 < @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 30 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[5 + 30 ]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-5 + 30 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.total] and Hit [^Crit1.total]. Dealing [[12 + 30 ]] + 1d4 Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base <> 20 AND $Crit1 >= @{target||bar3} AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-12 + 30 + 1d4 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[70 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 0 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-70 _show|all --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? First attack Crit!|**Crit [^Atk1.base] and Crit [^Crit1.base]. Dealing [[84 ]] Damage. Roll on the Crit table with a [[^Atk1.total] - [^Atk1.base] ] modifier** --?? $Atk1.base == 20 AND ?{Sneak attack? 1 for yes, 0 for no.} == 1 AND $Crit1.base == 20 AND ?{Special ammo? 1 for yes, 0 for no.} == 1 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-84 _show|all }}