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

[PF] Pathfinder Attack Button Query Macro

I am trying to create a macro that allows my players to use a drop down query macro to select from say 4 to 5 character sheet macro buttons. What I had envisioned is something like this: ?{Which Weapon? |Weapon 0, @{selected|repeating_weapon_$0_attack-roll} |Weapon 1, @{selected|repeating_weapon_$1_attack-roll} |Weapon 2, @{selected|repeating_weapon_$2_attack-roll} |Weapon 3, @{selected|repeating_weapon_$3_attack-roll} |Weapon 4, @{selected|repeating_weapon_$4_attack-roll}} Is this possible? when I try to use the above it seems to only actually roll the weapon 1 button and does not give me a selection for the other weapon slots. I know about using html to get around certain catches but nothing im trying seems to work. I had hoped to provide my characters with concise macros that grouped all attack options under one button rather than having a separate button for each one. Any suggestions are appreciated.
1474159771
Tetsuo
Forum Champion
To get this to work, you would need to html replace each } and | in the weapon macros with html replacements. The ?{} query ends and executes at the first } 
1474160672
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
In case you aren't aware of it, the PF sheet has built in ability command button menus for skills, attacks, and spells. That is probably the easiest way. It is certainly possible to do it in query form as Franky says above though. If you want to continue with the query, you'll also need to replace any commas in the macro. Do not replace any of these characters that are part of an ability or attribute call. The advanced roll query usage wiki entry:&nbsp;<a href="https://www.google.com/url?sa=t&source=web&rct=j&url=https://wiki.roll20.net/Macros%23Advanced_Usage_for_Roll_Queries&ved=0ahUKEwib0oS03JfPAhXPPB4KHbgSCsQQygQIHDAA&usg=AFQjCNEmJOpVkZaM2fCHHeCtze4l8eGEBA&sig2=m0USfcEpe29j-e03fejxKQ" rel="nofollow">https://www.google.com/url?sa=t&source=web&rct=j&url=https://wiki.roll20.net/Macros%23Advanced_Usage_for_Roll_Queries&ved=0ahUKEwib0oS03JfPAhXPPB4KHbgSCsQQygQIHDAA&usg=AFQjCNEmJOpVkZaM2fCHHeCtze4l8eGEBA&sig2=m0USfcEpe29j-e03fejxKQ</a>
1474186023

Edited 1474186106
vÍnce
Pro
Sheet Author
Scott C. said: In case you aren't aware of it, the PF sheet has built in ability command button menus for skills, attacks, and spells. That is probably the easiest way. It is certainly possible to do it in query form as Franky says above though. Drag those pretty pink command buttons from the sheet to the macro quick bar (rename if you like), then just Pick-n-Click&trade; &nbsp;;-)
Franky H. said: To get this to work, you would need to html replace each } and | in the weapon macros with html replacements. The ?{} query ends and executes at the first }&nbsp; Are you referring to the attack macro with in the sheet itself or the one I set up as a macro button that calls on the sheet? I am aware of using HTML when using query macros that I create.
Vince said: Scott C. said: In case you aren't aware of it, the PF sheet has built in ability command button menus for skills, attacks, and spells. That is probably the easiest way. It is certainly possible to do it in query form as Franky says above though. Drag those pretty pink command buttons from the sheet to the macro quick bar (rename if you like), then just Pick-n-Click&trade; &nbsp;;-) Previously I ran a classic 3.5 campaign and we have just recently converted it over to Pathfinder. I can not for the life of me find any button to drag off the sheet to the macro quick bar. I feel fairly sheepish for asking but what am I missing?
1474226878

Edited 1474227244
vÍnce
Pro
Sheet Author
Gary C. said: Vince said: Scott C. said: In case you aren't aware of it, the PF sheet has built in ability command button menus for skills, attacks, and spells. That is probably the easiest way. It is certainly possible to do it in query form as Franky says above though. Drag those pretty pink command buttons from the sheet to the macro quick bar (rename if you like), then just Pick-n-Click&trade; &nbsp;;-) Previously I ran a classic 3.5 campaign and we have just recently converted it over to Pathfinder. I can not for the life of me find any button to drag off the sheet to the macro quick bar. I feel fairly sheepish for asking but what am I missing? Are you using PF Legacy, Simple, or the default PF Neceros(tabbed) sheet? &nbsp;Make sure the macro quickbar is enabled from My Settings on the right sidebar. &nbsp;I was assuming the default sheet. &nbsp;Appologies if this is not the case. &nbsp;Also, just checked and Legacy, Simple, and Default all allow drag/drop of buttons. &nbsp;So you may just need to enable the quick bar.
1474269609
Tetsuo
Forum Champion
Gary C. said: Franky H. said: To get this to work, you would need to html replace each } and | in the weapon macros with html replacements. The ?{} query ends and executes at the first }&nbsp; Are you referring to the attack macro with in the sheet itself or the one I set up as a macro button that calls on the sheet? I am aware of using HTML when using query macros that I create. I'm referring to every piece of macro text contained within ?{}
1474291885

