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 .
×

Roll Query Not Activating Macros

I'm very very new to making macros so this might just be something very simple that I'm missing. I have a player who is a psion so I wanted to try making a nesting roll query, so he could use his abilities more efficiently. So I made one macro for an energy stun, and then started practicing a nesting macro using that. It's made almost entirely from the Wiki's macro.  ?{Which macro?|Attack, #Energy-Stun|Defend, #use-shield} When typing in this macro it lets me autocomplete Energy-Stun. When I use this roll query the drop down list shows up properly, but when I select attack rather then using the energy stun macro it just types #Energy-Stun in the chat. So I'm just not sure how to actually get the roll query to activate a macro.  Also when I try adding a space after #Energy-Stun the drop down list doesn't work. Instead it has a pop up with the input value saying: Attack, &{template:DnD35StdRoll   Again I'm really new to this so I'm not sure what I'm doing wrong or what is even happening, but I feel like I'm onto something cool. I tried looking up this issue, but I just can't figure it out.
I think there's two issues here: 1. You have a space after the commas in the query. If should be: ?{Which macro?|Attack,#Energy-Stun |Defend,#use-shield } 2. You are running into the nested query macro issue. <a href="https://wiki.roll20.net/Macros#Nesting_Macros" rel="nofollow">https://wiki.roll20.net/Macros#Nesting_Macros</a> Due to the&nbsp; order of operations , Macro calls nested within Roll Queries are fully expanded before the Roll Query is executed. This means that if a macro nested within a Roll Query contains any "problematic characters" that conflict with Roll Query syntax (such as "}" "," and "|"), that nested macro may cause the Roll Query to break (because the Roll Query will treat problematic characters in the called macro as Roll Query syntax). This is a common issue, where basically Roll10 expands all of the macros in the nested query, so it becomes: ?{Which macro?|Attack,&amp;{template:DnD35StdRoll} ... As soon as the first } is seen from&nbsp; &amp;{template:DnD35StdRoll} , Roll20 closes the query. The better option is to use a chat menu.&nbsp; <a href="https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=5927072#post-5927072" rel="nofollow">https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=5927072#post-5927072</a>
1604492094
GiGs
Pro
Sheet Author
API Scripter
Note that as a chat menu, the code is very similar: ?{Which macro?|Attack,[Attack](!&amp;#13;#Energy-Stun) |Defend,[Defend](!&amp;#13;#use-shield) } or if you want to make it a touch prettier and descriptive &amp;{template:default}{{name=Macros}} {{?{Which macro?|Attack,[Energy Stun](!&amp;#13;#Energy-Stun) |Defend,[Shield](!&amp;#13;#use-shield) } }} Both of these contain this string: !&amp;#13; The link Jarren posts mentions ways to get around that.
I was able to get things working fairly well from the advice given, and doing the chat menu code. It now posts a button in the chat that they can press which will activate the selected macro. This is super cool, thank you so much for the help.&nbsp;