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

The One Ring Macro condensing (Using dropdown menu)

So, here's what I'm trying to do:&nbsp; Using&nbsp; <a href="https://wiki.roll20.net/The_One_Ring" rel="nofollow">https://wiki.roll20.net/The_One_Ring</a> we were able to setup pictures for dice, a bunch of macros, and the char sheet functions as we want it to, but the issue is this macro: @{selected|token_name} rolls for Travel/r 1t[feat] + @{selected|travel|0}t[@{selected|weary}] It works great, but it means that the player has to create 18 macros, one for each of the TOR skills. I was considering using the dropdown list, but I am unsure how to make your choice from the dropdown list modify&nbsp;@{selected|travel|0} into say,&nbsp;@{selected|awe|0} after you picked 'Awe' in the dropdown box. Is this possible or does it have to be done via API?
I find it easier to think of these as a template (not a roll template, just a logical setup) that you can fill in the blanks. (broken into separate lines for readability; this would all be one long line of text) CommonTextThatAllChecksShare&nbsp; ?{QueryPrompt| Label1, Check1 | Label2, Check2 | Label3, Check3 &nbsp; } @{selected|token_name} rolls for&nbsp; ?{Skill Check? | &nbsp; Label1, Check1 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}]&nbsp; | Label2, Check2 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}]&nbsp; | Label3, Check3 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}]&nbsp; | Label4, Check4 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}]&nbsp; | Label5, Check5 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}]&nbsp; | } Then go back and remove the extra carriage returns from each line to put it all in one long line of text: @{selected|token_name} rolls for ?{Skill Check? | Label1, Check1 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}] |Label2, Check2 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}] |Label3, Check3 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}] |Label4, Check4 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}] |Label5, Check5 /r 1t[feat] + @{selected|travel|0}t[@{selected|weary}] |}
Huh, so thats how it works. Thank you!&nbsp; I wonder if I could put in a SECOND checkbox that allows you to pick if you want to Roll 1 Feat Die, Roll 2 Feat(Keep best), Roll 2 Feat(Keep worst) The basic macro for 'Keep 2 keep best' is&nbsp;/r {2t[feat]}k1 + ?{Number of D6 to roll|0}t[@{selected|weary}] which uses the roll table we have.&nbsp; 'Roll 2 keep worst' is&nbsp;/r {2t[feat]}kl1 + ?{Number of D6 to roll|0}t[@{selected|weary}] And generic roll feat die is of course just&nbsp;/r [1t[feat] +&nbsp;?{Number of D6 to roll|0}t[@{selected|weary}] If i was writing solely a 'Pick one of these three and roll it' macro, I am guessing I could just do the same structure as above -&nbsp; @{selected|token_name} rolls for ?{Pick One? | Roll 1 Feat Die, Roll 1 Feat Die /r [1t[feat] ?{Number of D6 to roll|0}t[@{selected|weary}]| Roll 2 Feat Dice keep best, Roll 2 Feat Dice keep best /r {2t[feat]}k1 + ?{Number of D6 to roll|0}t[@{selected|weary}] | Roll 2 Feat Dice keep worst, Roll 2 Feat Dice keep worst /r {2t[feat]}kl1 + ?{Number of D6 to roll|0}t[@{selected|weary}] | } Assuming thats correct... Do I have to slot this entire statement into every one of the code lines above that you wrote, to replace the '1t[feat]' thing, or... Add it at the start only once?&nbsp;
1442873308

Edited 1442873538
Once you start nesting queries, things start to get messy as you have to use HTML Entities to replace the {&nbsp; }&nbsp; . ( comma )&nbsp; and | ( pipe ) characters that appear within the nested query. There's a bunch of examples of this ins the "Show your macros" thread under General Use. If you have common text on both sides of the drop-down selection, it's much easier.&nbsp; Just build your drop-down query around it. @{selected|token_name} rolls for ?{Pick One? | Roll 1 Feat Die, Roll 1 Feat Die /r [1t[feat]&nbsp; | Roll 2 Feat Dice keep best, Roll 2 Feat Dice keep best /r {2t[feat]}k1&nbsp; | Roll 2 Feat Dice keep worst, Roll 2 Feat Dice keep worst /r {2t[feat]}kl1 | } + ?{Number of D6 to roll|0}t[@{selected|weary}]
Hm, so I dont actually need to insert the entire request for picking one of three Feat combos into EACH one... Interesting. The macro you posted presented with a dropdown box with 2 selections, I'm not sure how it's excluding the third. Result, no matter what, is a 'Problem with formula' error though... I tried altering the [ which encases the 1t[feat] into {} which resulted in 'Roll 1 Feat Die, Roll 1 Feat Die /r {1t[feat]} |', which i figured would fix it, but it somehow morphed into a messagebox which says 'Roll 1 Feat Die, Roll 1 Feat Die /r {1t[feat]'.&nbsp; I'll do some more research though!
Kullervo said: The macro you posted presented with a dropdown box with 2 selections, I'm not sure how it's excluding the third. Currently, that Roll Query is ending at the closing brace in "}k1". To prevent this behaviour, you would need to use HTML entities, as stated earlier. See: the Advanced Usage section of Using a variable with a Macro .
Gotcha, will investigate. Thank you for pointing that out.