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

Help on Rolling Macro! Make success vs. dynamic

Hey! I need help creating a macro and/or ability in roll20 that is able to incorporate success rolls with sum rolls in a single roll expression... eg, for a simple success roll: /r 1d100<13 [[1d100<13]] gives me number of successes, expanded in inline, respectively. However, I want to make "53" dependent on the character's attributes. Suppose Character's attributes are AGI of 6 and LCK of 3. "13" is a particular number of skill level that roll needs to be below. This skill level is determined by =AGI*2+LCK*.5+level modifier I've tried: /r 1d100<(@{AGI}*2+@{LCK}*2+5) /r 1d100<((@{AGI}*2)+(@{LCK}*2)+5) /r 1d100<(@{CHARACTER|AGI}*2+@{CHARACTER|LCK}*2) and /r 1d100<((@{CHARACTER|AGI}*2)+(@{CHARACTER|LCK}*2) TL:DR: Make the success vs. number dynamic based on character attributes. I can't seem to get this to work. Any ideas? Thanks.
1395687393
Gauss
Forum Champion
In Roll20 you can only have one term to the right of an inequality sign. However there is a couple solutions. First, move the extra terms to the left of the inequality. Example: /r (1d100-@{AGI}*2-@{LCK}*2)<5 Second, use inline brackets to create a single term on the right side. Example: /r 1d100<[[@{AGI}*2+@{LCK}*2+5]] If these don't work please let me know.
Ooooohhh! Only one term to the right of an inequality? What kind of craziness is this? Yeah, the application of that little nugget of knowledge (only one term is allowed to right of inequality sign), definitely explains everything. Thanks! While I have your attention, can I also ask the following questions or do I have to move them to separate new thread, each: "How do I use the same number roll to do multiple things with it in a macro?" "Are IF, THEN logic functions available in roll20 (like for excel and other basic kiddie scripts)?" 1. Doing multiple things with one roll. For example, y'all currently don't have a function (I don't think anyway) that shows "Degrees of success" for a particular roll. I'd like to do multiple things with a same roll. eg: /roll 1d100<50 /roll (50-1d100)/10 where both 1d100s above are actually the exact same roll. 2. Logic Statements Using the same example as above, only display the second line (/roll (50-1d100)/10) IF the first line gives a Success. Otherwise, just display the first line only.
At the Mentor support level, you can access the API which can be used pretty much to your hearts content for scripting. The base-line macro system however does not have the ability to store values for later use, use conditional statements like IF/THEN/ELSE, or change values of any attributes/bars (with the sole exception of the Turn Order tracker)
1395885114

Edited 1395885406
Gauss
Forum Champion
The Devs created the dice roller to be simple and easy to use. The expected use of the success/failure comparison was comparing a dice roll (with modifiers) to a single number. However, people often come up with new uses and this is what pushes things forward. Additionally, what people consider 'basic' is not 'basic to other people. If you would like more than one term to the right of the inequality without using inline brackets then I suggest you post a suggestion in the suggestion forum. To answer your questions: 1. You cannot without the API (a Mentor level feature). 2. You cannot without the API (a Mentor level feature).