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 .
×
May your rolls be chill this holiday season!
Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

Modulo arithmetic for dice and "not" operator

A number of RPGs such as Story Engine, Lady Blackbird, and others count odd or even dice, rather than a range. I propose allowing any modulus, though I anticipate 2 will be the most likely value. Suggested syntax example: /roll 3d6%2 The above examples rolls 3d6, counts the even ones, and reports them as successes. But what if you want to know the odds instead? I'm not super familiar with the syntax so I'm not sure where it should go, but something like "/roll ~(3d6%2)" seems right. I use the "~" symbols since we are already using "!" for exploding dice. Substituting numbers other than 2 here would find matches for multiples of that number; so if you want o find 3, 6, 9, ... you would use %3, and so on. I'm aware that 3d6>3 is equivalent to 3d6%2, but some systems pay attention both to the number of even rolls and e.g. the highest face showing in a roll (Don't Rest Your Head is one such, I think).
If the value of the odd or even numbers are irrelevant, those are mathematically equivalent to coin flips; IE, d2s. If so, you might want to use "/roll 3d2-3"; that will give you the same success total. The problem is not that the modulus operator doesn't work. The problem is that, the way you wrote it, the modulus operator is working on the wrong number ; "/roll 3d6" will result in the sum of 3d6, which will then have the modulus applied to it. Roll20 currently has no way to do operators on single dice multiple times. If you did "/roll d6%2", that would work just fine, but you need the sum of that operation 3 times. What you really want is something like "/roll 3xd6%2"; which Roll20 cannot do because it's diceroller is broken. Please consider voting here: <a href="https://app.roll20.net/forum/post/1260406/rewrite-the-dice-roller" rel="nofollow">https://app.roll20.net/forum/post/1260406/rewrite-the-dice-roller</a>
1550175382
Roll20 Dev Team
Pro
Marketplace Creator
Thanks for the suggestion! After 30 days, Suggestions and Ideas with fewer than 10 votes are closed and the votes are refunded to promote freshness. Your suggestion didn't build the right momentum this time, but feel free to submit it again! We find that the best suggestions describe the problem you are having, and the solution you want. You can learn more about the process of making suggestions on the Roll20 Wiki! More details can be found here .