Roll20 has one problem with the Macro system a LOT of people want fixed.  but it just never seems to happen.  So I literally had to do something…

The reason, is I am playing in Roll20 a Werewolf Archer / Assassin.  I had two feats to include, both are -5 to attack, but also different effects.  So I had to come up with a way to do it, that worked, and this is what I came up with.  I worked it out, roughly, but it looked like, with the combinations available to me, I would need 75+ macros, to do what this one by itself does.  It makes attack rolls take slightly longer, but it’s worth it.

Code

&{template:5eDefault} {{title=@{Ashildr Susk|rangedweaponname1}}} {{weapon=1}} {{subheader=@{Ashildr Susk|character_name}}} {{subheaderright=Ranged attack}} {{emote=Code: ?{SharpShooter|Yes,5|No,0}?{VitalStrike|Yes,5|No,0}?{SharpShooter|Yes,5|No,0}?{VitalStrike|Yes,5|No,0}?{Maneuvour|Yes,1|No,0}?{SneakAttack|Yes,2|No,0}?{Fire|Yes,1|No,0}?{Poison|Yes,1|No,0}}} {{showclassactions=1}} {{Attack Rolls= Hits AC [[ [[1d20]] + [[@{Ashildr Susk|rangedtohit1}]] + [[@{Ashildr Susk|global_ranged_attack_bonus}]] -?{SharpShooter} -?{VitalStrike} ]] Hits AC [[1d20 + [[@{Ashildr Susk|rangedtohit1}]] + [[@{Ashildr Susk|global_ranged_attack_bonus}]] -?{SharpShooter} -?{VitalStrike} ]] }} {{Range=600′}} {{Damage=[[[[1d8]] + [[[[?{SharpShooter}]]*2]] + [[[[?{VitalStrike}/5]]d6]] + [[[[?{Maneuvour}]]d8]] + [[[[?{SneakAttack}]]d6]] ]] }} {{Poison= [[[[?{Poison}]]d4]] poison damage.}} {{Fire= [[[[?{Fire}]]d4]] fire damage. }} {{Critical Damage=[[[[1d8]] + [[[[?{VitalStrike}/5]]d6]] + [[[[?{Maneuvour}]]d8]]]] extra for critical damage.}} {{Notes=If damage is poison, then DC10 save or be poisoned.}}

Let’s break it down…since it’s a god damn mess…

This works on the BINARY process, of on and off, but instead of a 1 and a 0 to represent them, I changed it for some of the examples, by using math to modify the outcome, to determine the result.  I know, sounds idiotic, but it works.  Here is the start of the input process, and every question is a Yes / No response.

So let’s break down how it works…

Header
&{template:5eDefault} {{title=@{Ashildr Susk|rangedweaponname1}}} {{weapon=1}} {{subheader=@{Ashildr Susk|character_name}}} {{subheaderright=Ranged attack}}

This is the header, and sets the design of the macro, but it used the 5eDefault sheet’s connection to the sheet, to pull the information from the field specified.  “rangedweaponname1” to be precise, which is the character’s Longbow +2.

Emote Section
{{emote=Code: ?{SharpShooter|Yes,5|No,0}?{VitalStrike|Yes,5|No,0}?{SharpShooter|Yes,5|No,0}?{VitalStrike|Yes,5|No,0}?{Maneuvour|Yes,1|No,0}?{SneakAttack|Yes,2|No,0}?{Fire|Yes,1|No,0}?{Poison|Yes,1|No,0}}} {{showclassactions=1}}

This is where it gets a bit harder to read for some people.  Let’s look at the Sharp Shooter.  You are maybe also wondering why I use the emote to do this, partly laziness, but also because it generates a nice looking code at the top that has NO impact on the game at all.

So, Sharp Shooter.  -5 to Attack, to get 10 extra damage on a hit.  SO, the Sharp Shooter section in the the Emote field says this:

Sharp Shooter
?{SharpShooter|Yes,5|No,0}

So this is like all the other fields, in that it is a two answer possibility, All of them are the same.  It works by using the result (a 5 or a 0) in a maths equation later in the macro:

Attack Maths
{{Attack Rolls= Hits AC [[ [[1d20]] + [[@{Ashildr Susk|rangedtohit1}]] + [[@{Ashildr Susk|global_ranged_attack_bonus}]] -?{SharpShooter} -?{VitalStrike} ]] Hits AC [[1d20 + [[@{Ashildr Susk|rangedtohit1}]] + [[@{Ashildr Susk|global_ranged_attack_bonus}]] -?{SharpShooter} -?{VitalStrike} ]] }}

So this broken down is doing this:

  1. Roll 1d20 ([[1d20]])
  2. modify by the character’s attack modifier (+ [[@{Ashildr Susk|rangedtohit1}]])
  3. modify by the character’s global attack modifier, if any (+ [[@{Ashildr Susk|global_ranged_attack_bonus}]])
  4. then we remove the result, from the SharpShooter field.
    1. If the value is 5, it takes 5 from the attack roll.
    2. If the value is 0, then nothing is subtracted.
  5. then it continues on, till all the modifiers have been accounted for.

The rest of the modifiers are basically the same, they have an on off value setup, where the ON value is not always 1.

Damage is done the EXACT same way, the difference is that for something like SharpShooter, where the damage is 10pts, and the on value is 5, means you have to multiply the result by 2 in order to get the extra damage.  So in the damage area, you will find this:

Damage Calculation
{{Damage=[[[[1d8]] + [[[[?{SharpShooter}]]*2]] + [[[[?{VitalStrike}/5]]d6]] + [[[[?{Maneuvour}]]d8]] + [[[[?{SneakAttack}]]d6]] ]] }} {{Poison= [[[[?{Poison}]]d4]] poison damage.}} {{Fire= [[[[?{Fire}]]d4]] fire damage. }}

So what it means is this:

  1. Roll 1d8 for the arrow damage ([[1d8]])
  2. modify the damage by all the modifiers, SharpShooter first.  ([[?{SharpShooter}]]*2]])
  3. those with an on value will be added together, to determine the final outcome.
  4. it also includes ability score modifiers etc

Critical damage is the second re-roll, and the values are ADDED together to effect a final total, but they are listed separately.  I also have fire and poison damages listed separate, in case of vulnerabilities to each, or resistances.

Here is the final output once you go through all the options:

Hopefully if you have done it right, it will all work for you flawlessly.  If not, let me know below and I will try and answer any questions I can, when I can.