Edited 1474292075
Vince said: Gary C. said: Vince said: Scott C. said: In case you aren't aware of it, the PF sheet has built in ability command button menus for skills, attacks, and spells. That is probably the easiest way. It is certainly possible to do it in query form as Franky says above though. Drag those pretty pink command buttons from the sheet to the macro quick bar (rename if you like), then just Pick-n-Click&trade; &nbsp;;-) Previously I ran a classic 3.5 campaign and we have just recently converted it over to Pathfinder. I can not for the life of me find any button to drag off the sheet to the macro quick bar. I feel fairly sheepish for asking but what am I missing? Are you using PF Legacy, Simple, or the default PF Neceros(tabbed) sheet? &nbsp;Make sure the macro quickbar is enabled from My Settings on the right sidebar. &nbsp;I was assuming the default sheet. &nbsp;Appologies if this is not the case. &nbsp;Also, just checked and Legacy, Simple, and Default all allow drag/drop of buttons. &nbsp;So you may just need to enable the quick bar. I figured it out. It seems if you have the window pop outs for characters enabled it disables being able to drag macro buttons to the quick bar. Not sure if that is intended or a bug. if you uncheck enabling character sheet pop outs and then drag the buttons it works. Thank you for the response it forced me to dig deeper as I figured it had to be some weird error or setting. I am currently using the default Pathfinder sheet that is tabbed. Would you recommend the legacy sheet over this one?
Franky H. said: Gary C. said: Franky H. said: To get this to work, you would need to html replace each } and | in the weapon macros with html replacements. The ?{} query ends and executes at the first }&nbsp; Are you referring to the attack macro with in the sheet itself or the one I set up as a macro button that calls on the sheet? I am aware of using HTML when using query macros that I create. I'm referring to every piece of macro text contained within ?{} I ask because if you edited the example I gave in my first post with the proper HTML mark ups replacing the offending characters it still doesn't work. Odly enough it actually activates the last button on the list but ignores the rest and the drop down does not display correctly.
1474292955
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Gary, What exactly are you replacing? Are you doing this: ?{Which Weapon? &amp;#124;Weapon 0&amp;#44;&nbsp;@{selected&amp;amp;#124;repeating_weapon_$0_attack-roll&amp;amp;#125; &amp;#124;Weapon 1&amp;#44; @{selected&amp;#124;repeating_weapon_$1_attack-roll&amp;#125; &amp;#124;Weapon 2&amp;#44; @{selected&amp;#124;repeating_weapon_$2_attack-roll&amp;#125; &amp;#124;Weapon 3&amp;#44; @{selected&amp;#124;repeating_weapon_$3_attack-roll&amp;#125; &amp;#124;Weapon 4&amp;#44; @{selected&amp;#124;repeating_weapon_$4_attack-roll&amp;#125;} Or are you replacing the text that is inside the macro text field of the actual ability? - This is what you should be doing, if it is not querying properly you have missed one or more problem characters, or potentially escaped something that you shouldn't have escaped (like an attribute or ability call).
1474294956

Edited 1474295033
Scott C. said: Hi Gary, What exactly are you replacing? Are you doing this: ?{Which Weapon? |Weapon 0,&nbsp;@{selected&#124;repeating_weapon_$0_attack-roll&#125; |Weapon 1, @{selected|repeating_weapon_$1_attack-roll} |Weapon 2, @{selected|repeating_weapon_$2_attack-roll} |Weapon 3, @{selected|repeating_weapon_$3_attack-roll} |Weapon 4, @{selected|repeating_weapon_$4_attack-roll}} Or are you replacing the text that is inside the macro text field of the actual ability? - This is what you should be doing, if it is not querying properly you have missed one or more problem characters, or potentially escaped something that you shouldn't have escaped (like an attribute or ability call). Your example is what I tried the first time. However when I replace all the problem characters like that it throws a "TypeError: c is undefined" error. If I replace only the last "}" in each selection, which was all that was necessary in some other macros I created, it will actually display the drop down box but with the choices displaying correctly. It seems like it should work but I havent found a solution. I figured I was missing something simple as I am no expert but I thought I would bounce it off the forums and see what turned up.
1474295579
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
ah, ok, you actually need to go into your sheet and modify the repeating ability's macro text to replace any bars, commas, or end curly braces that are not part of a ability or attribute call. I wouldn't actually recommend doing this as this will make the macro usable only from within the roll query (clicking on the roll button on the sheet will not result in some funky formatting.
Scott C. said: ah, ok, you actually need to go into your sheet and modify the repeating ability's macro text to replace any bars, commas, or end curly braces that are not part of a ability or attribute call. I wouldn't actually recommend doing this as this will make the macro usable only from within the roll query (clicking on the roll button on the sheet will not result in some funky formatting. that is what I had hoped to avoid but suspected might be the case. I guess ill live with the default buttons that whisper the the PC's for now. I made macros that any of the pc's can use as token macros and that cleaned up the amount necessary by quite a bit. I was just hoping to use drop down queries as I much prefer them to the chat button whispers but they will work. Regardless I very much appreciate your response and help.