Dice rules d100double and natural not working

Be sure to read and follow the guidelines for our forums.

Sep 3, 2022 12:07 am
It seems "d100double" is bugged and not detecting when doubles are rolled. "natural" too seems to not be making a difference between it and "total". We've been discussing the details in this thread
Sep 3, 2022 4:15 pm
I'm not saying it's not a bug, but didn't Bowl meet your requirements at the end of that thread?

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

This is slightly altered from Bowl's example - Ticks show success, crosses failures, doubles are highlighted.

"diceRules": [
{"rolled": "1d100","reason": " ##","total":">=##","contentAppend": "❌"},
{"rolled": "1d100","reason": " ##","total":"<##","contentAppend": "✅"},
{"rolled":"d100", "d100double":"true", "highlight": "invert bold"}
]
Sep 3, 2022 4:45 pm
Adam says:
... Ticks show success, crosses failures, doubles are highlighted.
That does appear to do what you describe.

I don't know if that meets the OP's requirements, though. Adding "reason"/"total" to the "d100double" does not seem to work properly, and they might need that.
Sep 3, 2022 5:20 pm
The bug is that natural isn't working at all and adding total or natural to d100double breaks the whole highlighting.

Because of that, you can't highlight the total in a d100double roll
Sep 3, 2022 9:12 pm
Natural isn't working at all?! It works for me.
Sep 3, 2022 10:26 pm
Ideally I wanted highlighting green and red for success and failures, with the ticks and crosses for crit successes and failures. But it seems you can't have both, since (I'm assuming) the d100double trumps the regular d100. I can only get highlighting or the emojis, but I wanted both.
Sep 4, 2022 2:42 am
It's working for me in my Flood game where I work with D6 but when I was trying to get this to work, natural didn't work at all. I dont know if it's just the natural tag, it interacting with D100 or maybe even with something else in these tags, though.
Sep 4, 2022 8:52 am
nezzeraj says:
Ideally I wanted highlighting green and red for success and failures, with the ticks and crosses for crit successes and failures. But it seems you can't have both, since (I'm assuming) the d100double trumps the regular d100. I can only get highlighting or the emojis, but I wanted both.
Okay. I get it. Those two attributes don't work together in the way you hoped. Is this a bug or an enhancement request? Dunno, and I'm not sure it matters either way.

The codes at: /javascript/gameOptions.js
Sep 5, 2022 12:27 am
bowlofspinach says:
adding total or natural to d100double breaks the whole highlighting.
I second (third?) this. Enchancement or bug, I think it should either be changed or reflected in the documentation.
d100double is definitely stange in general.
This code

{"rolled":"1d100","reason": " 50", "total":">=50", 
"d100double":"true",  "highlight": "fail invert bold","contentAppend":"❌✅"}


resulted in emojis and highlight being added to the first part of roll result, the one in brackets:
(77 ❌✅) = 77

Is it intended?
(I stumbled across this while experimenting.)

Edit: it probably is intended if d100double is supposed to add to a dice result - it overwrites total. I wonder if it's possible to have an attribute which determines where the content/highlight is added... Maybe it can help with d100double issues?
Last edited September 5, 2022 12:39 am
Sep 5, 2022 1:03 am
Quote:
I wonder if it's possible to have an attribute which determines where the content/highlight is added... Maybe it can help with d100double issues?
I was pretty sure that if you use "total" in your code, it highlights the one on the right side and if you use "natural", it highlights the one in the brackets.
I dont know why your code highlights the one inside the bracket, though.
Sep 5, 2022 1:24 am
It's the d100double tag. When used solo, it highlights the left part. (I think so, at least. My tests are being uncooperative. XD)
Last edited September 5, 2022 1:26 am
Sep 5, 2022 1:32 am
Yes, that's true. And my attempts to add a total to it failed, so you can only highlight the left with jt
Sep 5, 2022 1:34 am
Also, a fun discovery. This code:

{"rolled": "1d100","reason": " ##","total":">=##","highlight": "fail invert bold"},
{"rolled": "1d100","reason": " ##","total":"<##","highlight": "success invert bold"},
{"rolled":"1d100", "d100double":"true","reason": " 50","highlight":"success"}


