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

Checkbox Gymnastics

1406923266
Tom
Plus
Sheet Author
Ok, I have an idea for a neat trick for my character sheet but need a little help making it happen. I'm building in a wound tracker that can then be used to impose wound penalties (-1 to -3) to different dice rolls. However, some special abilities allow you to ignore these penalties. So I thought maybe having checkbox that you could click to ignore these penalties. But without the use of if/then's, I'm not sure how to make that happen. One work around I considered was to have a checkbox that, when checked, apply the penalties. since most checkboxes are 0 if unchecked, it would be simple to make the "penalty" simply (wounds x checkbox), so when unchecked the penalties would become 0 (1x0=0). But that seems Unintuitive. So does anyone have a better way? (I'm not married to the checkbox idea, it just seemed like the most intuitive way to turn things on and off).
1406926118

Edited 1406926163
Paul S.
Sheet Author
API Scripter
A dropdown box with the default value being zero I'd say. Allows you to conserve space and have multiple options (-1, -3, etc...). Bit more complicated for abilities that allow you to ignore these penalties ... I'd have to know more about the rules in question .... Are all penalties ignored all the time? (if so, just keep the dropdown selector at 0). Are penalties ignored for just certain actions SOME of the time? (if so, have a check box Pain Tolerance Active? {or whatever - you get the idea} whose value is the absolute value of the dropdown box value and this value is then added to relevant checks. So - that's kinda confusing rereading it. Here's a breakdown: Injured? - dropdown box name=injured label=injured Pain Tolerance? - Checkbox name=paintolerance label=paintolerance paintolerance=abs(@injured) total attack = @attack+@modifiers+@injured+@paintolerance Something like that. S'what I'd do anyway. Or try to do - I've not tested this string and syntax is just thrown together for example ... but should be easy enough to hack together for your sheet. Edit: defaults for both would be zero.
1406927397
Tom
Plus
Sheet Author
Paul, very close to what I'm doing. Pulldown for injury? Check. This creates an attribute called injury which scales from 0 (healthy) to 3 (dying). i already have a checkbox for an Exhausted condition, which imposes an additional -1 penalty. These two attributes are figured into a single attribute called Wounds, which is the man penalty applied (so 0 to 4 total penalty). ignoring wound penalties should affect only the Injury attribute. A character that can ignore wound penalties can still suffer from exhaustion. This is mostly to save me from building in yet another "-@{attribute}" into all of my macros. So, ideally, all the magic should happen in the wound attribute calculation. Im not sure how paintolerance=abs{@injured} is supposed to work. ABS? thinking about it, I wonder if you could do something like this: Checked, pain threshold has a value of 3. wound attribute becomes = @{exhaustion} + ((@{injury}-@{pain tolerance})) then set a floor of 0 on (@{injury}-@{pain tolerance})). So if injury-pt comes out to -1 or -2, it is treated as 0. Can that be done? Just thinking out loud here, not really in a position to do any testing at the moment.
You should be able to do that using the kh syntax, something along the lines of "{@{injury}-@{pain-tolerance}, 0}kh1" (note, I'm at work, so I can't verify that my syntax was correct at the moment, but hopefully it's enough to get you pointed in the right direction).
1406990774
Paul S.
Sheet Author
API Scripter
Tom - ABS is the code for absolute value. So basically if you've got an injury status of -3 ... Setting paintolerance=abs(injury) will set paintolerance to 3. That way in the equations using these two variables, they will cancel each other out. But only when the checkbox for pa intolerance is checked. It's default (not checked) can be set to zero.
1408038595
Tom
Plus
Sheet Author
After playing around with this for a few minutes, I had a head smack moment. If the value of the ignore injury checkbox is equal to the injury attribute, and the injury attribute is equal to injury-ignore injury, they cancel each other out. Nothing fancier than that required.
1408052226
Tom
Plus
Sheet Author
Update: may have spoken too soon. Shortly after I did this, every dice roll on the sheet that referenced the wound attribute broke. S I disabled this feature. I noticed the calculation field was throwing back some very weird numbers. I'm going to redress this next week when I have a bit more time to spend on it.