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

min(x, y) and max(x, y) functions

Score + 17
1412714458
Sam M.
Pro
Sheet Author
We need min and max functions for rolls and character sheets, similar to the current floor, ceil, and abs functions. The current math intensive way to do these is not very readable or fun to use.
1412714837
Lithl
Pro
Sheet Author
API Scripter
For actual rolls, you can use keep high/keep low group modifiers, which is just as readable (if maybe slightly less intuitive) as max/min. The mathematic max/min is really only necessary for autocalc fields on a character sheet.
1417641305
Sönke
Sheet Author
True, keep high and keep low do work, but they are just nasty workarounds and complex rolls just become even more cumbersome using those workarounds.. I have to work with that quite a bit currently and this results in character sheet rolls like the following one: /r [Hide]{@{MU}-1d20, 0d1}kl1 + {@{IN}-1d20, 0d1}kl1 + {@{GE}-1d20, 0d1}kl1+@{Hide_SP} - {1d1*@{BE}-2, 0d1}kh1 I would much rather rephrase like this: /r [Hide]min(@{MU}-1d20, 0) + min(@{IN}-1d20, 0) + min(@{GE}-1d20,0) + @{Hide_SP} - max(@{BE}-2,0) Hence +1
1417697502
Sam M.
Pro
Sheet Author
This suggestion is more for character sheets where kh, hl, dh, and dl don't work for the same purpose.
1418235087
Sönke
Sheet Author
I stumbled upon a workaround for those in character sheets and agree that that one is a lot less readable. Since I don't need those functions in character sheets though, my +1 is only for rolls which I hope would be included, if at all, together with character sheets. :-)
+1 for max and min
1429310443
Kryx
Pro
Sheet Author
API Scripter
Would definitely clean up my sheet a bit.
+1
This is still very needed.