
Hi Folks! I'm trying to create an ability in the attributes section of the D&D 5e Roll20 Character Sheet, with the intention that it will be a ranged attack utilizing "selected" attributes and querying if Sharpshooter is in play (-5 Attack for +10 Damage), all while staying within the confines of the Attack & Damage template for the sheet. The problem is, that I have very little understanding of how much of this would be organized. I'll lay out some of my thoughts below to show you where I'm at and hopefully you can provide me the pieces I'm missing to make this whole thing work. Before I get too far ahead, I'm also curious if I can add new attributes to that section of the sheet for my Templated Macro to call on, without messing up the sheet? For example, I'd like to be able to add something that shows I have X fighting style (e.g. Fighting Style: Archery (grants +2 Bonus to Ranged Attack Rolls). I'm a simple person and would probably just label the attribute something like "Fighting_Style" and place a number there, then apply that to relevant sections. Later on I'm sure I can get more clever and complicated but if this works that would be super. Similarly, I might like to add a weapon enhancement modifier (e.g. "RngWpn1Enh" for Ranged Weapon 1 Enhancement). Speaking of that, how can I make sure that various sheet call outs occur for this macro? By example, I'm interested in making sure that the ability would still obey the rules of the sheet as determined under settings, where if I want to set it up I can always query for Advantage/Disadvantage, Whisper my rolls, etc. As well as check to see if there are any Global Modifiers that have been checked and should be applied to the attack or damage. Is there a particular string I would need to include to make sure such settings were followed herein? In regards working in Sharpshooter, I'm uncertain. I'll be putting down **Sharpshooter** to indicate I suspect the query would need to be put here or there and that it is asking if Sharpshooter is being used, and if so, it would automatically apply a -5 penalty to the attack roll, in exchange for a +10 modifier to the damage roll (which would not be multiplied on a crit). Assuming that all of the above can be done, my basic calculation without hardly any coding work would look something like this (the attack is using a D&D firearm from Critical Role called the Pepperbox, which critical fumbles / misfires on a roll of 2 or less on a d20 and critically hits on a 20): @{selected|character_name|wtype}&{template:atkdmg} {{mod= {selected|pb} + {selected|dexterity_mod} + {selected|fighting_style} + {selected|RngWpn1Enh} - [?{Sharpshooter?|No,0|Yes,1} * 5]}} {{rname=Pepperbox}} {{r1=[[@{selected|character_name|d20}cf<2cs>20 + {selected|pb} + {selected|dexterity_mod} + {selected|fighting_style} + {selected|RngWpn1Enh} - [?{Sharpshooter?|No,0|Yes,1} * 5]]]}} {{attack=1}} {{range=80 ft. (320 ft.)}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d10 + {selected|dexterity_mod} + [?{Sharpshooter?|No,0|Yes,1} * 10]]]}} {{dmg1type=Piercing}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d10[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=}} {{spelllevel=}} {{innate=}} {{globalattack=@{selected|character_name|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{selected|character_name|global_damage_mod_type}}} ammo= @{selected|character_name|charname_output} Going through that whole thing, I'm sure there's a LOT that's missing to actually make this thing function correctly (though I'm also curious about things that can be deleted, such as anything referencing spells on a mundane attack). I'm also curious if I can somehow query whether or not Sharpshooters penalty & bonus is being applied once, and just have that come into play purely within this macro, or if I need to "nest" a macro within it? Well, a macro or something. Thanks in advance to anyone that can help me out with this, I'm really running into a wall here.