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

Dropdown for determining dice roll

Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Hello all, This is my first post asking for help on Roll20 so thank you in advance. I’m trying to make a Task roller for the Traveller RPG. Players roll 2d6, add/ subtract modifiers, then compare them to difficulty levels to determine success. I’m using a drop down to determine the task level and difficulty in the macro. Here’s what I have so far: /roll ?{Difficulty of task?|Simple, 2d6>3|Routine, 2d6>7| Difficult,   2d6>11|Formidable, 2d6>15} +?{Skill Level |0}+?{Attribute Bonus |0}-?{Wound mod? |0}   This doesn’t seem to work because I can roll against a target of 15 (with two +1 mods in this example) and I get this: rolling 2d6>15+1+1-0 (1+2)+1+1-0 = 2 Successes What am I doing wrong? I’d also simply like it to say success or failure and not add up the successes. Thank you for your time!
1544721906

Edited 1544723600
Ziechael
Forum Champion
Sheet Author
API Scripter
This should work: [[ {2d6 + ?{Skill level} + ?{Attribute bonus},1d0}>[[ ?{Difficulty of task?|Simple,3|Routine,7|Difficult,11|Formidable,15} ]] ]] The grouping of the roll at the beginning forces it to compare against the sum of the dice rather than the individual rolls. To provide a 'success' or 'failure' message you can add to this by creating some small rollable tables called 0 and 1. These would only have one entry in them each called 'Failure' and 'Success' respectively and you'd use the following to get the results (the issue with this approach is that you won't get to see the roll results themselves): [[ 1t[[[ {2d6 + ?{Skill level} + ?{Attribute bonus},1d0}>[[ ?{Difficulty of task?|Simple,3|Routine,7|Difficult,11|Formidable,15} ]] ]]] ]]
Yeah this code results in a 0 or 1 which I could turn into a rollable table to indicate success or failure. It's too bad you couldn't see the roll also though. Thanks Ziechael
So this allows me to see the dice roll and the target value but doesn't tell me if succeeded making the task level kinda useless. Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} /me Rolls a TASK… /r 2d6 +?{Skill level} +?{Attribute bonus} -?{Wound Mod} > [[?{Difficulty of task?|Simple,3|Routine,7|Difficult,11|Formidable,15}]]
1544751065
GiGs
Pro
Sheet Author
API Scripter
You need to get rid of the spaces, and might need to use an inline roll on the bit before > Try this: /r (2d6 +?{Skill level} +?{Attribute bonus} -?{Wound Mod})>?{Difficulty of task?|Simple,3|Routine,7|Difficult,11|Formidable,15} If that doesn't work, try this /r [[2d6 +?{Skill level} +?{Attribute bonus} -?{Wound Mod}]]>?{Difficulty of task?|Simple,3|Routine,7|Difficult,11|Formidable,15}
Thanks GiGs I have the math working now it just doesn't do anything with the number its comparing the result to. Your examples either let me show the roll or button it up to the total. The last part of the puzzle is to show whether it's greater than the target or not. It would be nice to have a success or failure result in here without needing a API script. Otherwise I just drop the task part altogether. Maybe at least showing the task number again as a reference to compare to the result would be a low tech solution?
1544758997
GiGs
Pro
Sheet Author
API Scripter
Thats a limitation of the basic dice macro engine. To go further you do need to use the API, either get a custom script written or use Power Cards.
Thanks GiGs I found a witty workaround. I made the task levels negative modifiers so that the total is 0 or greater  (a success), or less that zero (a failure). There are degrees of success/ failure in the version of Traveller I'm playing so add in a few other mods, and nest a few macros, and waa laa.