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 .
×
Advertisement Create a free account

Help with query group macro

/w GM &{template:pf_generic}{{name=Group ?{What?}}}{{Nigel=[[1d20+@{Nigel Inork|?{What?}}]] }}{{@{Shargok|character_name}=[[1d20+@{Shargok|?{What?}}]] }}{{@{Lembo Turinam|character_title}=[[1d20+@{Lembo Turinam|?{What?}}]] }} {{@{Skorina Peritte Eisenhart|character_title}=[[1d20+@{Skorina Peritte Eisenhart|?{What?}}]] }} The idea is to be asked "What?" and reply say "Perception" and then it replaces all the "?{What?}"s with with "Perception"s, which then rolls a Group check for that. Next time same macro could be used for will or acrobatics or stealth or who knows. - Problem seems to be that it's trying to resolve @{charname|...} before resolving the query, thus not finding any attribute named @{charname|?{What?}}. Is there a way to do this?
1453180860

Edited 1453180919
Silvyre
Forum Champion
Julix said: Problem seems to be that it's trying to resolve @{charname|...} before resolving the query, thus not finding any attribute named @{charname|?{What?}}. Indeed; this is due to the order of operations . You might do well to handle this using an advanced Roll Query . e.g. /w GM &{template:pf_generic} ?{Skill| Perception, {{Nigel=[[1d20+@{Nigel Inork|perception}]] }}{{@{Shargok|character_name}=[[1d20+@{Shargok|perception}]] }}{{@{Lembo Turinam|character_title}=[[1d20+@{Lembo Turinam|perception}]] }} {{@{Skorina Peritte Eisenhart|character_title}=[[1d20+@{Skorina Peritte Eisenhart|perception}]] }} | Survival, {{Nigel=[[1d20+@{Nigel Inork|survival}]] }}{{@{Shargok|character_name}=[[1d20+@{Shargok|survival}]] }}{{@{Lembo Turinam|character_title}=[[1d20+@{Lembo Turinam|survival}]] }} {{@{Skorina Peritte Eisenhart|character_title}=[[1d20+@{Skorina Peritte Eisenhart|survival}]] }} | etc., etc. | etc., etc. }
Silvyre said: Julix said: Problem seems to be that it's trying to resolve @{charname|...} before resolving the query, thus not finding any attribute named @{charname|?{What?}}. Indeed; this is due to the order of operations . You might do well to handle this using an advanced Roll Query . e.g. /w GM &{template:pf_generic} ?{Skill| Perception, {{Nigel=[[1d20+@{Nigel Inork|perception}]] }}{{@{Shargok|character_name}=[[1d20+@{Shargok|perception}]] }}{{@{Lembo Turinam|character_title}=[[1d20+@{Lembo Turinam|perception}]] }} {{@{Skorina Peritte Eisenhart|character_title}=[[1d20+@{Skorina Peritte Eisenhart|perception}]] }} | Survival, {{Nigel=[[1d20+@{Nigel Inork|survival}]] }}{{@{Shargok|character_name}=[[1d20+@{Shargok|survival}]] }}{{@{Lembo Turinam|character_title}=[[1d20+@{Lembo Turinam|survival}]] }} {{@{Skorina Peritte Eisenhart|character_title}=[[1d20+@{Skorina Peritte Eisenhart|survival}]] }} | etc., etc. | etc., etc. } Not what I wanted (i.e. finite instead of any attribute you know the name/spelling of) but it works for these purposes, as there's not that many things that a group will do together, I guess. I made it include Perception; Will Ref Fort; Stealth, Sense motive and survival. Any other ones that I should consider?  Also any idea on how to write it without specific characters? Is there a way to roll this for all player characters (without having to mention them by name)? I'm looking for a way to make this code something that a beginner GM can just copy without having to go through and change the name in various places...
1453187054
Silvyre
Forum Champion
Yeah, you can used targeted Attributes, @{target|1st Character|...}, etc.
1453187289

Edited 1453187365
Silvyre said: Yeah, you can used targeted Attributes, @{target|1st Character|...}, etc. I thought target is for clicking at them... or are you saying you can click at multiple people? Oh sure, just write it multiple times in the code... that actually could work, that's pretty cool... also that way you're not rolling say will for the entire party but only those that you click at someone for? hm...  sounds great! I'll try it when I get motivated again (as your earlier solution works fine for my personal needs). Thanks again!
1453187411
Silvyre
Forum Champion
No problem. Full syntax here.
One more thought: is there a way to cancel one of the targetings while running the rest? i.e. if I write it for four characters, but I want it to affect only two, do I have to target someone repeatedly and just ignore that result?
1453188199
Silvyre
Forum Champion
Roll Queries will only display tags with the same name once, so if you target someone more than once, and the name of each tag is just the name of the targeted token (e.g. {{@{target|4th Target|token_name}=...}}), you can effectively discard excess targeted tokens by clicking on a token more than once.
1453191233

