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 with Macros called in Query

I have made 3 Macros and they are running great on their own, here they are: #Center-Strikes:  &{template:default} {{name=Center-Strike }} {{Hit Placement=[[d10]] }} {{Precision Points=[[?{Precision Points|0}]]}} {{}} {{Neck = 10}} {{Arm =  9,8 }} {{Hand = 7}}   {{Chest = 6,5}} {{Rib = 4,3}} {{Thigh = 1,2}} #Lower-Strikes: &{template:default} {{name=Lower-Strike }} {{Hit Placement=[[d10]] }} {{Precision Points=[[?{Precision Points|0}]]}} {{}} {{Abdomen = 10,9,8}} {{Thigh = 7,6,5 }} {{ Knee = 4}}   {{Shin = 3,2}} {{Foot = 1}} #Upper-Strikes: &{template:default} {{name=Upper-Strike }} {{Hit Placement=[[d10]] }} {{Precision Points=[[?{Precision Points|0}]]}} {{}} {{Head = 10}} {{ Neck =  9 }} {{Shoulder = 8}}   {{ Arm = 7}} {{Hand = 6}} {{Rib = 5,4}} {{Chest = 3,2,1}}. They run great on their own but when i try to call them in this macro:   ?{Attack Height: | up , #Upper-Strikes |mid , #Center-Strikes |low, #Lower-Strikes  }  They are not selectable. Is there a way around this or one just simply can't call Macros in Query? Sorry for the Bad English, Cuddos from Brazil
1593699740

Edited 1593699827
Oosh
Sheet Author
API Scripter
You've run into a very common problem - nesting inside Queries. The problem is that Queries are looking for these characters for instructions: } | , so you need to remove them from the code inside the Query or it will break. This wiki page has more info. You need to replace those three characters with HTML entities (except for where you are calling Attributes, for example @{character|attribute}). As you don't have any Attribute calls in your macro, you need to replace all of those characters with } = } | = | , = , If you save these as Collections macros, then reopen them later, you will lose all your HTML replacement , so it is recommended you save these on a macro character sheet as Ability macros. So your first macro would look like this: &{template:default} {{name=Center-Strike }} {{Hit Placement=[[d10]] }} {{Precision Points=[[?{Precision Points|0}]]}} {{}} {{Neck = 10}} {{Arm =  9,8 }} {{Hand = 7}}   {{Chest = 6,5}} {{Rib = 4,3}} {{Thigh = 1,2}} It will no longer run by itself with the HTML replacement, and will only work inside a Query. You can also just smash the whole thing together into one macro... Here is the full code, since it was an easy replacement :) ?{Attack Height: | up,&{template:default} {{name=Center-Strike }} {{Hit Placement=[[d10]] }} {{Precision Points=[[?{Precision Points|0}]]}} {{}} {{Neck = 10}} {{Arm =  9,8 }} {{Hand = 7}}   {{Chest = 6,5}} {{Rib = 4,3}} {{Thigh = 1,2}}| mid,&{template:default} {{name=Lower-Strike }} {{Hit Placement=[[d10]] }} {{Precision Points=[[?{Precision Points|0}]]}} {{}} {{Abdomen = 10,9,8}} {{Thigh = 7,6,5 }} {{ Knee = 4}}   {{Shin = 3,2}} {{Foot = 1}}| low,&{template:default} {{name=Upper-Strike }} {{Hit Placement=[[d10]] }} {{Precision Points=[[?{Precision Points|0}]]}} {{}} {{Head = 10}} {{ Neck =  9 }} {{Shoulder = 8}}   {{ Arm = 7}} {{Hand = 6}} {{Rib = 5,4}} {{Chest = 3,2,1}} }
Oh, thanks a lot man. that was very enlightening!
1593700624
Oosh
Sheet Author
API Scripter
No worries, it's a very common problem!
I found that with an advanced text editor(using Sublime Text 3) i was easily able to just copy the scripts, make an CTRL+H on the '}' '|' and ',' and replace them all with the correspondig codes, just copied the new text to roll20 and BAM! Everything works beautifully