Use Checkboxes and Status icons as Stats

I’d like to use checkboxes as a 1 or 0 value in Actions and Stats.

[x] Distracted, -2 on Skill rolls
[_] Vulnerable
[x] Encumbered

Then my Action formula would be something like:
!( 1d6-{distracted == 1 ? -2 : 0} )

Also useful would be if each Status icon had a name, and my formula could treat them like a checkbox, 1 if present, 0 if not.

For bonus awesome, allow a status icon and checkbox on the character sheet to have the same name, and selecting it on the character sheet would apply the status icon to the token (and vise-versa).

(The example is from Savage Worlds.)

I just realized this partially works. An action that is {distracted} doesn’t work, but {distracted +1} does. It might be that I don’t fully understand the correct syntax.

This is what you are looking for:

!(1d6 - {distracted ? -2 : 0})

If you just test against distracted, it tests true if its checked and false if it isn’t aka boolean 1/0. Each check box does have a name and you can treat them as such. I use it a lot in my sheet.

For example:
{W1_Prim ? (Str_Mod + Dex_Mod - 3) : (W1_Off ? (Str_Mod + Dex_Mod -6) : (W1_Thr or W1_Proj ? Dex_Mod : Str_Mod))

For example in yours you could say:

!(1d6 + {Distracted ? -2 : 0} + {Vulnerable ? -4 : 0} + {Encumbered ? -2 : 0})

Assuming your check boxes were named “Distracted”, “Vulnerable”, and “Encumbered”

The icons on the other hand…that’s definitely a new feature.

Yeah… I think I hit a bug or something.
This code fails: Are you distracted? {Distracted}
This code works: Are you distracted? {Distracted +1}

I wrote the simple code first to see if I could read the value as my way of testing the feature, but it turned out to be a narrow case where the feature doesn’t work. It seems to work fine in more complex formulas.

Try wrapping your curly brackets in parentheses


I’ve had good luck getting this to return values when I had the same issue.

1 Like

Remember that Checkbox values are Boolean, either True or False. If you want to do a type conversion try adding 0 to the Checkbox:

{Distracted + 0}

Aha! I was thinking of them as boolean, either 1 or 0. Thinking of the +1 or +0 as forcing a type conversion makes sense to me. Thanks for filling in that mental model for me.

I’m too lazy to check; can you do {Distracted * 3} and get 3 or 0?

(Filling in the minimum message size quota)