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

Macros not being working with Queries. (Template Error)

1596067188

Edited 1596067331
This may be a really stupid thing, I've tried to find people with similar problems, but I seem unable to do so. I'm currently trying to set up a macro for one of my players. Effectively just to query if they're attacking with the DND 5e ability 'Great Weapon Master'. Doing so modifies the Attack and the Damage of an attack. What I wanted to do was just create a template for both versions of the attack, with and without GWM. However I keep getting an error like so:  The Full text of this error is: "No,&{template:atkdmg" and there is no curly bracket on the end of that either, incase that's a clue. But as you can see, it doesn't give me options to click on, despite this working perfectly well if I just replace the macro calls with dicerolls. My Macros go as such:  The main macro that I'm calling here:  Greatsword-Attack: ?{Great Weapon Master?|No,#attack_norm  |Yes,#attack_gwm } #attack_norm: &{template:atkdmg} {{mod=+[[@{Sigismund Sunwalker|pb}+@{Sigismund Sunwalker|Strength_mod}]]}} {{rname=Greatsword}} {{r1=[[1d20cs>20 + @{Sigismund Sunwalker|Strength_mod}[STR] + @{Sigismund Sunwalker|pb}[PROF]]]}}  {{always=1}}{{r2=[[1d20cs>20 + @{Sigismund Sunwalker|Strength_mod}[STR] + @{Sigismund Sunwalker|pb}[PROF]]]}} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d6ro<2 + @{Sigismund Sunwalker|Strength_mod}[STR]]]}} {{dmg1type=Slashing}}{{crit1=[[2d6ro<2]]}} {{charname=Sigismund Sunwalker}} Normally, if I run the macro without calling it in the main Macro, it looks perfectly fine.  #attack_gwm: &{template:atkdmg} {{mod=+[[@{Sigismund Sunwalker|pb}+@{Sigismund Sunwalker|Strength_mod}-5]]}} {{rname=Greatsword, Great Weapon Master}} {{r1=[[1d20cs>20 + @{Sigismund Sunwalker|Strength_mod}[STR] + @{Sigismund Sunwalker|pb}[PROF] - 5[GWM]]]}}  {{always=1}}{{r2=[[1d20cs>20 + @{Sigismund Sunwalker|Strength_mod}[STR] + @{Sigismund Sunwalker|pb}[PROF] - 5[GWM]]]}}  {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d6ro<2 + @{Sigismund Sunwalker|Strength_mod}[STR] + 10[GWM]]]}} {{dmg1type=Slashing}}{{crit1=[[2d6ro<2]]}} {{charname=Sigismund Sunwalker}} This also runs completely fine if i just run it without calling it. Is there something super obvious I'm missing here? Some form of syntax I need to place in the macros im calling so it doesn't result in this error? Thanks for anyone who helps!!
1596068602

Edited 1596069022
Oosh
Sheet Author
API Scripter
This is one of the most commonly asked questions about macros - due to the order of operations, that #attack_norm macro call will be replaced with the contents of the macro before the entire thing is parsed, and the }} curlies break the Query. Your options are to either: 1) replace all the } | and , in the #attack_norm and #attack_gwm macros with HTML entities . They will no longer work as standalone macros, and if they're saved as Collections macros, the HTML entities will revert every time you open them, breaking the Query again. Saving the macros as Ability macros on a macro mule character sheet is recommended 2) use a Chat Menu instead. Chat Menus are almost always the better option - adding buttons is easy, and you can link straight to a working macro without needing HTML replacement therapy. For general use/universal macros, saving to a common Macros character sheet is generally the way to go. Your macros look specific to Sigismund, so I'd probably just save them on that character sheet, then your chat menu would look like this: /w "sigismund sunwalker" &{template:npcaction} {{rname=Action Menu}} {{name=@{sigismund sunwalker|character_name}}} {{description=[Normal Attack](~sigismund sunwalker|attack_norm) [GWM Attack](~sigismund sunwalker|attack_gwm)}}
Appreciate that!