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 .
×

Help with reusing dropdown query selection

Hello! I'm looking for help with reusing a dropdown query in a macro. To give a specific example(Pardon if there are some typos, I quickly translated this from Polish since I write all my macros for games with friends): &amp;{template:DnD35StdRoll} {{spellflag=true}} {{name=@{character_name} }} {{subtags=manifests [energy ray!](<a href="https://www.dandwiki.com/wiki/SRD:Energy_Ray" rel="nofollow">https://www.dandwiki.com/wiki/SRD:Energy_Ray</a> ).}} {{Lvl:= Psion/Wilder 1}} {{Display:=Aud}} {{Time:=1 action}} {{Range:= Close ( [[ 7.5+1.5*floor((@{casterlevel2}+?{Overchannel levels?|0|1|2|3})/2)]] m)}} {{Target:= Ray }} {{Duration:= Instant}} {{Saving throw:= None}} {{PP:=1}} {{Augment:=+1d6 per PP}} {{Resistance:= Yes, pierces [[ 1d20+@{casterlevel2}[mlvl]+@{spellpen}[pierce] ]] }} {{notes=%NEWLINE%%NEWLINE% Energy ray deals?{Type? |Fire, [[?{PP?&amp;#125;d6+?{PP?&amp;#125;]] fire damage! |Sonic, [[?{PP?&amp;#125;d6-?{PP?&amp;#125;]] sonic damage ignoring hardness! |Ice, [[?{PP?&amp;#125;d6+?{PP?&amp;#125;]] ice damage! |Electricity, [[?{PP?&amp;#125;d6]] electricity damage with +3 to hit for metal and +2 to resistance pierce! } hitting AC[[d20+@{bab}[BaB]+@{dex-mod}[Dex]]]with ranged touch. ?{Overchannel levels? |0, |1,%NEWLINE%%NEWLINE%Overchannel causes [[d8]] damage! |2,%NEWLINE%%NEWLINE%Overchannel causes [[3d8]] damage! |3,%NEWLINE%%NEWLINE%Overchannel causes [[5d8]] damage! } }} Normally if I use the same query key it's enough to input the value once - e.g. I only have to fill the PP? query once for the entire calculation. Is it also possible for the dropdown query for overchannel selection to remember the first time it was selected and then apply the same selection? Even if the first query inputs a direct number and the second an entire string associated with the number?
1629835981
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Unfortunately, roll queries do not allow for multiple results to be returned from them. So, if you wanted the first ?{overchannel} to output #'s 0-3, and the second to output "Overchannel causes [[xd8]] damage, that's not possible. Also, as a note, because you are working inside roll template fields, you don't need to use %NEWLINE%, you can just use a regular press of your return key. As an example, the start of your notes section could simply be this: {{notes= Energy ray deals?{Type?
Well, that is too bad. With neither this nor storing variables for if/then statements an option I guess I'll deal with "Overchannel causes 0 damage" in relevant macros. Thank you for clarification.