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

2 layers of ability drop-down menu.

1588012619

Edited 1588013260
What I want: My character sheet has an ability called "2.Skills" that calls up a menu of abilities. ?{Skill |Gravistream, %{selected|Gravistream} |Martial Arts, %{selected|MartialArts} |Acrobatics, %{selected|Acrobatics} |Pilot, %{selected|Pilot} } Each option refers to another sheet ability, uses a template, and contains html replacements, except "Martial Arts", which leads to a second menu: ?{Stat|Strength @{Strength},%{selected|MA_Str}#124;Agility @{Agility},%{selected|MA_Ag}} "Strength" MA_Str & "Agility" MA_Ag are sheet abilities. Choosing "Strength" produces: &{template:default}{{name=@{selected|token_name} • Martial Arts}}{{Agility @{Agility} + Bonus [[round(@{Level}/2)]]+1d6}}{{Martial Arts=[[1d6+?{Which Stat?|Strength @{Strength},@{Strength}|Agility @{Agility},@{Agility}}+[[round(@{Level}/2)]] ]]}}{{[Critical](!
#Critical)[Fumble](!
#Fumble)}} Inception. What Works:   Ability "2.Skills" menu works when all options refer directly to other abilities. Ability "MartialArts" menu works when it is used directly & without html replacements, and refers directly to "MA_Str" & "MA_Ag". "MA_Str" & "MA_Ag" work with and without html replacements. In short, everything works with one menu. Problem: Once I stack 2 menus and use html replacements for the second menu "MartialArts" then the whole thing breaks. Do I need to use  % for % in the "Martial Arts" menu? I tried that. It didn't work. Maybe something similar?
1588013382
Ziechael
Forum Champion
Sheet Author
API Scripter
You need to double-nest your query in a query: {{Martial Arts=[[1d6+?{Which Stat?& amp; #124;Strength @{Strength}& amp; #44;@{Strength}& amp; #124;Agility @{Agility}& amp; #44;@{Agility}& amp; #125;+[[round(@{Level}/2)]] ]]}}
I tried that. It works perfectly and the template says    {{Strength or Agility + Bonus=  above the line  {{Martial Arts= One problem: if the player picks Agility, I want it to read  {{Agility + Bonus=.  If they choose strength then  {{Strength + Bonus=   That way they can look back and see which stat they used with their Martial Arts ability.
1588014707
Ziechael
Forum Champion
Sheet Author
API Scripter
You could do it with a whole load of faffing around... or you can use Roll Tagging to at least see what it was when hovering over the result? {{Martial Arts=[[1d6+?{Which Stat?& amp; #124;Strength @{Strength}& amp; #44;@{Strength} [Strength] & amp; #124;Agility @{Agility}& amp; #44;@{Agility} [Agility] & amp; #125;+[[round(@{Level}/2)]] ]]}}
I like that. I fixed some typos and unnecessary & {{Martial Arts=[[1d6+?{Which Stat?&|Strength @{Strength},@{Strength}[Strength]|Agility @{Agility},@{Agility}[Agility]}+[[round(@{Level}/2)]] ]]*}}