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

Little math Confusion

I did a search but couldnt find anything else and ive tried what i thought would work and im not at a total loss /em : Attempts to dodge /r d20 + ?{Attack Difficulty?} <15 + ?{Bonus to dodge} This is for a game system of my design, when dodging you want to roll lower. All dodges start ay 15, then minus the attack difficulty (how much it beat your AC by) and then characters can get bonuses to dodge, making the number higher and increasesing the chance to roll under the number. example guy beats your AC by 11, so at base dodge you need a 4 or under to evade it or with + 5 dodge you need a 9 or udner. I hope this made sense Thwe issue i have is the above looks correct to me and ive followed the wiki best i can but the game only rolls the first part and gives the total, it does not do the whole "0 successess" thing for it not bein lower then 15+bonuses, it just doesnt say anything about that bit at all. Any help?
1486444268
Lithl
Pro
Sheet Author
API Scripter
You need to wrap the left side of your check in curly brace to make it a group, and the right side in double square brackets to make is an inline roll (so the system will use the single, calculated total): /r {d20 + ?{Attack Difficulty?}}<[[15 + ?{Bonus to dodge}]] I also recommend including a default value for your roll queries, so that if the player simply hits 'enter', they'll get the default instead of empty space (which will break the macro): /r {d20 + ?{Attack Difficulty?|10}}<[[15 + ?{Bonus to dodge|0}]]
Damn dude, you have delivered! Not only does this work perfectly the way i wanted it to, it shows more info then i had expected and you have taught me to imrpove my other macros. Thank you so much. Just a little wondering, that inline function, is it needed for this to work? The wiki made it seem like it just reduces the information given not that it had a full function of its own.
1486453740
Lithl
Pro
Sheet Author
API Scripter
The right side of a roll target can only be a single number. Inline rolls can condense any roll expression into a single number.