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

Still failing to understand Macros and Templates

So in an effort to lessen the number of buttons I currently have attached to my player's tokens I'm trying to combine macros into dropdown 'branching' quarry macros but I can't seam to get it to properly set it up and can't for the life of me see what I'm doing wrong. Master Macro: ?{Type of attack? |Normal, #Normal-Melee-Attack |Epic, #Epic-Melee-Attack |Hexed, #Hexed-Melee-Attack} Linked Macros: /em &{template:default} {{name=Melee Attack Roll}} {{@{selected|token_name} takes a swing at @{target|token_name} with ?{Weapon?|@{selected|Weapon3}|@{selected|Weapon4} } }} {{result=[[1d20+(@{Selected|Mac|Max}) ]] }} /em &{template:default} {{name=Melee Attack Roll}} {{@{selected|token_name} takes a swing at @{target|token_name} with ?{Weapon?|@{selected|Weapon3}|@{selected|Weapon4} } }} {{result=[[?{# of Die?|1}d20sdkh1+(@{Selected|Mac|Max}) ]] }} /em &{template:default} {{name=Melee Attack Roll}} {{@{selected|token_name} takes a swing at @{target|token_name} with ?{Weapon?|@{selected|Weapon3}|@{selected|Weapon4} } }} {{result=[[?{# of Die?|1}d20sdkl1+(@{Selected|Mac|Max}) ]] }} Note that each of those macros work on their own but whenever I try to launch them through the quarry instead of a drop down list with the three choices I get an editable field with the first bit of the tied macro in it [ /em &{template:default ] Any help or advice would be much welcomed.
1489250826

Edited 1489251274
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, welcome to the crazy world of  advanced roll queries . If you are dead set on using roll queries, then you will need to replace commas (,), bars (|), and end curly braces (}) with their html encodings (,,|,} respectively). This is of course a lot of work and is more complicated because you do not need to (and should never * ) replace these characters if they are part of an attribute/ability call (e.g. @{Jonos|BAB} does not get any replacements). I notice that your macros are made as global macros. This will be a problem for doing these html encodings as the global macro editor eats a level of encodings every time it is opened and resaved. If you are going to go this route, I would strongly advise moving these macros into abilities on your character. There is however another option to still consolidate macro buttons without the craziness of advanced roll queries. I would recommend making an  ability or  API **  command button menu macro to output a menu of clickable buttons for each macro to chat. If you go with ability command buttons (simpler syntax, and no html encodings necessary) you will need to move these macros into abilities on your character. If you want them to be global macros still, then you will need to use API command buttons which will require some minor html encoding in the menu macro. If you still want to use a roll query to accomplish this, then you may be interested in the  roll query nester google sheet that I made. * There is a very specific use case in which you would replace these in an ability/attribute call for some fanciness with api command buttons. ** API command buttons do not require access to API scripts or any paid subscription. The name is simply because of what they were designed for, not because they can only be used in that way. EDIT: Just realized you are doing this for your players. Disregard the part about putting the macros in your character. I would instead recommend making an "Abilities" character. Make these macros as abilities on that character. Give all your players control of the character and then archive it. They will still be able to access the abilities via %{Abilities|abilityName}, but won't be able to open the character to mess with any of them.
1489263747
Silvyre
Forum Champion
Scott always gives a great overview of advanced Roll Queries. I personally recommend trying to avoid using them for the reasons mentioned. In this case, you might be able to get away with just that: /em &{template:default} {{name=Melee Attack Roll}} {{@{selected|token_name} takes a swing at @{target|token_name} with ?{Weapon?|@{selected|Weapon3}|@{selected|Weapon4} } }} {{result=[[ ?{# of Die?|1}d20sd?{Type of attack?|Normal, |Epic,kh1|Hexed,kl1} + (@{selected|Mac|max}) ]] }}
1489268796

Edited 1489271680
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks Silvyre, Its all stuff I learned from you and the rest of the forum, particularly qwerty123. Happy to pass it on.
Thanks for the quick and informative response all, this will help out quite a bit.
1489296197
Andrew C
Marketplace Creator
And if you're insane enough to start sticking Roll Queries inside API Command Buttons... then I'll pray for you. It's about the best help I can give and I'm doing a bunch of that sort of stuff (sometimes Roll Queries inside tables, inside API Command Buttons...)