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

Help with a Nested Pulldown Menu in a Macro with a Roll

In Pathfinder 2e, you could roll several different skills for initiative - for simplicity, i just made separate token initiative macros for Perception and Stealth, but a third possible roll type would be "Recall Knowledge" - which keys off of the relevant knowledge skill for the encounter.  My thinking was that it should look like this: &{template:rolls} {{limit_height=@{Selected|roll_limit_height}}} {{charactername=@{Selected|character_name}}} {{header=^{initiative}}} {{subheader=Investigate ?{Recall Knowledge:|Arcana|Crafting|Nature|Occultism|Religion|Society}}}  {{roll01=[[1d20cs20cf1 + (@{Selected| ?{Recall Knowledge:|Arcana|Crafting|Nature|Occultism|Religion|Society}})[Recall Knowledge ?{Recall Knowledge:|Arcana|Crafting|Nature|Occultism|Religion|Society}] &{tracker}]]}} The Recall Knowledge Pulldown prompt should allow the player to select the appropriate skill, and then the roll take place (with the skill name also showing up in the template sub-header and as a description of the modifier if you hover over the roll in chat.. As is - it gives an error message, but calls for the skill selection. and upon selecting a skill - it does actually roll the dice, but it seems like it is rolling without the benefit of the selected skill's modifier I had tried using that google sheet that substitutes out problematic characters with the html replacement codes (e.g., & = &amp, }} =  &#125, etc) The result of using that process is: &{template:rolls} {{limit_height=@{Selected|roll_limit_height}}} {{charactername=@{Selected|character_name}}} {{header=^{initiative}}} {{subheader=Investigate ?{Recall Knowledge:|Arcana|Crafting|Nature|Occultism|Religion|Society}}} {{roll01=[[1d20cs20cf1 + (@{Selected| ?{Recall Knowledge:|Arcana|Crafting|Nature|Occultism|Religion|Society}})[Recall Knowledge ?{Recall Knowledge:|Arcana|Crafting|Nature|Occultism|Religion|Society}] &{tracker}]]}} But this looks all kinds of messed up when i run the macro Can anyone give mew some advice or help fixing this?
1583782951
Kraynic
Pro
Sheet Author
This seems like a pretty good time to use chat menus.&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/5927072/" rel="nofollow">https://app.roll20.net/forum/permalink/5927072/</a> If you put all the possible initiative rolls on a macro mule character sheet (another idea from that Stupid Tricks thread linked above), you can build a chat menu macro on each individual character sheet that shows only the options relevant to their character, or you can make a global macro chat menu with all options shown to everyone.
I had never used those chat buttons before - but while waiting for a response here, i tried to give it a shot. I tried each of the varieties Keith had listed, unsure which was appropriate - it turned out it was the last one: command name](!&amp;#13;#macro to call) I'm super excited.&nbsp; This should work, regardless of whether the player rolls it or the gm, right?
1583785613
Kraynic
Pro
Sheet Author
Yes, as long as the macros they link to are written correctly, and in a place accessible to all players.
1583794283
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you want to test out how anything will look to or act for a player, I suggest using a&nbsp; Dummy Account .
1583834907
Ziechael
Forum Champion
Sheet Author
API Scripter
If your heart is absolutely set on having a drop down query for this, the following should do it: &amp;{template:rolls} {{limit_height=@{Selected|roll_limit_height}}} {{charactername=@{Selected|character_name}}} {{header=^{initiative}}} {{subheader=Investigate ?{Recall Knowledge:|Arcana,Arcana&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Arcana}[Recall Knowledge Arcana]|Crafting,Crafting&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Crafting}[Recall Knowledge Crafting]|Nature,Nature&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Nature}[Recall Knowledge Nature]|Occultism,Occultism&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Occultism}[Recall Knowledge Occultism]|Religion,Religion&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Religion}[Recall Knowledge Religion]|Society,Society&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Society}[Recall Knowledge Society]} &amp;{tracker}]]}} And for visibility due to no wrapping in code: &amp;{template:rolls} {{limit_height=@{Selected|roll_limit_height}}} {{charactername=@{Selected|character_name}}} {{header=^{initiative}}} {{subheader=Investigate ?{Recall Knowledge:|Arcana,Arcana&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Arcana}[Recall Knowledge Arcana]|Crafting,Crafting&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Crafting}[Recall Knowledge Crafting]|Nature,Nature&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Nature}[Recall Knowledge Nature]|Occultism,Occultism&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Occultism}[Recall Knowledge Occultism]|Religion,Religion&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Religion}[Recall Knowledge Religion]|Society,Society&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Society}[Recall Knowledge Society]} &amp;{tracker}]]}}
Ziechael said: If your heart is absolutely set on having a drop down query for this, the following should do it: &amp;{template:rolls} {{limit_height=@{Selected|roll_limit_height}}} {{charactername=@{Selected|character_name}}} {{header=^{initiative}}} {{subheader=Investigate ?{Recall Knowledge:|Arcana,Arcana&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Arcana}[Recall Knowledge Arcana]|Crafting,Crafting&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Crafting}[Recall Knowledge Crafting]|Nature,Nature&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Nature}[Recall Knowledge Nature]|Occultism,Occultism&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Occultism}[Recall Knowledge Occultism]|Religion,Religion&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Religion}[Recall Knowledge Religion]|Society,Society&amp;#125;&amp;#125; {{roll01=[[1d20cs20cf1 + @{selected|Society}[Recall Knowledge Society]} &amp;{tracker}]]}} Ohhhhhhhhh.... wow... ok. I see. I don't quite understand... but I do see.&nbsp; Thank you Ziechael.
1583914860
Ziechael
Forum Champion
Sheet Author
API Scripter
It's a way to bypass the 'can't have two different results from the same query result' thing... so instead we simply create the query at the first point of divergence and run it through to the last point (in this case, from the subheader description through to the end of the roll for that selection). The html gubbins in there is because queries will break with end curly braces, pipes and commas that aren't part of an attribute call. Check out the wiki for full details. Chat menus are generally easier for everyone involved but if you need any more info on the arcane majesty of a truly nested query tree just holler :)
I just tried the dummy account thing - and aparrently, the macros i made are not visible/accessible to other players... how do i make them accessible?
1583950298
Kraynic
Pro
Sheet Author
If you made these in the collections tab, you need to have the macro open for editing and scroll down.&nbsp; The permissions are at the bottom.&nbsp;&nbsp;
Thank you, @Kraynic - they work perfectly now.&nbsp; Thanks everyone.