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

[5E-OGL] Looking for help for Sharpshooter + Combat Maneuvers Macro

Hello everyone, I was wondering if anyone out there has successfully gotten a Sharpshooter + Combat Maneuvers Macro to work in the new sheet.  I used to have a great working macro in the older version.  One part existed in my Class Actions tab [the combat maneuvers] and the other as a macro [sharpshooter attack]. Anytime I would click on my token, the sharpshooter macro would pop up, allow me to target and then would pop up the maneuver menu.   Looked something like this: ?{Combat Maneuver| None, | Precision Attack, **Precision Attack** [[1d10]] to hit When you make a weapon attack roll against a creature&#44 expend one superiority die to add it to the roll. Use this maneuver before or after the attack roll&#44 but before any effects of the attack are applied. | Trip Attack, **Trip Attack** [[1d10]] damage Save DC [[17]] Str When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to knock it down. Add the superiority die to the damage roll and if the target is Large or smaller&#44 it must make a Strength saving throw. On a failed save&#44 you knock the target prone | Maneuvering Attack, **Maneuvering Attack** [[1d10]] damage When you hit a creature with a weapon attack&#44 expend one superiority die to maneuver one of your comrades into a more advantageous position. Add the superiority die to the damage roll and choose a friendly creature who can see or hear you. It can use its reaction to move half its speed without provoking opportunity attacks from the target of your attack. | Menacing Attack, **Menacing Attack** [[1d10]] damage Save DC [[17]] Wis When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to frighten the target. Add the superiority die to the damage roll&#44 the target must make a Wisdom saving throw. On a failed save&#44 it is frightened of you until the end of your next turn. | Goading Attack, **Goading Attack** [[1d10]] damage Save DC [[17]] Wis When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to goad the target into attacking you. Add the superiority die to the damage roll and the target must make a Wisdom saving throw. On a failed save&#44 the target has disadvantage on all attack rolls against targets other than you until the end of your next turn | Pushing Attack, **Pushing Attack** [[1d10]] damage Save DC [[17]] Str When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to drive it back. Add the superiority die to the damage roll&#44 if the target is Large or smaller&#44 it must make a Strength saving throw. On a failed save&#44 you push the target up to 15ft away from you. | Disarming Attack, **Disarming Attack** [[1d10]] damage Save DC [[17]] Str When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to disarm the target&#44 forcing it to drop one item of your choice that it’s holding. Add the superiority die to the damage roll and the target must make a Strength saving throw. On a failed save&#44 it drops the object at its feet. | } and the Sharpshooter macro that was set as a token action... &{template:5eDefault} {{weapon=1}} {{title=Sharp Shooter Ranged Attack vs @{target|token_name}}} {{subheader=@{selected|character_name}}} {{subheaderright=@{selected|rangedweaponname1}}} {{attack=[[1d20cs>@{selected|rangedweaponcritrange1} + @{selected|rangedtohit1} + (@{selected|global_ranged_attack_bonus} -5) ]]}} {{attackadv=[[1d20cs>@{selected|rangedweaponcritrange1} + @{selected|rangedtohit1} + (@{selected|global_ranged_attack_bonus} -5) ]] to hit }} {{damage=[[@{selected|rangeddmg1} + @{selected|rangeddmgbonus1} + (@{selected|global_ranged_damage_bonus}) +10+ 0d0]] @{selected|rangeddmgtype1}}} {{critdamage=Additional [[@{selected|rangedcritdmg1}]] damage}} @{selected|classactionrangedweapon}} {{emote=@{selected|token_name} aims his @{selected|rangedweaponname1} at @{target|token_name}}} I get a series of errors when trying to duplicate this by having the maneuver macros above in my weapon attack description, while I have the sharpshooter in my token action macro.  It almost seemed like it was going to work, then I get these series of messages: No attribute was found for @{selected|rangedweaponname1} No attribute was found for @{selected|rangedweaponcritrange1} No attribute was found for @{selected|rangedtohit1} No attribute was found for @{selected|global_ranged_attack_bonus} No attribute was found for @{selected|rangedweaponcritrange1} No attribute was found for @{selected|rangedtohit1} No attribute was found for @{selected|global_ranged_attack_bonus} No attribute was found for @{selected|rangeddmg1} No attribute was found for @{selected|rangeddmgbonus1} No attribute was found for @{selected|global_ranged_damage_bonus} No attribute was found for @{selected|rangeddmgtype1} No attribute was found for @{selected|rangedcritdmg1} No attribute was found for @{selected|classactionrangedweapon} No attribute was found for @{selected|rangedweaponname1} ...unfortunately I haven't figured out how to get this to work in the current sheet.  Anyone able to help on this matter?  Much obliged in advance!
1486185853

Edited 1486186150
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The errors you're getting are because each character sheet uses a different attribute naming scheme, so those attributes don't exist on the 5e OGL sheet. Here's how I'd do what you're after though. Make sure your sheet is set up to auto roll damage (this will just make some of the fancy macro-magic we're going to do easier). I'll be using the info from the  5e OGL roll template wiki for this and  ability command buttons for the maneuver stuff so that you can roll it after the roll is made rather than having to decide it at the time of the roll. In the description field of your attack on your core tab add this: [Maneuver Rolls](~Test|Maneuvers)}} {{r1=[[1d20+[[@{atkattr_base}]][ABILITY]+[[@{atkprofflag}]][PROF] + @{atkmod}-?{Sharpshooter}]]}} {{r2=[[1d20+[[@{atkattr_base}]][ABILITY]+[[@{atkprofflag}]][PROF]+@{atkmod}-?{Sharpshooter}]] In your damage field of the attack add this after the dice roll of your damage: +[[2*?{Sharpshooter|no,0|yes,5}]] You'll also need to add your dice roll into the critical field as you don't want to add your sharpshooter damage to the crit damage. And you'll make the following ability on your attributes and abilities tab: Ability Name: Maneuvers Ability text: &{template:atkdmg} {{desc=?{Maneuver|Precision Attack, **Precision Attack** [[1d10]] to hit When you make a weapon attack roll against a creature&#44 expend one superiority die to add it to the roll. Use this maneuver before or after the attack roll&#44 but before any effects of the attack are applied. | Trip Attack, **Trip Attack** [[1d10]] damage Save DC [[17]] Str When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to knock it down. Add the superiority die to the damage roll and if the target is Large or smaller&#44 it must make a Strength saving throw. On a failed save&#44 you knock the target prone | Maneuvering Attack, **Maneuvering Attack** [[1d10]] damage When you hit a creature with a weapon attack&#44 expend one superiority die to maneuver one of your comrades into a more advantageous position. Add the superiority die to the damage roll and choose a friendly creature who can see or hear you. It can use its reaction to move half its speed without provoking opportunity attacks from the target of your attack. | Menacing Attack, **Menacing Attack** [[1d10]] damage Save DC [[17]] Wis When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to frighten the target. Add the superiority die to the damage roll&#44 the target must make a Wisdom saving throw. On a failed save&#44 it is frightened of you until the end of your next turn. | Goading Attack, **Goading Attack** [[1d10]] damage Save DC [[17]] Wis When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to goad the target into attacking you. Add the superiority die to the damage roll and the target must make a Wisdom saving throw. On a failed save&#44 the target has disadvantage on all attack rolls against targets other than you until the end of your next turn | Pushing Attack, **Pushing Attack** [[1d10]] damage Save DC [[17]] Str When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to drive it back. Add the superiority die to the damage roll&#44 if the target is Large or smaller&#44 it must make a Strength saving throw. On a failed save&#44 you push the target up to 15ft away from you. | Disarming Attack, **Disarming Attack** [[1d10]] damage Save DC [[17]] Str When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to disarm the target&#44 forcing it to drop one item of your choice that it’s holding. Add the superiority die to the damage roll and the target must make a Strength saving throw. On a failed save&#44 it drops the object at its feet. }}} So your attack entry on the core page will look like this: Notice that I forgot to add 1d8 to the Crit field, so as I have this set up now, it'll add the sharpshooter bonus to the crit damage as well. Also, ignore the crit threat range of 1; was testing something else out with this attack before using it to set this up. Note that if you use 3d dice, this will result in 4 d20's being rolled on the 3d dice. This is because we are simply overriding what is displayed by the roll template with the r1 and r2 fields that we've added to the description field, not replacing the regular attack roll that the sheet created for the attack. If you have additional info that you want output in your attack's description, just make sure to put it before the Maneuver Rolls button.
Scott, thank you so much for your help!  This is great - I feel like we're getting closer, but one issue I've run into: When I attempt to click on the Maneuver button, I get this message:  No ability was found for %{Test|Maneuvers} Also, just a small detail, how would I be able to change the color/look of the Maneuver button? Thank you again!
1486217868

Edited 1486222004
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, ability command buttons have the following syntax: [Label](~Character Name|Ability_name), so you just need to replace "test" with your character name. For the styling, there's only one option, but it'll make this a tad more complicated. The atk template of the OGL sheet formats command buttons as hyperlink text instead of the pink box. You could switch the sheet to not auto roll damage, which would switch from the atkdmg template to the atk template, in which case you'll also want to turn on ammo tracking (not to actually use ammo tracking, and API access won't be required for what we're gonna do). Change that text from the description field to be: [Maneuver Rolls](~Test|Maneuvers)}} {{r1=[[1d20+[[@{atkattr_base}]][ABILITY]+[[@{atkprofflag}]][PROF] + @{atkmod}-?{Sharpshooter|no,0|yes,5}]]}} {{r2=[[1d20+[[@{atkattr_base}]][ABILITY]+[[@{atkprofflag}]][PROF]+@{atkmod}-?{Sharpshooter}]]}} then cut and paste the bolded section into the ammunition field that is now available in the attack and delete the "}}" that is left after the ability command button. There's a couple ways to go from here, but I'm gonna have to hop on my computer to check some ability names first, I'll post back with the rest once I do. EDIT: Ok, looked up the ability names and realized I lied a bit, there's only one way to do this, and not need to answer the sharpshooter query multiple times, that I can see. After you've got it all setup as above, you'll make a new custom ability that will simply be the following: %{CharName|repeating_attack_$X_attack} %{CharName|repeating_attack_$X_attack_dmg} The $X denotes the repeating row index number, attacks, spells and other repeating areas are indexed from 0, so if your ranged attack is the attack at the top of your attacks section, the macro would be: %{CharName|repeating_attack_$0_attack} %{CharName|repeating_attack_$0_attack_dmg} And if it's the 3rd one down, it'll be: %{CharName|repeating_attack_$2_attack} %{CharName|repeating_attack_$2_attack_dmg} The attack section now looks like this: And activating the custom ability outlined above gives this as output: If you want to format the button text from this point, you can apply  chat formatting to the button. Let me know if that works for you, Scott
1486221922
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
^^Updated answer with the ability name stuff.
1486227174

Edited 1486227828
Amazing!  This works!  One minor issue remains that I can't seem to figure out.  It's still asking me to pick Sharpshooter twice.  Once when I roll, and again when I click to roll damage (since we needed to turn auto roll damage off). Also, do I need to replace "CharName" in the second Ability Macro with my character name or leave as is? %{CharName|repeating_attack_$0_attack} %{CharName|repeating_attack_$0_attack_dmg} Also another minor gripe, the template containing my maneuver text seems pretty crowded, any way to remedy this?
1486228416
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yes, that is why I put Charname there instead of the character name I was using. The double asking for sharpshooter is why you're going to use that custom ability to call both the attack roll and the damage roll at the same time. If you just roll straight from the sheet it will ask you twice. as for the crowding, that's a consequence of the SKT special formatting of the sheet. You could add a spare line after the maneuvers query to add space. I can't think of a fix for the sides.
1486229546

Edited 1486229915
Ahh gotcha, that seems to be working now :) However, I noticed it's not calculating crit damage.  I tried setting crit range to 1, and any roll isn't even constituting as a crit, therefore it's not adding any crit damage (whether I keep the damage dice in my crit dmg or not). Even on a few tests where I rolled a natural 20, it did not add the crit damage to the damage roll.
1486230236

Edited 1486230321
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
woops, that's my bad, add "@{halflingluck}cs>@{atkcritrange}" immediately after the 1d20 (no spaces): 1d20@{halflingluck}cs>@{atkcritrange} EDIT: hmm, forgot how the sheet handles criticals when you don't auto roll damage, gonna have to think on this. The above fix is certainly part of it though, but won't totally fix it.
Which line does that halflingluck get added to?  The line in my ammo?
1486231141

Edited 1486231227
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Just replace the 1d20 in the bolded section of my text above with that 1d20@{halflingluck}cs>@{atkcritrange}. And this is going to be a bit more complicated than I thought due to how the dmg template handles showing critical damage. I know what needs to be done, but I'm right in the middle of preparing a presentation for work so I won't be able to get you the details until at least tomorrow.
Gotcha - no worries.  There are two instances of 1d20 in the bolded section, are both instances to be replaced? Looking forward to your findings when you have the time - can't thank you enough for your help thus far.
One more thing just occurred to me regarding the crit damage:  Once you figure out how the sheet is going to handle crits for attacks, how would we also have that crit apply to the superiority die since that damage would be multiplied as well?
1486234001
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
yep, both 1d20's need it. the first one is for your first roll, the second one is for the second roll (when rolling advantage, disadvantage, or always rolling advantage).
1486234098
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Sevan S. said: One more thing just occurred to me regarding the crit damage:  Once you figure out how the sheet is going to handle crits for attacks, how would we also have that crit apply to the superiority die since that damage would be multiplied as well? oh, that one's easy, since we'll already know the roll result when the maneuvers are rolled we'll just use a query that will ask "crit/not crit" and roll based on the answer.
Bubbling this one back up.  Scott C. have you had a chance to look into the crit damage issue?   Used the macro to pretty great effect so far despite missing the crit damage part. Thanks again!
1486572082
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Haven't yet, I should have time tomorrow though. Had two presentations at work this week, and prepping for a critique that is on Friday.
1486577202
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Had some time to take a quick look and make sure my plan was going to work. Unfortunately, there's a hang up; the atk template formats ability command buttons so that they look like text (and not the ugly pink box), unfortunately it doesn't do this same formatting for api command buttons which were going to be needed for what I was going to do. So it looks like you can either have pink buttons for the maneuver roll and have crit threat detection; or have text formatted buttons, but not have crit threat detection. I'm gonna post a request to the OGL sheet thread and see if steve will change the atkmod template to have the same formatting as the atk template with regards to buttons, and change the atk template to have the same formatting as the atkmod template with regards to rolls in the desc field.
Ah that's a shame.  Thank you for taking the time to post these either way, hopefully it helps others as much as it has helped me.   I'll keep my ear to the ground to look for a potential future solution to the pink box.