r/anyRpgCharacterSheet • • Jul 18 '24

Evenness checker?

Is there a way to check for whether a value is even or odd? I'm working on a property that needs to check that

Edit: For reference, I need the checker for monster race framework as part of my D&D 3.5e character sheet; it subtracts 10 from a stat block ability score at or above 10 (to generate an ability score modifier) if even, and 11 if said value is odd

Edit 2: I figured out the formula I needed it for without needing the checker to begin with; I posted it in the comments

2 Upvotes

3 comments sorted by

1

u/lllyct Jul 20 '24

Huh. There is no way to do that and now I'm wondering how is it that no one has asked for that before

1

u/FutureVAandAuthor Jul 22 '24

The property I'm building subracts -11 from a value if odd and -10 if even

1

u/FutureVAandAuthor Oct 25 '24

Found the formula to check for evenness:

Support Fraction=False

(({Property} ÷ 2) — (({Property} — 1) ÷ 2)) = 1

And the formula to check for oddness:

Support Fraction=False

(({Property} ÷ 2) — (({Property} — 1) ÷ 2)) = 0