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

Dropdown queries with always=1

1642526601

Edited 1642526617
Hopefully a simple question.  I have a macro that prompts the player enter some roll choices and then rolls. I'd like it to always roll twice so that I can adjudicate advantage/disadvantage on the fly, so I figure I can use {{always=1}}. But I'm not sure how to do that without r2 prompting the player for their choices all over again. &{template:simple} {{rname=?{Roll Label}}}{{r1=[[1d20+[[?{Attribute |None,0|Strength,@{selected|strength_mod}|Dexterity,@{selected|dexterity_mod}|Constitution,@{selected|constitution_mod}|Intelligence,@{selected|intelligence_mod}|Wisdom,@{selected|wisdom_mod}|Charisma,@{selected|charisma_mod}|}}]] + [[?{Skill|None,0|Acrobatics,@{selected|acrobatics_prof}|Animal Handling,@{selected|animal_handling_prof}|Arcana,@{selected|arcana_prof}|Athletics,@{selected|athletics_prof}|Deception,@{selected|deception_prof}|History,@{selected|history_prof}|Insight,@{selected|insight_prof}|Intimidation,@{selected|intimidation_prof}|Investigation,@{selected|investigation_prof}|Medicine,@{selected|medicine_prof}|Nature,@{selected|nature_prof}|Perception,@{selected|perception_prof}|Performance,@{selected|performance_prof}|Persuasion,@{selected|persuasion_prof}|Religion,@{selected|religion_prof}|Sleight of Hand,@{selected|sleight_of_hand_prof}|Stealth,@{selected|stealth_prof}|Survival,@{selected|survival_prof}|}]] ]]}} {{always=1}} {{r2= ????????}} {{charname=@{selected|character_name}}} Thanks!
1642530090
timmaugh
Forum Champion
API Scripter
You can re-use roll queries (without needing to supply the options for every usage after the first), and as long as  you use the same name, it will use the same response. In that case, and assuming you delete the extra space following the "Attribute" query prompt, your r2 should be: {{r2= [[1d20+[[?{Attribute}]] + [[?{Skill}]] ]]}} I think this would be your full macro text... I found an extra brace in there (I think it was &{template:simple} {{rname=?{Roll Label}}} {{r1=[[1d20+[[?{Attribute|None,0|Strength,@{selected|strength_mod}|Dexterity,@{selected|dexterity_mod}|Constitution,@{selected|constitution_mod}|Intelligence,@{selected|intelligence_mod}|Wisdom,@{selected|wisdom_mod}|Charisma,@{selected|charisma_mod}}]] + [[?{Skill|None,0|Acrobatics,@{selected|acrobatics_prof}|Animal Handling,@{selected|animal_handling_prof}|Arcana,@{selected|arcana_prof}|Athletics,@{selected|athletics_prof}|Deception,@{selected|deception_prof}|History,@{selected|history_prof}|Insight,@{selected|insight_prof}|Intimidation,@{selected|intimidation_prof}|Investigation,@{selected|investigation_prof}|Medicine,@{selected|medicine_prof}|Nature,@{selected|nature_prof}|Perception,@{selected|perception_prof}|Performance,@{selected|performance_prof}|Persuasion,@{selected|persuasion_prof}|Religion,@{selected|religion_prof}|Sleight of Hand,@{selected|sleight_of_hand_prof}|Stealth,@{selected|stealth_prof}|Survival,@{selected|survival_prof}}]] ]]}} {{always=1}} {{r2= [[1d20+[[?{Attribute}]] + [[?{Skill}]] ]]}} {{charname=@{selected|character_name}}} Is that what you were looking for?
Why not just use Groupcheck API?  Here is mine using the 5e OGL sheet that I gave to the players, its a drop down query cause I run large tables and chat nesting that groupcheck uses by default is spammy.... !group-check --public --hidename --showaverage --ro roll2 --?{Which roll?|Strength Save|Dexterity Save|Constitution Save|Intelligence Save|Wisdom Save|Charisma Save|Death Save|Strength Check|Dexterity Check|Constitution Check|Intelligence Check|Wisdom Check|Charisma Check|Acrobatics|Animal Handling|Arcana|Athletics|Deception|History|Insight|Intimidation|Investigation|Medicine|Nature|Perception|Performance|Persuasion|Religion|Sleight of Hand|Stealth|Survival|Strength Attack|Dexterity Attack}
Ahhhh thank you!  I somehow missed that you could reference names like that. Perfect!