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

[Help] Macro/script for bracers of archery dnd 5e

Hi all, Just wondering if there was a script that I cannot find, or someone could help me with one to automatically add +2 damage to any attacks with a longbow or shortbow, as per the 5e DMG for Bracers of Archery.  I am currently either trying my best to remember to add it, or have the +2 set on all ranged attacks and trying to remember to take it off for other ranged attacks. Thanks in advance. Whick
1457071321
The Aaron
Pro
API Scripter
Are you using a character sheet?  Which one?  How do you make the attacks now?  Could you set up extra attacks that are specific to the long bow and short bow and have the +2 applied?
I am using the DnD5e character sheet v1.1.1 from the drop down list.  I use the attack button on the weapons page, or the quick button at the bottom of the screen.  It is an option to set up extra attacks, but not what I would like to do if it is possible to add the +2 to damage if the weapon listed is longbow or shortbow. I got the idea it may be possible based of the query scripting here Damage: [[ ( (1d8 + 3) * ?{Using LongSword?|0} ) + ( (1d8+2) * ?{Using Bow?|0} ) + ( (2d6+6) * ?{Using GreatSword?|0} ) ]] but unsure how to make it work for LongBow and ShortBow adding the +2 I think it would look something like this, but if I could remove the having to click a box as it can use the weapon name hopefully to trigger. Damage: [[ ( (+2) * ?{Using LongBow?|0} ) + ( (+2) * ?{Using ShortBow?|0} ) ]] 
How about changing ( (1d8+2) * ?{Using Bow?|0} ) to ( (1d8 +4 ) * ?{Using Bow?|0} )?
Silvyre, thanks for the suggestion, but that is not the script I use for the attack in the first place, just the inspiration that something could be done to account for the bracers of archery.  I use the macro that is on the sheet for the attack in the first instance, and I don't think I can change that one.  
1457099406
The Aaron
Pro
API Scripter
The API is reactive, it can only perform actions after an event has triggered it. It would not be able to change your attack before it was displayed. Best case, it could output something like "Damage was actually 8", which wouldn't be very useful, and would be somewhat complicated (have to determine if the roll was for a character that needed the +2, have to determine if the roll was for a short bow, have to parse the damage out of the roll template, etc.) For the DnD 5e (Community Contributed) character sheet, add a  + 2  to the damage in the Damage Dice column for shortbow and longbow  entries. This will report the correct damage for the correct weapons automatically. Alternatively, if you want to see the damage separately, you can put the Bracers of Defense in as a Class Action , then check Show output options? and check Ranged Weapons : This will show you the damage separately, similarly to how a critical hit's damage is reported.  It will show on all ranged weapons, but will allow you to selectively add the damage in.
Thanks The Aaron.  The second option you have is similar to how I have added the colossus slayer damage for my character and should work OK for this instance.  I guess I was hoping there was a way to code that it would see the rangedweaponname1 was being used, therefore apply the +2.  I realize this would mean I would have to make sure the bow was always in that slot for it to work properly, and add a second script for a shortbow in another rangedweaponname slot, using the class action area to input it.  Not even sure if that would work though.   If it is possible to do it that way, it is beyond my coding skills, if it is not, oh well, and the solutions you give above will work just fine.  Thanks again.
Check out the shaped sheet it may be much easier to do in there what you want to do.
Does changing the campaign sheet to the shaped sheet overwrite the sheets that are already in there on the current sheet, or does it do an information import.  I don't want to kill the sheets of the other players.
1457329490
The Aaron
Pro
API Scripter
Only one sheet can be active per game. It would be a large migration effort. 
1457329998

Edited 1457330119
The author of the Shaped sheet is working on an import function at this time. Until that function is implemented, there exists no simple way of switching over to the Shaped sheet. Nonetheless, switching from one Character Sheet to another will not incur data loss. From the  Advanced Character Sheet Usage section of the Roll20 Wiki: Interaction with Attributes Sheets in Roll20 are a presentation layer for the Attributes system. This means that every field on the sheet is "backed" by a corresponding Attribute on the Character. For example, if there is a field called "Strength" on the sheet, there will also be an attribute called "Strength" in the Attributes & Abilities listing tab. As you update the sheet, the attribute is updated, and vice versa. Switching Character Sheets does not remove Attributes, but different Character Sheets use Attributes with different names.
Thanks guys, the support here is awesome.  I will run it passed the group before I go changing in either case.