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 Making an attack and then have options of what to apply to the attack

I'm looking for a way to take a Greatsword attack from just a plan Greatsword attack to a Greatsword + Bless, and then GS + Bless + GWS + Sacred or even be able to apply different abilities on any different swing without having to create several token buttons to hit. It would be nice to do all this from chat. Help is appreciated.
1477074763
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Jerry, I have a similar issue with my monk. Here is how I handled it: I activated ammunition tracking on the sheet (located in the settings section). This is to take advantage of the fact that the ammo section of the attack is output last, which you can use to overwrite previous sections of the roll template. You then put your query about what is going to happen into the ammunition field. You can put template fields in the query, you will just need to html escape them according to the  advanced roll query usage rules . This is what my pistol attack looks like (It's a homebrew monk archetype that uses firearms): The Save Effect field text is: ?{Firearm Special Attack|None, }} {{save=|Flurry - Head, **Success:**makes attacks normally **Failure:** makes attacks with disadvantage till end of their next turn}} {{saveattr=Constitution|Flurry – Arms, **Success:** retains hold of item **Failure:** drops one held item of my choice|Flurry – Torso, **Success:** Is unmoved **Failure:** pushed back up to 10-ft| Flurry – Legs, **Success:** Remains upright **Failure:** knocked prone} The Ammunition field text is: {{desc=**Ki-points:** @{class_resource}/@{Sturmak|class_resource|max} ?{Magic Bonus|Normal Ammo [@{repeating_resource_$2_resource_left}],**Ammo** @{repeating_resource_$2_resource_left}|@{repeating_resource_$0_resource_left}|+1 Bullet [@{repeating_resource_$0_resource_right}],``**+1 Ammo:** @{repeating_resource_$0_resource_right}|@{repeating_resource_$0_resource_left}``}}} You can also overwrite the default attack and/or damage fields by putting them into your query. I keep meaning to change my magic ammo query to do this, but it's about to be a moot point since I've only got 4 +1 ammo left. For more information on the template fields, see the  5e OGL Roll Template Wiki . Hope that helps, and let me know if you need some more details or have any questions, Scott
That is really good idea there for knowing how many uses you have but I'm looking for a way to apply these bonuses to the actual attack with just one button click and then having button options in the Chat before the actual attack goes off.  So I click Token button and then a chat box pops in chat with options on how I want to use my Greatsword - Normal or GSW or Bless or Sacred or Smite/level or a combination of 2 or more. I am thinking this cannot happen without an API and sadly I have no clue how to work with API. But it would be amazing for many different classes that can buff their attacks. 
1477078191
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, I can't write it out right now, but you can do that with roll queries easily enough. I'll repost when I'm home from work with how I'd see it working.
Amazballs in Awesomesause
1477089765

Edited 1477090470
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ok, I was able to sit down to type this up a little sooner than I thought. Here's a pic of what the attack looks like in the sheet: There is a separate query for each ability. I've only put bless and sacred weapon in at the moment as I'm not sure which feat/ability you are referring to with GWS. Because the r1 and r2 fields in the description text box will be output after the default r1 and r2, they will override the display. The catch here is that you always have to roll advantage and this will really work best if you autoroll damage when you click the attack as well (otherwise you'll be getting asked to select abilities multiple times even when they are not applicable (such as being asked about bless on a damage roll). The critical success and fumble points on the bless roll are to prevent that roll from triggering the critical success/fumble formatting so that you can actually tell when it is your d20 that rolled a natural 1 or 20 rather than the bless d4 rolling a natural 1 or 4. And the chat output for a blessed sacred weapon attack: And here's the text of what is in the description: Whatever the description for your attack is }} {{r1=[[1d20cs>@{atkcritrange} + [[@{atkattr_base}]] + @{atkmod} + [[@{atkprofflag}]][PROF]?{Bless|No, |Yes, + 1d4cs>5cf<0[Bless]}?{Sacred|No, |Yes, + [[@{charisma_mod}]][Sacred]}]]}} {{r2=[[1d20cs>@{atkcritrange} + [[@{atkattr_base}]] + @{atkmod} + [[@{atkprofflag}]][PROF]?{Bless}?{Sacred}]] Let me know if you've got any questions or need some tweaks. EDIT: you could also activate the ammunition tracking in the settings tab of the sheet, and then put everything from {{r1=... to the end in the ammunition text field rather than cluttering up your description field. EDIT the second: I would also suggest NOT using 3D dice with this method as you will wind up with 4 d20's being rolled + a duplicate of your damage dice if you decide to add damage affecting abilities in.
That is really great work you did there. Currently I have like 4 to 6 different buttons to do what you did in one attack. I said GWS but I meant GWM, my bad. How does this macro know that I'm blessed or not blessed or if I'm using sacred strike or but also could there be a way of making Smite an option after I attack?
1477092361

Edited 1477092442
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
When you roll the attack, you will get a series of roll query prompts that will pop up on the VTT asking you Bless: yes/no, Sacred: yes/no. Selecting no just puts a space in while selecting yes puts the appropriate roll mod or bonus dice into the expression. Now knowing that you meant GWM, here's the complete beast including an ability command button to roll your smite (which I would suggest setting up as its own attack) right from the chat interface: The complete text of the Greatsword Customization: Whatever the description for your attack is [Divine Smite](~Weapon Options|repeating_attack_$1_attack)}} {{r1=[[1d20cs>@{atkcritrange} + [[@{atkattr_base}]] + @{atkmod} + [[@{atkprofflag}]][PROF]?{Bless|No, |Yes, + 1d4cs>5cf<0[Bless]}?{Sacred|No, |Yes, + [[@{charisma_mod}]][Sacred]}?{Great Weapon Master|No, 0|Yes, -5[Great Weapon Master]}]]}} {{r2=[[1d20cs>@{atkcritrange} + [[@{atkattr_base}]] + @{atkmod} + [[@{atkprofflag}]][PROF]?{Bless}?{Sacred}?{Great Weapon Master}]]}} {{dmg1=[[@{dmgbase}+[[@{dmgattr}]] +@{dmgmod}[MOD]?{Great Weapon Master}*-2]] And the formula in Divine Smite's Damage field for autocalcing the number of Divine Smite Dice to roll: 2d8 + [[?{Spell Level|1}-1]]d8[Higher Level Spell Slot]?{Undead Target|No, |Yes, +1d8[Undead Target]} Happy Rolling, Scott EDIT: You'll need to adjust the ability command button to refer to your actual divine smite attack (just change the $1 to $X where X is equal to the row number of your divine smite attack (they start numbering at 0)
You rock man this is the most Amazball in Awesomesauce Thank you
This is what I'm getting when I click through everything. What am I doing wrong? I have the Greatsword in first slot and then divine smite in the next one.
1477103660
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Can you copy and paste what you have in the description field?
Here is what I have. Janarus swings Lathander's Defense [Divine Smite](~Weapon Options|repeating_attack_$1_attack)}} {{r1=[[1d20cs>@{atkcritrange} + [[@{atkattr_base}]] + @{atkmod} + [[@{atkprofflag}]][PROF]?{Bless|No, |Yes, + 1d4cs>5cf<0[Bless]}?{Sacred|No, |Yes, + [[@{charisma_mod}]][Sacred]}?{Great Weapon Master|No, 0|Yes, -5[Great Weapon Master]}]]}} {{r2=[[1d20cs>@{atkcritrange} + [[@{atkattr_base}]] + @{atkmod} + [[@{atkprofflag}]][PROF]?{Bless}?{Sacred}?{Great Weapon Master}]]}} {{dmg1=[[@{dmgbase}+[[@{dmgattr}]] +@{dmgmod}[MOD]?{Great Weapon Master}*-2]]
1477171527

Edited 1477172796
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmmm, ok. Well the easy problem first. I neglected to mention that the ability command button syntax there will need to be modified in one very important way. Right now it is setup to point to the character I made to test this, Weapon Options; you will need to replace that with your character's name (as it is in full on the character sheet). You could also replace it with the selected keyword if you wanted to only have access to it when having your token selected (not so useful for theatre of the mind type encounters). A more general example of the roll button syntax for this would be: [Divine Smite](~CharName or Keyword|repeating_attack_$1_attack) Now for the part I'm not so sure on. When I copy your text over to my character it works perfectly, including the button for the reason above. That is an error that I got when I first started designing the macro due to some inline roll bracket funkiness. Could you post a screenshot showing the hover tooltip that shows up when you hover over either of the attack rolls? I think there must be something that snuck in or got deleted during the copy and paste in those inline rolls that is screwing it up. EDIT: Also a screenshot of what it all looks like in your attack section of the sheet would be useful (similar to how I showed it up above).
This is what I'm getting.
1477238824
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks, I see the problem now. The sheet doesn't generate every attribute for an attack when the attack is made. In the macro, there is a reference to the attack mod (@{atkmod}) that refers to the misc bonus attack field (the one between the attack ability drop down and the proficient checkbox). Fill this in with a zero (should have a grayed out zero atm) so that the attribute has a value and then it should work.
It works perfectly now, especially because I turned on auto roll damage. I'm such a goober you even said to do that.
1477241777
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
heh, wasn't gonna say anything - to each his own after all - but, yeah, it will work better with autoroll damage on. If you didn't want to autoroll damage, there are some tweaks you could make for it to be a little better, but you'll still have some repetitions
Yeah it's much better like that anyway. It's just smoother and it's not like if you miss the DM doesn't just not add it. Thank you very much for helping me with this problem I was having.
1477242595
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
np, happy rolling