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

Frustrating Query!!

1668719607

Edited 1668719664
I can't figure out why this doesn't call the Macro selected in the query.       ?{Attack Options|Sneak,#Sneak|Mark,#Mark|Slayer,#Slayer|Foe,#Foe|Superior,#Superior} I's really like to set up a yes/no query for each option that will call the macro if yes is selected. But that seems absolutely impossible for some reason (character substitution).
1668719998

Edited 1668720100
Gauss
Forum Champion
My guess, your macro is incompatible with queries due to the macro's code.  You see:  ?{Attack Options|Sneak,#Sneak|Mark,#Mark|Slayer,#Slayer|Foe,#Foe|Superior,#Superior} Roll20 sees: ?{Attack Options|Sneak,macro code|Mark,more macro code|...... If any of those macros have a "}" in them they will break the query because "}" is the end of a query.  Similar problems arise if they have a "," or "|" in the macro.  You will want to use HTML entities to replace those characters in your macros. A warning though: HTML entities can get really confusing and frustrating. If that happens to you you may want to switch to a Chat Menu . Chat menus avoid problems with queries. 
That's exactly what's happening. Can you replace all " } " with HTML code in the macros being called or just particular ones. 
1668720499

Edited 1668720741
Gauss
Forum Champion
Nope, some things will break of their own accord if you use HTML entities on them. This link discusses that. If you post a sample of the macro code for your attacks we might be able to tell you if you will be diving deep down the HTML entity rabbit hole or not.  For example, sometimes the HTML entities have to be multiple layers deep. An HTML entity replaced by another HTML entity, and so on.  After the first iteration most folks just switch to chat menus...far easier to work with.
Thanks, that's good information. Seems much more complicated than it should be.
1668720753

Edited 1668720760
Gauss
Forum Champion
(note: I edited my above post) One other note, I see you are using Collection tab macros, best practice is to NOT use collection tab macros. Use Ability macros instead. There are a number of reasons to do that.  If you are making a macro for all of your players, then make a Macro Mule (character) and then make the Ability macros there, then everyone can call the macro mule Ability macros. 
What are the macros for #Sneak and so on? [[ ?{ Sneak|Yes,#Sneak|No, }+   ?{ Mark |Yes, #Mark| No, }+ ?{ Slayer |Yes ,#Slayer| No, }+ ?{ Foe |Yes ,#Foe| No, }+ ?{ Superior |Yes ,#Superior| No,  }]]
1668735489

Edited 1668735542
Gauss
Forum Champion
Perhaps I didn't clarify enough. Lets ask it this way: What is the macro for #Sneak? (Open macro, copy the text, paste it here please) What is the macro for #Mark?  (Open macro, copy the text, paste it here please) What is the macro for #Slayer?  (Open macro, copy the text, paste it here please) What is the macro for #Foe?  (Open macro, copy the text, paste it here please) What is the macro for #Superior?  (Open macro, copy the text, paste it here please) Knowing each of those macros will let me (and others) help you to try to get the query working, or advise you as to why it will not work at all.
&{template:default} {{name=*Sylvan Scimitar*}} {{Normal (+6)=[[1d20+6]]}} {{Slashing (+6)=[[1d6+6]]}} {{*Sneak Attack* (d6)=[[1d6]]}} &{template:default} {{name=*Sylvan Scimitar*}} {{Normal (+6)=[[1d20+6]]}} {{Slashing (+6)=[[1d6+6]]}} {{*Hunter's Mark* (d6)=[[1d6]]}} &{template:default} {{name=*Sylvan Scimitar*}} {{Normal (+6)=[[1d20+6]]}} {{Slashing (+6)=[[1d6+6]]}} {{*Slayer’s Prey* (d6)=[[1d6]]}} &{template:default} {{name=*Sylvan Scimitar*}} {{Normal (+6)=[[1d20+6]]}} {{Slashing (+6)=[[1d6+6]]}} {{*Favored Foe* (d4)=[[1d4]]}} &{template:default} {{name=*Sylvan Scimitar*}} {{Normal (+6)=[[1d20+6]]}} {{Slashing (+6)=[[1d6+6]]}} {{*Superiority Dice* (d8)=[[1d8]]}}
1668783569

Edited 1668783727
@Kilter That's really what I'm looking for and you think it would be easy, but the character substitution makes it so much more complicated than it should be. Would it be better to go with a macro mule or a chat menu. Would the query work with a macro mule? The chat menu works, but it doesn't seem to move between characters easily. I have macros for the bows and spells too so the chat menu gets really big really quick.
1668784087
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Linky: Macro Mule, aka  Macro Character Sheet .
What game are you playing and which character sheet? If it's D&D 5th edition using the 'D&D 5E by Roll20' character sheet, then you could use a  Universal Chat Menu .
D&D 5E by Roll20 I am leaning in that direction (macro mule). Do you need a different mule for every class to set this up or can you set up a multiclass to cover most of the different characters I'm playing? How Universal can it be?
1668785152
Kraynic
Pro
Sheet Author
Did you check out the link Jarren provided? That should answer your questions as to what all it covers.
@Kraynic Ok, Ok... I'll admit that's more useful than I first thought. Thanks @Jarren!!
Just make it one macro with all the choses in it and not a separate template for each option. &{template:default} {{name=*Sylvan Scimitar*}} {{Slashing (+6)=  [[ [[1d6+6]]  ?{ Sneak|Yes,+[[1d6 ]] [sneak] |No,  }  ?{ Mark |Yes,+[[1d6 ]] [mark]  | No,  } ? { Slayer |Yes ,+[[1d6]] [slayer] | No,  } ? { Foe |Yes ,+[[1d4]] [foe] | No, }  ?{ Superior |Yes ,+[[1d8]] [superior] | No,   } ]] }}