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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Plugging a few basic gaps in the /roll system

Hello! While the roll system seems quite expansive in the sense that it caters to a lot of common rulesets, I think it has skipped a few things: Amongst the basic math functions, I'd quite like to see min and max. I am currently using a crazy workaround for those; more on that in a bit. While one is at it, pow (or p^q notation) might as well be present, and perhaps even log. sqrt could be convenient though is obviously not essential if pow is present. Grouped rolls do not quite do what they say in the Dice Reference; when trying to 'implement' my own max function so I could roll d6 and set a result lower than 3 to be equal to 3, I tried {3,d6}k1 and it threw an error with "Cannot mix M and sum rolls in a roll group". I'm not quite seeing/understand why not; intuitively, {3,d6} looks like it should do the equivalent of /roll 3 and /roll d6, then operate on those results. I eventually achieved what I wanted by using {3d1,d6}k1, which I refined to {d0+3,d6}k1 so as not to spam the chat with a load of summed 1s, but {3,d6}k1 or max(3,d6} would make a lot more sense. In a similar vein, I can't find any way at all to roll e.g. 2d6 then use the total result in a success test, e.g. succeed if the sum is greater than 8. 2d6>8 will apply the >8 test to each d6 individually, so will always return 0 successes, but {2d6}>8 does the same thing as if it were {d6,d6}>8, where intuitively (and by the description of roll groups), it should compute the 2d6 total first. {d0,2d6}>8 is a workaround, which gets even more clunky with a less-than test, since one needs {d0+9,2d6}<8. Finally, a conditional operator which interacts with successes would also be quite handy, e.g. "if 2d6>10 succeeds then roll d8, else roll d6". Notation-wise, I'm thinking something like {2d6}>10 ? d8 : d6 to mimic most popular programming languages, if the ? doesn't interfere with the prompt system. Obviously, if the above workaround were still needed then this would be {d0,2d6}>10 ? d8 : d6.
I have a similar suggestion here... <a href="https://app.roll20.net/forum/post/1260406/rewrite-" rel="nofollow">https://app.roll20.net/forum/post/1260406/rewrite-</a>... that you might want to move your vote to. It doesn't have everything you ask for in your post, but it does have a little more support...
Ah! As a regular user I believe I don't have a vote as such, though by all means copy/paste any parts of the above which extend your original suggestion if it helps to have everything in one place / one thread.
1429428882
vÍnce
Pro
Sheet Author
Hi Teh. You can remove (uncheck) your vote from your suggestion title anytime and use it elsewhere, perhaps Roger's suggestion. :-) If there are no longer any votes on a suggestion, I believe it will be removed from the Suggestion Forum. Cheers
If you're willing/able to get a mentor-level subscription, the ExtendedExpressions script supports all of the functionality in the suggestion; it may be able to tide you over until there's a way to do all that natively.
1550175403
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 .