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

Set macro minimum?

Is there any way with basic macros (not the API) to set a minimum on a calculation. Example would be to do an inline modifier string of Armor minus Armor Penetration with a minimum value of 0 so that armor penetration in excess of the armor value doesn't add to the result?
Something like this should work. Keeping the highest 1 with 0 being the other value would prevent negatives. /r 1d20+[[{@{Test|strength}-20,0}kh1]]
Perfect and simple! thank you very much!