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

Nesting a macro into a roll query

1606327221

Edited 1606327255
Hey! I'm trying to create a "spellbook" rollquery for a bard (one of my players' pathfinder character). I describe all the steps I followed beneath. I would love for you guys and gals to tell me where I went wrong or whether what I'm asking is too complicated for roll20. Help please.... So the main idea was to create a rollquery for each level which would look like this (but with more spells): &{template:default}{{name=Cast spell}}{{?{Cast Spell|Mending|Resistance|Ghost sounds}}} I then created a macro for mending spell which looks like this : &{template:default}{{name=Mending}}{{Description=As Tristan sings a few notes, the item seems to repair itself, coaxed by his voice}}{{Saving throw=Will vs 14}}{{Heals=[[1d4]] hp}}{{Full Effect=@{Tristan Ironheart|mendingdesc}}} It worked fine on its own, so I (naïvely) thought that doing this would work: &{template:default}{{name=Cast spell}}{{?{Cast Spell|Mending, #mending|Resistance|Ghost sounds}}} After fishing around, I discovered I was supposed to replace "}" with "}". So I took the mending macro which I modified thus: &{template:default}{{name=Mending &#125&#125 {{Description=As Tristan sings a few notes, the item seems to repair itself, coaxed by his voice &#125&#125 {{Saving throw=Will vs 14 &#125&#125 {{Heals=[[1d4]] hp &#125&#125 {{Full Effect=@{Tristan Ironheart|mendingdesc} &#125&#125 I then took that macro and replaced the #mending with it: &{template:default}{{name=Cast spell}}{{?{Cast Spell|Mending, &{template:default}{{name=Mending &#125&#125 {{Description=As Tristan sings a few notes, the item seems to repair itself, coaxed by his voice &#125&#125 {{Saving throw=Will vs 14 &#125&#125 {{Heals=[[1d4]] hp &#125&#125 {{Full Effect=@{Tristan Ironheart|mendingdesc} &#125&#125  |Resistance|Ghost sounds}}} Yet, when I click on the mending option, it only shows "Cast Spell" in the chat. Help? Hély
It looks like the macro is breaking because of how Roll20 parses macros and queries.  I'd suggest setting this up with a Chat Menu and/or  Macro Character Sheet ('Macro Mule'). It's much easier to set up that way and test which parts are breaking.
Jarren K. said: It looks like the macro is breaking because of how Roll20 parses macros and queries.  I'd suggest setting this up with a Chat Menu and/or  Macro Character Sheet ('Macro Mule'). It's much easier to set up that way and test which parts are breaking. Thanks for the answer. So a macro mule is a character sheet used to stock my macros. On the other hand I have trouble understanding what the chat menu and how it works. Would it be possible for you to explain it to me in simpler terms? Thanks!  And just in case, do you know a forum where I can paste my macros to have others review them? Thanks!
Basically a chat menu will put a series of buttons into the chat bar that can be clicked on to activate a macro, instead of using a dropdown menu.&nbsp; Here's an example I wrote up previously for someone to create a Healing Potion chat menu:&nbsp; <a href="https://app.roll20.net/forum/post/9174202/fun-macros-for-non-api-users-such-as-myself/?pageforid=9191078#post-9191078" rel="nofollow">https://app.roll20.net/forum/post/9174202/fun-macros-for-non-api-users-such-as-myself/?pageforid=9191078#post-9191078</a> This is the forum for asking questions about macros, but once you get into nested queries the most common advice is to use a chat menu because of how difficult it is to write and how easily they break.
So for this example, you would create a macro called "Spell List".&nbsp; You could put it on a macro mule, or directly on Tristan Ironheart's character sheet, or in the Collections tab, or just type it into the chat window: &amp;{template:default}{{name=Spell List}} {{1=[Mending](~Tristan Ironheart|Mending)}} {{2=[Resistance](~Tristan Ironheart|Resistance)}} {{3=[Ghost Sounds](~Tristan Ironheart|GhostSounds)}} Then for each spell, on Tristan Ironheart's character sheet, create an ability macro for that spell. Here's your example for Mending: &amp;{template:default}{{name=Mending}}{{Description=As Tristan sings a few notes, the item seems to repair itself, coaxed by his voice}}{{Saving throw=Will vs 14}}{{Heals=[[1d4]] hp}}{{Full Effect=@{Tristan Ironheart|mendingdesc}}} You'll get a list of spells in the chat bar that you can click on to call the macros from his character sheet.
Jarren K. said: So for this example, you would create a macro called "Spell List".&nbsp; You could put it on a macro mule, or directly on Tristan Ironheart's character sheet, or in the Collections tab, or just type it into the chat window: &amp;{template:default}{{name=Spell List}} {{1=[Mending](~Tristan Ironheart|Mending)}} {{2=[Resistance](~Tristan Ironheart|Resistance)}} {{3=[Ghost Sounds](~Tristan Ironheart|GhostSounds)}} Then for each spell, on Tristan Ironheart's character sheet, create an ability macro for that spell. Here's your example for Mending: &amp;{template:default}{{name=Mending}}{{Description=As Tristan sings a few notes, the item seems to repair itself, coaxed by his voice}}{{Saving throw=Will vs 14}}{{Heals=[[1d4]] hp}}{{Full Effect=@{Tristan Ironheart|mendingdesc}}} You'll get a list of spells in the chat bar that you can click on to call the macros from his character sheet. It works!!! Thank you so much!!!