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

Pathfinder HP and Toughness

So I have a character in my campaign that took the Toughness feat, and the player doesn't want to have to remember to add it every level, so I thought I would try my hand at making it automatic. So, in the Max HP Formula bar, I've added an additional step for the extra point of HP to be added. However, the characters are level 1, so typing "+ @{level}" wouldn't work (For those of you who don't know the feat, it grants 3 additional HP at first level, and 1 additional HP every level after the 3rd). So my thought was to use "+ (3 + min(0, @{level} - 3))". However, "min(x, y)" isn't implemented. Any help is greatly appreciated. Thanks in advance, Dan
1428873170
Lithl
Pro
Sheet Author
API Scripter
For autocalc values, you can achieve min(A, B) with ((@{A} + @{B}) - abs(@{A} - @{B})) / 2 . So, min(0, @{level} - 3) would be: ((@{level} - 3) - abs(-@{level} + 3)) / 2
Huh. So I'd just have to put "( 3 + ((@{level} - 3) - abs(-@{level} + 3)) /2))"? -slams head against keyboard- I just spent the past hour mathing, and this was my result: ( 3 + [[ (@{level} - 3) * ( 1 - ( floor( ( 0 - 1 - (@{level} - 3) ) / ( abs( 0 - 1 - (@{level} - 3) ) + 0.001 ) ) + 1 ) ) ]]) I found it here: <a href="https://wiki.roll20.net/Dungeons_and_Dragons_3.5#I" rel="nofollow">https://wiki.roll20.net/Dungeons_and_Dragons_3.5#I</a>... I just had to figure it all out in my head before I was confident that it was what I wanted... And then I spent about 10 minutes trying to figure out if the minimum valid number was 0 or 1... I am not a clever man when it comes to math. Everything else on this character sheet I'm a whiz with. Just... Not math... I'm just going to use yours. It's much more compact, and hurts my pride less. Thanks, Dan
So, I plugged your equation in and got 11 HP, instead of 13 HP. Correct me if I'm wrong here: HP before Toughness = 10 HP after Toughness should = 13 10 + (3 + ((@{level} - 3) - abs(-@{level} + 3)) / 2)) = 10 + (3 + ((1-3) - abs(-1 + 3) / 2)) = 10 + (3 + (-2 - 2 / 2)) = 10 + (3 + (-4 / 2)) = 10 + (3 + -2) = 10 + 1 = 11 Somewhere your math went wrong... I think you're supposed to add everything after abs, not subtract... So (skipping all of the excess math) 10 + (3 + (-2 + 2 / 2)) = 10 + (3 + (0 / 2)) = 10 + (3 + 0) = 10 + 3 = 13 I believe you accidentally gave me the formula for max(x). Just a heads up for anyone else reading this. Cheers, Dan
1428888836
Lithl
Pro
Sheet Author
API Scripter
Dan R. said: I believe you accidentally gave me the formula for max(x). Just a heads up for anyone else reading this. No, that is in fact min(0, @{level} - 3). Bear in mind, however, at level 1 you're looking at min(0, -2) = -2, at level 2 it's min(0, -1) = -1, at level 3 it's min(0, 0) = 0, at level 4 it's min(0, 1) = 0, and so on. Swapping "- abs(...)" for "+ abs(...)" does change the equation from min(A, B) to max(A, B), which seems to be what you're actually looking for.
I guess so, yeah. I was trying to make the equation factor in a value of a minimum of 0 for the first three levels. I'm not very good at math, so I guess I didn't actually know what the two equations actually meant. Thanks for the clarification. In the end, the player ended up changing out the feat when he read a few others. :| Now I know when someone actually wants to take Toughness, though. Cheers, Dan