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

Trying to get a Querry Drop Down to autofill

So this is probably a stupid question, but is there a way to get a Query Drop Down to auto fill a result from two previous queries? I.E. Query 1 is a drop down where you select one trait, Query 2 is a drop down where you select an ability. I want the Query 3 to be able to add the previous two queries together to run a specific output. Query 1- ?{Which attribute do you want to use?| Intellect @{Intellect}, @{Intellect}| Might @{Might}, @{Might}| Presence @{Presence}, @{Presence}| Cunning @{Cunning}, @{Cunning}| Dexterity @{Dexterity}, @{Dexterity}| Manipulation @{Manipulation}, @{Manipulation}| Resolve @{Resolve}, @{Resolve}| Stamina @{Stamina}, @{Stamina}| Composure @{Composure}, @{Composure}| } Query 2- ?{Which Skill?| Academics @{Academics}, @{Academics}| Athletics @{Athletics}, @{Athletics}| Close Combat @{CloseCombat}, @{CloseCombat}| Culture @{Culture}, @{Culture}| Empathy @{Empathy}, @{Empathy}| Firearms @{Firearms}, @{Firearms}| Integrity @{Integrity}, @{Integrity}| Leadership @{Leadership}, @{Leadership}| Medicine @{Medicine}, @{Medicine}| Occult @{Occult}, @{Occult}| Persuasion @{Persuasion}, @{Persuasion}| Pilot @{Pilot}, @{Pilot}| Science @{Science}, @{Science}| Subterfuge @{Subterfuge}, @{Subterfuge}| Survival @{Survival}, @{Survival}| Technology @{Technology}, @{Technology}| } Query 3- /r ?{Number of dice| 1, [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] [1d10>8] | 2, [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] + [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] [2d10>8] | 3, [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] + [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] + [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] [3d10>8] | 4, [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] + [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] + [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] + [[ {ceil((d10-(8-1))/(10.1-8)), 0d0}k1 ]] [4d10>8] | } So the idea would be for the 1 to correlate with the result from (Query 1 + Query 2). Any help on this would be great! And if I need to provide more detail let me know.
1607932486
Oosh
Sheet Author
API Scripter
If you use exactly the same Query label in the same macro, you'll get the input from the first instance of it. So, assuming your @{attribute} and @{skill} Attributes are all integers, you can do something like this: &{template:default} {{name=Skill Check}} ?{Which attribute do you want to use?| Intellect @{Intellect}, @{Intellect}| Might @{Might}, @{Might}| Presence @{Presence}, @{Presence}| Cunning @{Cunning}, @{Cunning}| Dexterity @{Dexterity}, @{Dexterity}| Manipulation @{Manipulation}, @{Manipulation}| Resolve @{Resolve}, @{Resolve}| Stamina @{Stamina}, @{Stamina}| Composure @{Composure}, @{Composure}} ?{Which Skill?| Academics @{Academics}, @{Academics}| Athletics @{Athletics}, @{Athletics}| Close Combat @{CloseCombat}, @{CloseCombat}| Culture @{Culture}, @{Culture}| Empathy @{Empathy}, @{Empathy}| Firearms @{Firearms}, @{Firearms}| Integrity @{Integrity}, @{Integrity}| Leadership @{Leadership}, @{Leadership}| Medicine @{Medicine}, @{Medicine}| Occult @{Occult}, @{Occult}| Persuasion @{Persuasion}, @{Persuasion}| Pilot @{Pilot}, @{Pilot}| Science @{Science}, @{Science}| Subterfuge @{Subterfuge}, @{Subterfuge}| Survival @{Survival}, @{Survival}| Technology @{Technology}, @{Technology}} {{Result=[[?{Which attribute do you want to use?} + ?{Which Skill?}]]}} With all the extra math thrown in to the Result section. Keeping the main Queries outside the template fields just helps make it a bit more readable - you can put them right in the middle of the equation instead, it just gets messy if you need the change anything. I might be misunderstanding the rules you're using, but if you're doing a 1d10>8 comparison, with a bonus from the Attribute and Skill, this might be a bit easier for the roll itself on the last line: {{Result=[[?{How many dice?|1}d10>[[8 - ?{Which Attribute?} - ?{Which Skill?}]]]]}}
Hey Oosh, Thanks for the input and I guess I didn't give enough information. So Query 3 has a number in front of it that goes with the line of roll code to report back if there was a success (1), a failure (0), or a critical success (2) when the target number is 8. So 1 would be the equivalent of 1 dice being rolled, 2 would be 2, so on and so forth. What I am trying to work out is how to get the ?{Attribute} + ?{Skills} to equal the first number in Query 3. I have actually found out that the 1d10>8 at the end in the brackets is actually not necessary for the completion of the formula correctly. Oosh said: If you use exactly the same Query label in the same macro, you'll get the input from the first instance of it. So, assuming your @{attribute} and @{skill} Attributes are all integers, you can do something like this: &{template:default} {{name=Skill Check}} ?{Which attribute do you want to use?| Intellect @{Intellect}, @{Intellect}| Might @{Might}, @{Might}| Presence @{Presence}, @{Presence}| Cunning @{Cunning}, @{Cunning}| Dexterity @{Dexterity}, @{Dexterity}| Manipulation @{Manipulation}, @{Manipulation}| Resolve @{Resolve}, @{Resolve}| Stamina @{Stamina}, @{Stamina}| Composure @{Composure}, @{Composure}} ?{Which Skill?| Academics @{Academics}, @{Academics}| Athletics @{Athletics}, @{Athletics}| Close Combat @{CloseCombat}, @{CloseCombat}| Culture @{Culture}, @{Culture}| Empathy @{Empathy}, @{Empathy}| Firearms @{Firearms}, @{Firearms}| Integrity @{Integrity}, @{Integrity}| Leadership @{Leadership}, @{Leadership}| Medicine @{Medicine}, @{Medicine}| Occult @{Occult}, @{Occult}| Persuasion @{Persuasion}, @{Persuasion}| Pilot @{Pilot}, @{Pilot}| Science @{Science}, @{Science}| Subterfuge @{Subterfuge}, @{Subterfuge}| Survival @{Survival}, @{Survival}| Technology @{Technology}, @{Technology}} {{Result=[[?{Which attribute do you want to use?} + ?{Which Skill?}]]}} With all the extra math thrown in to the Result section. Keeping the main Queries outside the template fields just helps make it a bit more readable - you can put them right in the middle of the equation instead, it just gets messy if you need the change anything. I might be misunderstanding the rules you're using, but if you're doing a 1d10>8 comparison, with a bonus from the Attribute and Skill, this might be a bit easier for the roll itself on the last line: {{Result=[[?{How many dice?|1}d10>[[8 - ?{Which Attribute?} - ?{Which Skill?}]]]]}}