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

[5e OGL] Roll Queries

i have a feeling in order to do this im going to need to do it in Api but i figure i would ask here 1st  i have a template that does{{always=1}} {{r2=[[1d20+ ?{Choose same stat?|......   but i have the Roll Queries on my Npc sheet sent to toggle   and so for advage it would output @{rtype} = {{query=1}} {{advantage=1}} {{r2=[[@{d20}   so my question is  is there  a way in the marco that if i did {{r1= 1d20+ ?{Choose same stat?|........}} @{rtype} + ?{Choose same stat?|.........}}  Thanks Pred Alien
Could you post the full macro that is not working the way you want?
well i guess 1st i should say that im using the 5th ed npc template "&{template:simple}" {{r1=[[1d20+ ?{Choose same stat?| strength, @{selected|strength_mod} | dexterity, @{selected|dexterity_mod} | constitution, @{selected|constitution_mod} | intelligence, @{selected|intelligence_mod} | wisdom, @{selected|wisdom_mod} | charisma, @{selected|charisma_mod} } ]] }} {{always=1}} {{r2=[[1d20+ ?{Choose same stat?|strength, @{selected|strength_mod} | dexterity, @{selected|dexterity_mod} | constitution, @{selected|constitution_mod} | intelligence, @{selected|intelligence_mod} | wisdom, @{selected|wisdom_mod} | charisma, @{selected|charisma_mod} } ]] }}  that how i have it setup atm  but what i wanna do is have it call advantage, disadvantage, or normal and to do that i changed  "roll queries" to toggle and that give me 2 attributes of  @{rtype} and @{advantagetoggle}   and @{rtype} = the text of {{query=1}} {{advantage=1}} {{r2=[[@{d20}       so after seeing that i tryed to do  {{r1= blah blah blah then }} @{rtype}   + ?{Choose same stat?| ......}}
Here's a macro that queries for advantage regardless of sheet settings: @{selected|wtype}&{template:simple} {{rname=Ability Check}} {{mod=[[ ?{Choose same stat?|strength, @{selected|strength_mod} | dexterity, @{selected|dexterity_mod} | constitution, @{selected|constitution_mod} | intelligence, @{selected|intelligence_mod} | wisdom, @{selected|wisdom_mod} | charisma, @{selected|charisma_mod} } ]]}} {{?{Roll|normal|advantage|disadvantage}=1}} {{r1=[[ @{selected|d20} + ?{Choose same stat?} ]]}} {{r2=[[ @{selected|d20} + ?{Choose same stat?} ]]}} @{selected|charname_output} I hope this helps!
What I do in this case is move @{rtype} before the query since the order in the roll template does not matter. My macro also will take into account a Bard's Jack of All Trades feature in addition to using the d20 attribute of the character sheet if you ever decide to change it from 1d20. @{selected|wtype}&{template:simple} @{selected|rtype}?{Stat |Strength,+@{selected|strength_mod}@{selected|jack_attr}[STR] ]]}} {{rname=Strength}} {{mod=@{selected|strength_mod}@{selected|jack_bonus}}} {{r1=[[@{selected|d20}+@{selected|strength_mod}@{selected|jack_attr}[STR] ]] |Dexterity,+@{selected|dexterity_mod}@{selected|jack_attr}[DEX] ]]}} {{rname=Dexterity}} {{mod=@{selected|dexterity_mod}@{selected|jack_bonus}}} {{r1=[[@{selected|d20}+@{selected|dexterity_mod}@{selected|jack_attr}[DEX] ]] |Constitution,+@{selected|constitution_mod}@{selected|jack_attr}[CON] ]]}} {{rname=Constitution}} {{mod=@{selected|constitution_mod}@{selected|jack_bonus}}} {{r1=[[@{selected|d20}+@{selected|constitution_mod}@{selected|jack_attr}[CON] ]] |Intelligence,+@{selected|intelligence_mod}@{selected|jack_attr}[INT] ]]}} {{rname=Intelligence}} {{mod=@{selected|intelligence_mod}@{selected|jack_bonus}}} {{r1=[[@{selected|d20}+@{selected|intelligence_mod}@{selected|jack_attr}[INT] ]] |Wisdom,+@{selected|wisdom_mod}@{selected|jack_attr}[WIS] ]]}} {{rname=Wisdom}} {{mod=@{selected|wisdom_mod}@{selected|jack_bonus}}} {{r1=[[@{selected|d20}+@{selected|dexterity_mod}@{selected|jack_attr}[WIS] ]] |Charisma,+@{selected|charisma_mod}@{selected|jack_attr}[CHA] ]]}} {{rname=Charisma}} {{mod=@{selected|charisma_mod}@{selected|jack_bonus}}} {{r1=[[@{selected|d20}+@{selected|dexterity_mod}@{selected|jack_attr}[CHA] ]] }}} @{selected|charname_output}
Thank you both for ur help u didnt need to do all that work  just for me