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

Macro | Query to seek ans regroup in a chart multiple players ability score

1594850675

Edited 1594857189
Hey Community ! Here is my challenge. I want to create a macro that will seek and display a specific ability score for each of my players with a single click (or 2). Like, if I want to know every players Passive Perception or Investigation score without asking for it, because you know... players... I already have my paper sheet as my backup plan. But I thought writing a macro... and I am stucked. Here is my draft, but I am open to other templates or ways to do it ! /w gm &{template:default} {{name=Player Ability}} {{?{Ability|Arcana,Player_1=@{Player_1|arcana_ bonus} Player_2 =@{Player_2|arcana_bonus}| } }} Seems that I have a problem to add a row in the chart to separte players score. Something that would maybe be between " bonus}"  and " Player_2" ... Counting on you Community ! Thanks in advance Lye
1594857933

Edited 1594857995
Oosh
Sheet Author
API Scripter
You can't throw a line break into the middle of a Query without breaking it, unfortunately. The only place you can do it is at the pipe | between Query options. The easiest way for this macro would be to make use of the default template properties. This will require some HTML entities as we need to use } closing curlies which will end the Query if we don't use HTML: /w gm &{template:default} {{name=Player Ability}} {{?{Ability| Arcana,Player_1=@{Player_1|arcana_bonus}}} {{Player_2=@{Player_2|arcana_bonus}| Acrobatics,Player_1=@{Player_1|acrobatics_bonus}}} {{Player_2=@{Player_2|acrobatics_bonus}} }} .... and so on for whatever abilities you're after. HTML replacement info here .
Faboulous, great, thanks, it works perfectly ! Question 2.0 : Would there be any way I can change the name  {{name=Player Ability}} for a dynamic name that would re-use the selected ability, for example:   {{name=Passive Arcana ... Passive Nature ...}} ?
1594873818
GiGs
Pro
Sheet Author
API Scripter
You can do that, you just have to start the query earlier, and use more html entities. /w gm &{template:default} {{name=?{Ability| Arcana,Arcana Abilities}} {{Player_1=@{Player_1|arcana_bonus}}} {{Player_2=@{Player_2|arcana_bonus}| Acrobatics,Acrobatics Abilities}} {{Player_1=@{Player_1|acrobatics_bonus}}} {{Player_2=@{Player_2|acrobatics_bonus}} }}
1594874686

Edited 1594874838
Oosh
Sheet Author
API Scripter
Ninja'd! That'll teach me to not refresh the page (no it won't). Also GiGs' is better anyway, one less word in the Query. Although he could have gone one better, with {{name=Passive ?{Ability|...... Just saying.... Obsolete post below... There is indeed. Just remove it from the top of the template, and place it inside the Query It shouldn't really matter where you put it, in between players or at the end: /w gm &{template:default} {{?{Ability| Arcana,Player_1=@{Player_1|arcana_bonus}}} {{Player_2=@{Player_2|arcana_bonus}}} {{name=Passive Arcana| Acrobatics,Player_1=@{Player_1|acrobatics_bonus}}} {{Player_2=@{Player_2|acrobatics_bonus}}} {{name=Passive Acrobatics} }} The {{name}} field can go anywhere, even right at the end of the macro, and it will still output to the top of the template.
Thanks guys. Both options works well !