results in a double roll having highlights on both parts. But if you change the reason (for last rule) to be " ##", it bricks all highlights.

But I think you can still use it to add marks to double rolls, like nezzeraj wanted? It won't be on the same side, but it can be something like (77❗ ) = 77.
Last edited September 5, 2022 1:41 am
Sep 5, 2022 3:59 am
I like the exclamation point! How did you do that?
Sep 5, 2022 4:17 am
It's just an emoji added with ContentAppend
Sep 5, 2022 11:26 am
nezzeraj says:
I like the exclamation point! How did you do that?

Bowl's right, it is an emoji! This code will do the highlights and add exclamation to any double.

{"rolled": "1d100","reason": " ##","total":">=##","highlight": "fail invert bold"},
{"rolled": "1d100","reason": " ##","total":"<##","highlight": "success invert bold"},
{"rolled":"1d100", "d100double":"true","reason": "","highlight":"", "contentAppend":"❗"}
Last edited September 5, 2022 11:30 am
Mar 10, 2023 4:06 pm
In regards to natural not working...

This works: {"rolled": "d20","reason": "DC: ##","total": "<=##","contentAppend": "⚠️","highlight": "success bold"}
Quote:
Rolls
Testing DC: 20 - (1d20)

(6) = 6 ⚠️
where this doesn't: {"rolled": "d20","reason": "DC: ##","natural": "<=##","contentAppend": "⚠️","highlight": "success bold"}
Quote:
Rolls
Testing DC: 20 - (1d20)

(6) = 6
Because it's just 1d20 I would expect both total and natural to produce the same result.

And a Caveat - With these rules, the d6 rolls work fine and produce the expected results, no matter the number of dice.
Quote:
{"rolled":"d6","natural":1,"reason": "[CD]", "content":"💥","hideTotal":true},
{"rolled":"d6","natural":2,"reason": "[CD]", "content":"💥💥","hideTotal":true},
{"rolled":"d6","natural":3,"reason": "[CD]", "content":"_","hideTotal":true},
{"rolled":"d6","natural":4,"reason": "[CD]", "content":"_","hideTotal":true},
{"rolled":"d6","natural":5,"reason": "[CD]", "content":"💥⚠️","hideTotal":true},
{"rolled":"d6","natural":6,"reason": "[CD]", "content":"💥⚠️","hideTotal":true}

Produces:
Rolls
[CD] - (1d6)
(💥💥)

[CD] - (3d6)
(_,💥⚠️,💥)

5[CD] - (5d6)
(💥⚠️,_,_,💥⚠️,💥⚠️)
The difference that stands out is that the "natural" rule for the d20 includes the "<=##" instead of a specific value. Is "natural" maybe not set for comparisons?
Mar 10, 2023 4:35 pm
Knighthawke says:
Is "natural" maybe not set for comparisons?
I think you're right. For ## reason comparisons total must be used.
Mar 10, 2023 4:57 pm
This should work (as per discord chat):

{
"diceRules":[
{"rolled": "d20","reason": "TN1","natural": "<=1","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN2","natural": "<=2","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN3","natural": "<=3","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN4","natural": "<=4","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN5","natural": "<=5","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN6","natural": "<=6","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN7","natural": "<=7","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN8","natural": "<=8","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN9","natural": "<=9","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN10","natural": "<=10","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN11","natural": "<=11","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN12","natural": "<=12","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN13","natural": "<=13","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN14","natural": "<=14","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN15","natural": "<=15","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN16","natural": "<=16","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN17","natural": "<=17","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN18","natural": "<=18","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN19","natural": "<=19","contentAppend":"💥","hideTotal":true},
{"rolled": "d20","reason": "TN20","natural": "<=20","contentAppend":"💥","hideTotal":true}
]}
Last edited March 10, 2023 4:58 pm
Mar 10, 2023 5:35 pm
Thank you! That does work. Now, is there a way to apply a second rule to the same roll and append another icon at the same time? :)

You do not have permission to post in this thread.