Edited 1453281659
Silvyre said: Roll Queries will only display tags with the same name once, so if you target someone more than once, and the name of each tag is just the name of the targeted token (e.g. {{@{target|4th Target|token_name}=...}}), you can effectively discard excess targeted tokens by clicking on a token more than once. That doesn't seem to be the case for me. This @{target|foe1|AC} @{target|foe2|AC} @{target|foe3|AC} Returns this if I press on three different characters 20 19 26 and this if I press on one and then the second one twice. 20 19 19 So it looks like the .... &nbsp;Oh! Queries! Good point.&nbsp; (Goes off to experiment some more...)&nbsp; ?{conten?|@{target|foe1|AC} | @{target|foe2|AC} | @{target|foe3|AC}} Gives me the option of the various AC - which is somehow hilarious to me right now (slightly sleep deprived). .... Much later,&nbsp;You were right of course.&nbsp; /w GM &{template:pf_generic} ?{Skill?|Perception, {{name=Group Perception&#125;&#125; {{@{target|char1|character_name}=[[1d20+@{target|char1|perception}]] &#125;&#125;{{@{target|char2|character_name}=[[1d20+@{target|char2|perception}]] &#125;&#125;{{@{target|char3|character_name}=[[1d20+@{target|char3|perception}]] &#125;&#125;| {{@{target|char4|character_name}=[[1d20+@{target|char4|perception}]] &#125;&#125;| {{@{target|char5|character_name}=[[1d20+@{target|char5|perception}]] &#125;&#125;| | ~~Saves~~| Fortitude, {{name=Group Fortitude&#125;&#125; {{@{target|char1|character_name}=[[1d20+@{target|char1|Fort}]] &#125;&#125;{{@{target|char2|character_name}=[[1d20+@{target|char2|Fort}]] &#125;&#125;{{@{target|char3|character_name}=[[1d20+@{target|char3|Fort}]] &#125;&#125;| {{@{target|char4|character_name}=[[1d20+@{target|char4|Fort}]] &#125;&#125;| {{@{target|char5|character_name}=[[1d20+@{target|char5|Fort}]] &#125;&#125;| | Reflex, {{name=Group Reflex&#125;&#125; {{@{target|char1|character_name}=[[1d20+@{target|char1|Ref}]] &#125;&#125;{{@{target|char2|character_name}=[[1d20+@{target|char2|Ref}]] &#125;&#125;{{@{target|char3|character_name}=[[1d20+@{target|char3|Ref}]] &#125;&#125;| {{@{target|char4|character_name}=[[1d20+@{target|char4|Ref}]] &#125;&#125;| {{@{target|char5|character_name}=[[1d20+@{target|char5|Ref}]] &#125;&#125;| | Will, {{name=Group Will&#125;&#125; {{@{target|char1|character_name}=[[1d20+@{target|char1|Will}]] &#125;&#125;{{@{target|char2|character_name}=[[1d20+@{target|char2|Will}]] &#125;&#125;{{@{target|char3|character_name}=[[1d20+@{target|char3|Will}]] &#125;&#125;| {{@{target|char4|character_name}=[[1d20+@{target|char4|Will}]] &#125;&#125;| {{@{target|char5|character_name}=[[1d20+@{target|char5|Will}]] &#125;&#125;| | ~~Skills~| Stealth, {{name=Group Stealth&#125;&#125; {{@{target|char1|character_name}=[[1d20+@{target|char1|Stealth}]] &#125;&#125;{{@{target|char2|character_name}=[[1d20+@{target|char2|Stealth}]] &#125;&#125;{{@{target|char3|character_name}=[[1d20+@{target|char3|Stealth}]] &#125;&#125;| {{@{target|char4|character_name}=[[1d20+@{target|char4|Stealth}]] &#125;&#125;| {{@{target|char5|character_name}=[[1d20+@{target|char5|Stealth}]] &#125;&#125;| | Sense Motive, {{name=Group Sense-Motive&#125;&#125; {{@{target|char1|character_name}=[[1d20+@{target|char1|Sense-Motive}]] &#125;&#125;{{@{target|char2|character_name}=[[1d20+@{target|char2|Sense-Motive}]] &#125;&#125;{{@{target|char3|character_name}=[[1d20+@{target|char3|Sense-Motive}]] &#125;&#125;| {{@{target|char4|character_name}=[[1d20+@{target|char4|Sense-Motive}]] &#125;&#125;| {{@{target|char5|character_name}=[[1d20+@{target|char5|Sense-Motive}]] &#125;&#125;| | Survival, {{name=Group Survival&#125;&#125; {{@{target|char1|character_name}=[[1d20+@{target|char1|Survival}]] &#125;&#125;{{@{target|char2|character_name}=[[1d20+@{target|char2|Survival}]] &#125;&#125;{{@{target|char3|character_name}=[[1d20+@{target|char3|Survival}]] &#125;&#125;| {{@{target|char4|character_name}=[[1d20+@{target|char4|Survival}]] &#125;&#125;| {{@{target|char5|character_name}=[[1d20+@{target|char5|Survival}]] &#125;&#125;| } It is done... eeks.&nbsp; Anything else a GM might routinely want from his players or NPCs? Initiative maybe, but is it faster for the GM to click 5 times than for each player to click once? Thanks for your help in this. Any feedback on content or such before I put it on Wiki would be appreciated. :) Julix Edit: it's in&nbsp; <a href="https://wiki.roll20.net/Pathfinder_Macros#Group_Ro" rel="nofollow">https://wiki.roll20.net/Pathfinder_Macros#Group_Ro</a>... Note that page is still in early early development. The idea is to have it become an index of useful pathfinder related macros that can be copied as is. I'll add code for various class features from sneak attack dice auto calculation to other things. Contributions much appreciated. I'll try and take the code from the Pathfinder Macro Example page (which is for teaching you how to make your own macros) and turn them into general ones for those unwilling or unable to make their own.&nbsp;
1453226459
Silvyre
Forum Champion
Silvyre said: Roll Templates will only display tags with the same name once Apologies for the confusion! :)
1453226614

