tweak/hashed_dice_total_highlighting

Feb 8, 2022 7:35 am
From BoS: Would it be possible for a dice code to read a number put into the reason field and then compare the roll result to that? For example, if I write "Charisma 45" in there and roll a D100, could it highlight every result equal to or smaller than 45? I know it could be done manually for every possible roll result but with 100 possibilities, that would be a long dice code 😄
Quote
Feb 8, 2022 7:37 am
What would the rule JSON look like? I don't want to have to teach people regular expressions.

Presumably this only applies to totals? I've listed them all for DCs (link), and it was annoying.

I can see it being used in 5e for DCs and ACs.
Quote
Feb 8, 2022 8:15 am
Suggestion: Adding a placeholder that then uses any number put into the Reason field
Adam says:
I think your proposal is that "##" acts as a token to represent any number.

So I'd replace my mess with:
{"rolled": "1d20","reason": "DC##","total": "<##","contentAppend": "❌","highlight": "fail invert bold"},
{"rolled": "1d20","reason": "DC##","total": ">=##","contentAppend": "✅","highlight": "success invert bold"}

I think ## just means "any non-negative integer" (doubled up in case people are already using #)
Quote
Feb 8, 2022 8:46 am
I think this is a good suggestion. Moving to discussion.

What do we think of BoS's ## syntax? I like it - it's certainly easier than teaching users regex.
Quote
Feb 8, 2022 9:04 am
First: Why 'non-negative' numbers? The dice roller supports subtraction now, so allowing negative numbers could be useful.

This could be a good start, I am not sure about the syntax, but it does not look too bad.

I worry that putting this in the dice codes will complicate the possible equations we can use. Maybe a syntax that marks things as variables in the dice ROLLER would be more useful?

There was talk of adding variable lookup from the sheets? That may be a much bigger project, though.

What is presented here can as easily go on the dice roller using the same syntax.

Reason: Charisma #45
Roll: 1d100 < #
or just: Roll: 10100 <
or: Roll: > 1d100

We could then vary things as needed per roll.

Reason: Charisma #45 penalty #-10
Roll: 1d100 < #+#
Quote
Feb 8, 2022 9:39 am
vagueGM says:
I worry that putting this in the dice codes will complicate the possible equations we can use. Maybe a syntax that marks things as variables in the dice ROLLER would be more useful?

There was talk of adding variable lookup from the sheets? That may be a much bigger project, though.

What is presented here can as easily go on the dice roller using the same syntax.

Reason: Charisma #45
Roll: 1d100 < #
or just: Roll: 10100 <
or: Roll: > 1d100

We could then vary things as needed per roll.

Reason: Charisma #45 penalty #-10
Roll: 1d100 < #+#
I don't understand what you're getting at.
Quote
Feb 8, 2022 11:10 am
I am lacking context, but from the description it sounds a little like this could be a once off roll or have variations.

Putting this logic into the dice roller rather then the game's dice highlighting could be more useful.

Though I am not sure why we don't just write 'Reason: Trying to convince' and 'Roll: 1d100 < 45' (after manually looking up the Charisma on the sheet because the system does not do that for us). That seem simpler than all the # complication. But I may be missing the reason behind this.

If it is all about the highlighting and not about the rolling, then a generic "if the conditions of the dice code were a success" could be useful, then players can add 1d100<45 and it will highlight if the proves true.
Quote
Feb 8, 2022 1:57 pm
vagueGM says:
..can as easily go on the dice roller
Easily? Ain't nothing easy with the dice roller code.
Quote
Feb 8, 2022 1:59 pm
Fair enough. :)
Quote
Feb 10, 2022 7:03 pm

Have you looked at this on staging? Public

No
Yes - I'm happy with it
Briefly - I'm happy with it
Yes - I'm NOT happy with it

You do not have permission to post in this thread.