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

Add min() and max() functions to roll20 calculation

Roll20 already provides floor() and ceil() to get round numbers in math formulas, but it's missing min() and max() allowing you to get the smallest and highest value of an array of values. Currently, the only thing that exists in Roll20 is around dice rolling, it is the {}kh, {}kl macros, however those only work when rolling dice, it'd be great to have that for math formulas in general. For example, Pathfinder defines a lot of values like "1/4 of your level (minimum of 1)" and there is no way to say minimum of 1 in formulas, adding those functions would allow us to write something like this [[min(floor(@{class1_level}/3),1) + @{intelligence_mod}]] making the formula work properly. It'd be great if the list of parameters was not bounded so you could compare 3 values or more and get the biggest one.
1648199450
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 .