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

Roll Query Documentation?

1440969389

Edited 1440970203
The specific question: Where or is there full documentation for the roll query ( ?{foo|bar} ) roll dice command? ------- So, I have a macro. I don't have a problem with the macro, it works. I'll post it the beast at the end. I just have some question the wiki does not fully answer. I know I can provide the roll query a list of possible answer: ?{What's your favorite program language?|Machine Code, I'm jealous.|Assembly, You have too much time!|Pure C, Your old.|C++, All hail the true language!|C#, I have nothing nice to say to you!|Java,You can be forgiven.} I also know that you can use a tiny bit of HTML to include comas in the roll that would normally cause the command to glitch: ?{To ASCII Code or not to ASCII Code?|No,This will stop after the comma, and not show the rest of this sentence.|Yes, This sentence will complete&#44Showing it's entirety.} My first question: Is everything after the second comma ignored, or just stored somewhere else that '?{What's your favorite program language? }' or ' ?{To ASCII Code or not to ASCII Code? }' can't access? In theory I have a lot of code that repeats. With only one or two words changing in a macro that's 75+characters long. For example let's say I have two macros: @{StatThatHasAReallyLongAndNotAtAllShortNameButHasARepeatingPrefixToSeprateItFromTheOtherTooLongNamedStats_one} -AND- @{StatThatHasAReallyLongAndNotAtAllShortNameButHasARepeatingPrefixToSeprateItFromTheOtherTooLongNamedStats_two} The only difference between one of them ends with "one" the other ends with "two". My second question: Is there some way to use the roll query command to make a template? For example: ?{Stat one or two|One,one|Two,two} @{StatThatHasAReallyLongAndNotAtAllShortNameButHasARepeatingPrefixToSeprateItFromTheOtherTooLongNamedStats_?{Stat one or two}} As it stands, that wouldn't find the really long named stat with the text "one" or "two" at the end of it. It would report the error: The attribute "@{StatThatHasAReallyLongAndNotAtAllShortNameButHasARepeatingPrefixToSeprateItFromTheOtherTooLongNamedStats_?{Stat one or two}}" can not be found. ------- As promised, the super long beast of a macro for Ironclaw that I want to clean up that is needlessly tedious: &{template:default} {{name=Basic Skill Check}} {{Stat Dice=?{Stat|Species,@{species-select}|Career,@{career-select}|Body,@{body-select}|Speed,@{speed-select}|Mind,@{mind-select}|Will,@{will-select}}}} {{Skill Dice=?{Skill|Academics,@{select_mark-Academics}&#44@{select_species-academics}&#44@{select_career-Academics}|Brawling,@{select_mark-brawling}&#44@{select_species-brawling}&#44@{select_career-brawling}|Climbing,@{select_mark-climbing}&#44@{select_species-climbing}&#44@{select_career-climbing}|Craft,@{select_mark-craft}&#44@{select_species-craft}&#44@{select_career-craft}|Deceit,@{select_mark-deceit}&#44@{select_species-deceit}&#44@{select_career-deceit}|Digging,@{select_mark-digging}&#44@{select_species-digging}&#44@{select_career-digging}|Dodge,@{select_mark-dodge}&#44@{select_species-dodge}&#44@{select_career-dodge}|Endurance,@{select_mark-endurance}&#44@{select_species-endurance}&#44@{select_career-endurance}|Gossip,@{select_mark-gossip}&#44@{select_species-gossip}&#44@{select_career-gossip}|Inquiry,@{select_mark-inquiry}&#44@{select_species-inquiry}&#44@{select_career-inquiry}|Jumping,@{select_mark-jumping}&#44@{select_species-jumping}&#44@{select_career-jumping}|Leadership,@{select_mark-leadership}&#44@{select_species-leadership}&#44@{select_career-leadership}|Melee Combat,@{select_mark-leadership}&#44@{select_species-leadership}&#44@{select_career-leadership}|Negotiation,@{select_mark-negotiation}&#44@{select_species-negotiation}&#44@{select_career-negotiation}|Observation,@{select_mark-observation}&#44@{select_species-observation}&#44@{select_career-observation}|Presence,@{select_mark-presence}&#44@{select_species-presence}&#44@{select_career-presence}|Ranged Combat,@{select_mark-rangedcombat}&#44@{select_species-rangedcombat}&#44@{select_career-rangedcombat}|Riding,@{select_mark-riding}&#44@{select_species-riding}&#44@{select_career-riding}|Searching,@{select_mark-searching}&#44@{select_species-searching}&#44@{select_career-searching}|Stealth,@{select_mark-stealth}&#44@{select_species-stealth}&#44@{select_career-stealth}|Supernatural,@{select_mark-supernatural}&#44@{select_species-supernatural}&#44@{select_career-supernatural}|Swimming,@{select_mark-swimming}&#44@{select_species-swimming}&#44@{select_career-swimming}|Tactics,@{select_mark-tactics}&#44@{select_species-tactics}&#44@{select_career-tactics}|Throwing,@{select_mark-tactics}&#44@{select_species-tactics}&#44@{select_career-tactics}|Vehicles, @{select_mark-vehicles}&#44@{select_species-vehicles}&#44@{select_career-vehicles}}}} {{Roll={{{?{Stat},?{Skill}}kh1}}
1440970342

Edited 1440970411
Silvyre
Forum Champion
HarbingerLeo said: The specific question: Where or is there full documentation for the roll query ( ?{foo|bar} ) roll dice command? <a href="https://app.roll20.net/forum/permalink/2217049/" rel="nofollow">https://app.roll20.net/forum/permalink/2217049/</a> HarbingerLeo said: My second question: Is there some way to use the roll query command to make a template? For example: ?{Stat one or two|One,one|Two,two} @{StatThatHasAReallyLongAndNotAtAllShortNameButHasARepeatingPrefixToSeprateItFromTheOtherTooLongNamedStats_?{Stat one or two}} Sort of (i.e. by using API Command Buttons as a means of bypassing the order of operations that prevent the aforementioned approach). [Generate](!&amp;#13;&amp;#64;{selected|StatThatHasAReallyLongAndNotAtAllShortNameButHasARepeatingPrefixToSeprateItFromTheOtherTooLongNamedStats_?{Stat one or two|One,one|Two,two}})
1440970793

Edited 1440972825
Thank you sir. ^.^ That is most helpful.
1441003183

Edited 1441004055
There is a issue. I created some cool stuff, at least I think so. I can enter it into macro window and test it. Soon as I click a button to save the macro the HTML little bits resolve to what they represent, and don't stay the plain test code number. Making the macro very cool, but practically useless. (Could have sworn it wasn't just doing that.) Anyway to fix that? Edit: Well ... I guess it works if you save it, and never ever look at it again. It's fickle....
1441033836
Silvyre
Forum Champion
Silvyre said: Yes, I forgot to mention... When a General Macro is saved, HTML entities are converted, breaking macros that use them. If you are in the process of editing your macro, I recommend saving it as an Ability Macro, so that the entities will be preserved. Alternatively, you could "nest" a second "layer" of HTML entities within the macro such that, when the macro is saved as a General Macro, the second layer is converted, revealing the first. For example, you could further substitute & for &amp; to accomplish this, like so: &{template:5eDefault} ?{Options|A, {{title=Title 1&amp;#125;&amp;#125; {{freetext=Title 1 description&amp;#125;&amp;#125; {{subheader=Title 1 Subheader&amp;#125;&amp;#125;|B, {{title=Title 2&amp;#125;&amp;#125; {{freetext=Title 2 description&amp;#125;&amp;#125; {{subheader=Title 2 Subheader&amp;#125;&amp;#125;} Furthermore, the Roll20 Wiki now contains improved documentation for Roll Queries .
Again, Thank you sir. ^.^