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

AutoCalc Math Problem (using MAX() function in autocalc)

I have an issue I have run into with my character sheet.  I have a game with some unusual rules regarding ability modifiers (Dark Heresy 1e) it has a concept called "Unnatural Ability".  Which means if you have Toughness 20 with Unnatural Toughness (1) it will double the toughness modifier, if you have Unnatural Toughness (2) it will double your toughness modifier then add 1. So a 20 has a toughness modifier of 2, but with unnatural toughness (1) the modifier becomes 4, and with unnatural toughness (2) it becomes 5.  I am not using sheet workers with this character sheet (mostly because I dont know how to use them well enough.  So instead I am using autocalc.  I kinda think I know the math to get what I want, the problem is I'm having trouble implementing it.  I think the math would be something like: Tmod = toughness / 10 UnTmod = (Tmod*(UnT*2)){max: (Tmod*2)}+UnT-1 Basic premise is if the unnatural toughness is a 1, multiply that by 2 then multiply the toughness mod by 2.  After that is done add the unnatural toughness mod minus 1 (cause we already dealt with the first unnatural toughness.  The problem is, I'm not sure how to do the MAX part, I'm fairly certain I've used something like that in the past, I just dont recall how. Thank you in advance!
1667394806
Peter B.
Plus
Sheet Author
You need to use the Keep-Lowest-One / Keep-Highest-One / Drop-Lowest-One / Drop-Highest-One&nbsp; <a href="https://wiki.roll20.net/Dice_Reference#Drop.2FKeep" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Drop.2FKeep</a> I do not entirely underlying logic you are trying to implement, but in order to have some max value that something can reach use the Keep-Lowest-One. Here is an example [[ {1*2/10,6}kl1 ]] This is a very simplified expression, where you the keyword kl1 &nbsp;stands for keep-lowest-one &nbsp;so in this case it will use whatever value is lower of the two arguments, ie. either (1*2/10) or (6). You can play around with that to make it work for your values. Good luck! Also you really should start looking into sheet workers. I know it is a big thing to get started on, but once you get into it, it will unlock a lot of cool stuff. I also avoided it as I found it scary, but it really is gold! Give it a shot!