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] 5E shaped including meleeweaponX in a Class Action

Hopefully the title isn't too long but, I consider myself average in my knowledge of macro building and inline roles and such.  I have quite an extensive custom built macro list for my Paladin.  I now have an Eldritch Knight and I'm trying to figure out how to make a macro for 'War Magic'. I want to set a passive class action that triggers when I cast a spell (output option: Spell Cast) and will follow up with a melee weapon attack.  I have looked through the macro list and I found the 'meleeweaponX' where the X is columns 1 - 6 of the coded in melee weapon section; I just can't seem to figure out how to throw it into a macro so that it produces the weapon attack.  I keep getting syntax errors and such. I can just as easily NOT make this macro and be just fine, I just thought it would be handy :)
1451497016

Edited 1451497149
I would recommend nesting an API Command Button within your class action (using them in this way does not require access to the API). [Attack with @{repeating_weapons_melee_0_name}](!
%{Character Name|repeating_weapons_melee_0_weapon})
Thank you Silvyre, can you explain what the context of the coding does?  I'm ignorant as to what the repeating weapon melee 0 name thing requires.  Would I write it just like that?  Or do I replace the 0 with the proper column number of the weapon in queston?
1451498957

Edited 1451499299
In this case, the sheet author had designed the sheet such that "0" refers to the first melee weapon entry and "6" refers to the last. %{Character Name| repeating_weapons_melee_X_weapon } is the hidden Ability that effectively presses the Xth entry's sheet button. As per Entering API Buttons In Chat , I replaced the % with its corresponding HTML entity. I also replace the } which closes the Ability call; a replacement which becomes necessary in order to nest an API Command Button like this within a Roll Template. I recommend placing the API Command Button, as written above, directly into the Output field of your class action for War Magic.
Weapon 1 Melee • 10ft Attack [[d20cs>20 + 2 + 5 + (0 0) + (0) + (0)]] | [[d20cs>20 +2 + 5 + (0 0) + (0) + (0)]] vs AC Damage [[0d0 + 1d10 + 5 + (0 * 0) + (0) + (0)]] Slashing Is what I end up being returned with inside weapon attack roll after I click the button your above API grants me.  Is this normal?
1451522806

Edited 1451522916
It's not normal for the inline roll to fail to parse, no... You aren't the first to have this issue with the sheet, but for the sake of troubleshooting, please try this out: Use the API Command Button again to see whether the issue is persistent. If it is, Execute your "Weapon 1" Roll Template via the sheet button. Execute the same Roll Template via its Ability call, i.e. %{Character Name|repeating_weapons_melee_X_weapon} Let me know whether either of the two previous steps led to the same issue occuring. While this particular issue can be remedied by padding the present inline rolls with spaces (i.e. [[foo]] → [[ foo ]]), it's not easy to modify the inline rolls generated constructed by the sheet. You may be able to fix this issue by customizing the sheet's HTML (if the game's creator is a Pro user), or appealing to the sheet author to do so (recommended), or copying the sheet button's output to a new Ability (i.e. by pressing that sheet button, clicking into the text chat box, pressing your ↑ key, and copying the contents of that button that floods into the text chat into the body of a new Ability).
Ok so I figured out what was causing the incompatibility. I have two other passive Class Actions coded in to go off after a weapon attack.  So you are currently providing me with a Class action code to make a weapon attack after I cast a spell.  Then I click the 'Weapon attack' button that it provides as per your API.  It makes a weapon attack and then attaches the other two class actions of Eldritch Strike , and the following to work with Polearm Master (so it makes a 1d4 attack with the blunt edge of the weapon and including great weapon fighting 'ro<2' in the equation): To hit: [[@{Sethellion Zeal|strength_mod} + @{PB} ]] Damage: [[1d4ro<2 + @{Sethellion Zeal|strength_mod}]] Somehow this is messing up your API.  If I disable this, but keep Eldritch Strike on, it works fine.  Disable both and it works fine.  Toggle Polearm Master on and it gives me the above gibberish you saw earlier. Any potential fixes so everything works smoothly? Or should I forgo polearm master?
Airatome said: To hit: [[@{Sethellion Zeal|strength_mod} + @{PB} ]] Damage: [[1d4ro<2 + @{Sethellion Zeal|strength_mod}]] Any potential fixes so everything works smoothly? Try padding the interior of these two inline rolls with spaces, as I recommended above.
1451538759

Edited 1451539601
Alright, we have success now!  Thank you, you have my gratitude silvyre. Padding the interior of my Polearm Master inline rolls fixed the problem. I'm not sure how you keep all this knowledge tucked away in your head, but I'm grateful for it all.  I suppose coding is like any other skill, parts of it just elude me. :) A final bit of curiosity, is there no where to query which # in the repeating_weapons_melee_ 0 through 6 you'd like to use?
1451543428

Edited 1451543616
I recommend simply lining up additional API Command Buttons for the number of entries you'd use most frequently (it's not really possible to execute Ability macros via Roll Query). The most compact way of accomplishing this is by naming the button with a space. That is, if you don't mind keeping in mind which weapon corresponds to which number. [ ](!
%{Character Name|repeating_weapons_melee_0_weapon})[ ](!
%{Character Name|repeating_weapons_melee_1_weapon})[ ](!
%{Character Name|repeating_weapons_melee_2_weapon})[ ](!
%{Character Name|repeating_weapons_melee_3_weapon})[ ](!
%{Character Name|repeating_weapons_melee_4_weapon})[ ](!
%{Character Name|repeating_weapons_melee_5_weapon})[ ](!
%{Character Name|repeating_weapons_melee_6_weapon}) Looks like this.
1451543917

Edited 1451543998
No ability was found for %{Character Name|repeating_weapons_melee_0_weapon} (It says this for each of the pink buttons I try and press.) I see what we're going for though.  That's amazing.  So the 7 buttons aren't numbered but correspond to 0-7 on the weapon list.
1451543993

Edited 1451544059
Airatome said: No ability was found for %{Character Name|repeating_weapons_melee_0_weapon} Gotta replace Character Name with Sethellion Zeal [ ](!
%{Sethellion Zeal|repeating_weapons_melee_0_weapon})[ ](!
%{Sethellion Zeal|repeating_weapons_melee_1_weapon})[ ](!
%{Sethellion Zeal|repeating_weapons_melee_2_weapon})[ ](!
%{Sethellion Zeal|repeating_weapons_melee_3_weapon})[ ](!
%{Sethellion Zeal|repeating_weapons_melee_4_weapon})[ ](!
%{Sethellion Zeal|repeating_weapons_melee_5_weapon})[ ](!
%{Sethellion Zeal|repeating_weapons_melee_6_weapon})
Silvyre said: Gotta replace Character Name with Sethellion Zeal Knew that.... my apologies ^^ .  This system truly is amazing.   Thank you for your help with it.
You're very welcome.