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

Super complicated Math

Background: In Cthulutech, you have five wound levels.  Each wound level has a number of damage boxes equal to the character's vitality score.  When you take damage, it fills up part of each wound level.   Once one wound level is full, you add the remaining damage to the next level, as so on.  This gets more fun because the vitality score changes when certain characters shift form.  For example:  If Bob Claws-a-Lot has 10 vitality as a human (10 visible boxes), and 14 vitality as a monster each of the five wound levels gains 4 more boxes when he is a monster. What I have: I have a row of radio buttons to look like damage available boxes (the number is equal to the vitality).  Another row of (different colored) check boxes are stacked on top of them, to represent the damage taken.  I have it set up that when the vital changes, the number of visible "damage available" boxes changes. What I am asking: I would like to set up some kind of magic so that when a character takes damage and then shifts form, the damage carries over...properly. If Bob has 12 points of damage while in human form, it is two points into moderate wound.  If he shifts into monster form, he is in light wounds.  How do I get the damage to move from one damage level to the next?
1483693973
Natha
KS Backer
Sheet Author
API Scripter
I'm not sure I get the mechanic but it looks like a job for sheet worker, triggered by a change of an attribute representing the current form ?
1483695731

Edited 1483731424
Sounds like you're dealing with something like @{wound1} = min(@{damage}, @{vit}) @{wound2} = min(max(@{wound1} - @{vit}, 0), @{vit}) @{wound3} = min(max(@{wound2} - @{vit}, 0), @{vit}) etc? edit: @{wound1} = min(max(@{damage} - @{vit} * 0, 0), @{vit}) = min(@{damage}, @{vit}) @{wound2} = min(max(@{damage} - @{vit} * 1, 0), @{vit}) @{wound3} = min(max(@{damage} - @{vit} * 2, 0), @{vit}) @{wound4} = min(max(@{damage} - @{vit} * 3, 0), @{vit}) @{wound5} = min(max(@{damage} - @{vit} * 4, 0), @{vit})
Natha said: I'm not sure I get the mechanic but it looks like a job for sheet worker, triggered by a change of an attribute representing the current form ? I think sheet workers is the way to go, but I'm trying to work the math out.  Its been quite a few years since school, and my math skills show it. Silvyre 's input looks like exactly what I need to have the monster form match the human form.  But upon switching to a mortal form, the wounds transfer back, and the character could be at a much higher wound level.  Using the Bob example above, it Bob is in monster form, and has 22 points of damage, he is in the second wound level.  But when he transforms into a human, his vitally drops, so those 22 points of damage puts him in the third wound level. 
1483722229

Edited 1483722318
chris b.
Pro
Sheet Author
API Scripter
I guess that should not happen? Should the damage be proportional to the max? so it goes up when changing to a monster and down when changing back to a human?