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 here.
×
×
Cookie Preferences
We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Hi. I can't figure out how to write a roll that does the following: Roll a d12. Keep the result if it is below 12, but if it is 12, roll a d20 and take that result instead if it is bigger than 12. Is there a way to do it?
You could do it with a custom API script. You could also do it with a Rollable table by faking it - calculating the probabilities of every possible result and building the table. You cant do it with a normal macro. For the API route, we'd need to know how you are using it - what does a complete roll look like? What do you want to appear in chat?
Custom API wouldn't be so convenient, as I would like the roll to be part of some larger inline roll. It is doable, but it'd rather use some dice expression, if possible. How would you do it with a normal macro?
You cant do it with a normal macro. It is not possible at all. Macros cannot do conditionals, like "if the d20 is max, check if d20 is higher and use that instead".