If, else, Case...

Apr 8, 2022 4:07 am
Ok a suggestion...
The possibility to use the "if, else" operation in the sheet...
Or else the "case" operation..

In function what I choose the sheet show me different contents...
Apr 8, 2022 4:22 am
I have no idea what that would mean 😅
Apr 8, 2022 4:56 am
Ok... If I choose the option 1 then the sheet show the description 1 else if 2 show description 2 else 3 descr 3... And so on... Else descr x


The case is the same things... But work differently...
Case (you choose)
1 descr 1
2 descr 2
3 descr 3
Else
Descr 4
Apr 8, 2022 5:24 am
Yes, this would definitely help to create more complex custom sheets.
Apr 8, 2022 5:29 am
I still don't understand.
So it would be like different pages you can flip between for (parts of) the character sheet?
Apr 8, 2022 5:40 am
Not exactly...
Then you have for example 4 classes of Pg...
You can set the content of a variable with different contents with one choose...

You choose worrior...
The sheet show you only the things relative to the warrior...
A description of the class the armour, the weapon....

You choose a mage... The sheet change and show you the magic , wands, ecc...

The possibility is almost infinity
Last edited April 8, 2022 5:42 am
Apr 8, 2022 5:55 am
At the more simple level, it could also help with the calculations on custom sheets.

Possible example:
if HP < maxHP/4, then modifier = -1, else modifier = +2

It would make it easier to calculate the math on character sheets for crunchy games.

It's sort of like what we can do with the dice rules (if roll = 20, then crit), but for character sheets.
Apr 8, 2022 7:24 am
Chalrytharendir says:
At the more simple level, it could also help with the calculations on custom sheets.

Possible example:
if HP < maxHP/4, then modifier = -1, else modifier = +2

It would make it easier to calculate the math on character sheets for crunchy games.

It's sort of like what we can do with the dice rules (if roll = 20, then crit), but for character sheets.
Yes... Right also in the calculation is helpful
Apr 8, 2022 7:26 am
Chalrytharendir says:
At the more simple level, it could also help with the calculations on custom sheets.

Possible example:
if HP < maxHP/4, then modifier = -1, else modifier = +2

It would make it easier to calculate the math on character sheets for crunchy games.

It's sort of like what we can do with the dice rules (if roll = 20, then crit), but for character sheets.
Formulae are evaluated in a js sandbox. Use a ternary operator for that.

https://i.imgur.com/HWort3t.png

https://i.imgur.com/zdV75yD.png

https://i.imgur.com/ylbxbya.png
Apr 8, 2022 8:13 am
What ZH wants (I think) is something which changes styles based on formulae (eg for display none). Currently, formulae can't be used in a colour block.
Apr 8, 2022 1:21 pm
Adam says:

Formulae are evaluated in a js sandbox. Use a ternary operator for that.
Awesome, that's good to know!
Apr 8, 2022 1:28 pm
Adam says:
What ZH wants (I think) is something which changes styles based on formulae (eg for display none). Currently, formulae can't be used in a colour block.
Nor to branch the code, so it evaluates one set of lines in one case or another set of lines in another case.
Apr 11, 2022 4:56 am
Adam says:
Chalrytharendir says:
At the more simple level, it could also help with the calculations on custom sheets.

Possible example:
if HP < maxHP/4, then modifier = -1, else modifier = +2

It would make it easier to calculate the math on character sheets for crunchy games.

It's sort of like what we can do with the dice rules (if roll = 20, then crit), but for character sheets.
Formulae are evaluated in a js sandbox. Use a ternary operator for that.

https://i.imgur.com/HWort3t.png

https://i.imgur.com/zdV75yD.png

https://i.imgur.com/ylbxbya.png
Yes Adam I see your example and I try it... But is some more I want to make...
I know is not easy... But I try to ask...

https://i.imgur.com/v7XFDKS.jpg

What do you see is a part of the Blade in the Dark player sheet... All the gray part is dedicated to a specific class and my desire is to change all the gray part with a if else choose...i

I know... Don't hate me...
But is were I want to arrive...
Last edited April 11, 2022 4:56 am
Apr 11, 2022 5:00 am
For now I work on a different solution... And use spolier tiles or snippet to divide the different class... And when a player select one... Delete the other... But if we can reach the if else target one player must only select the class from a dropdown menu or a checkbox and the sheet change...

You do not have permission to post in this thread.