Modify the ability dices with Checkboxes

i’m a newby in httml and other programming languages, recenty i decide to create a gdr with a few friends, to play some adventures while we’re locked in home.
So, here’s my problem:
I got Ability checks, based on Stats, so i’ll roll a number of dice equal to my Stat ability ( ability Diplomacy roll Xd6 where X=my Diplomacy Stat), and i want to put a general checkbox that can halve or double the dice of all ability I will roll, based on some situation.
I tried to look over the forum, but i can’t find or understand the answer here and there in the Topics, hope someone can help me out;)

P.s: I hope the topic is undestanduble, and thanks in advice for the help

Hi @Berry_Fox

In your Action using the example above you would do something like this:

!({Diplomacy_Half ? ceil(Diplomacy_Stat / 2) : (Diplomacy_Double ? Diplomacy_Stat * 2 : Diplomacy_Stat)}d6)

In this example, Diplomacy_Half and Diplomacy_Double are the names of your checkboxes for halving or doubling your dice pool. If the number of dice should be rounded down instead of up, use floor instead of ceil in the example I gave you.

Of course you can make the checkboxes affect any ability check. Just rename Diplomacy_Half and Diplomacy_Double to something like Ability_Half and Ability_Double and then use them in every Action for ability checks, just changing the Stat name where needed.

1 Like

hello, @LaMorte,
Thank you for your response, if I get what you are saing, by your method I will have two checkboxes for each ability, where i decide when i need to halve or double the dices that have to be rolled.
What I’m looking is a formula to use only two checkboxes for all my abilities, if it exists, or atleast a method to avoid a Sheed full of Checkboxes…
There maybe a way, by putting some kind of macros (if it’s the right word, still sorry for my newbiness) on the Abilities that can be read by the macro of the checkbox?

As you I mentioned, you could just use two checkboxes, and have every ability roll check those two, so you don’t need to have a whole mess of checkboxes.

So, You would have two checkboxes, above all your rolls, labeled “Double” which would be a checkbox named Ability_Double and one labeled “Half” named Ability_Half.

Then all your Actions will look like:

!({Ability_Half ? ceil(Diplomacy_Stat / 2) : (Ability_Double ? Diplomacy_Stat * 2 : Diplomacy_Stat)}d6)

Then you only need to change the word “Diplomacy_Stat” in each Action for the name of your Stat.

1 Like

It’s work fantastically!!! Thank you @LaMorte, and forgive my ignorance before:)
Have a good day

Not a problem @Berry_Fox

I’ve been creating character sheets on Astral for more than 2 years and I’ve been programming for almost 40 years.

1 Like

wow @LaMorte, that’s a lot of curriculum you got here;)
Since i’m a rookie here, and soon i’ll start my first adventure, i guess i’ll hear more from you if I’ll get more problems; i saw that you’re quite active in the forum too.
Thank you again;)

1 Like

// Closed as resolved