Edited 1453226735
Silvyre
Forum Champion
Julix said: Any feedback on content or such before I put it on Wiki would be appreciated. :) You'll need to add in the HTML entities (and it wouldn't hurt to mention, on the page, that since the macro contains HTML entities, it must be saved as an Ability).
1453242135
vÍnce
Pro
Sheet Author
Silvyre said: Julix said: Any feedback on content or such before I put it on Wiki would be appreciated. :) You'll need to add in the HTML entities (and it wouldn't hurt to mention, on the page, that since the macro contains HTML entities, it must be saved as an Ability). +1000
1453281370

Edited 1453281710
Good catch! I swear it used to have entities... I must have forgotten the code box and added it after or something like that. - anyways, it's in, as is the comment. Anything else? Should I have included initiative in the macro or is there anything else that you can think of that I should add? EDIT: GHAA! It didn't save again! If not even the code format can keep it from turning HTML entities into symbols, how do I accomplish that?
1453309778
Silvyre
Forum Champion
Julix said: If not even the code format can keep it from turning HTML entities into symbols, how do I accomplish that? How I handle this
1453315002

Edited 1453315028
From link Silvyre said: Whenever I'm working on a post that contains a macro with multiple HTML entities, I'll type it out in some external text editor (e.g. Notepad++) with all instances of & replaced with &amp;amp; such that when I paste the macro into the forum's redactor box (which converts the entities) and submit the post (which converts them again), these two extra "layers" of entities are converted, revealing the initial level. e.g. I'll type out &#125; into Notepad++, find &, replace it with &amp;amp; and then paste it and post it! It's a bit of a hassle, but I'm hoping it's only a temporary one... :) I'm not sure how that is supposed to work. I thought amp is just for & signs? Also seriously? :O - There has got to be a better way than that... :O
1453317027
Silvyre
Forum Champion
Try pasting &amp;amp;amp;#125; into a forum post, submitting it, and find out.
1453317556

Edited 1453317675
Silvyre said: Try pasting &#125; into a forum post, submitting it, and find out. &#125; -- Edit: works. Alright, shouldn't be too bad to search and replace, if the function works out.. but you'd really think there'd be a way to keep it from doing that in a section of the post...
Still haven't gotten around to that, but I will. Another issue was that I thought adding initiative might be nice, but tracker requires a token be selected. Any way that I can make tracker accept target rather than selected?