Public Repository of Dice Highlight Codes

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

Jul 29, 2021 10:34 am
Similar to the Repository for Character Sheets, I figured it might be useful to have a place to list codes for the new Dice Highlighting feature available under "[ + ] Advanced rules definitions".

Please contribute any that you find to work in your games.

Alphabetical index:
AGE (Expanse, Dragon Age, Blue Rose, Fantasy)
Alien
Blades in the Dark
Burning Wheel (incl. Mouse Guard)
Cypher System
Delta Green
DnD 5e
Forbidden Lands
Kult
Lasers & Feelings
Mythiria
Powered by the Apocalypse (PbtA)
Star Wars D6
Tales from the Loop
Tiny D6
The One Ring 2e
Last edited May 2, 2024 9:52 pm
Jul 29, 2021 10:34 am
[ +- ] Blades in the Dark
[ +- ] Blades in the Dark, without colors
(Edit: added "hideTotal" directive)
Last edited March 24, 2022 4:29 pm
Jul 29, 2021 10:39 am
[ +- ] DnD 5e
[ +- ] DnD 5e DCs
Last edited May 8, 2022 7:34 am
Jul 29, 2021 12:00 pm
[ +- ] Star Wars D6
Last edited March 24, 2022 4:26 pm
Jul 29, 2021 12:24 pm
[ +- ] Tales from the Loop
[ +- ] The Wildsea
Aug 3, 2021 6:13 pm
[ +- ] AGE (Expanse, Dragon Age, Blue Rose, Fantasy
Aug 3, 2021 6:15 pm
[ +- ] Cypher System,Numenera, The Strange
Nov 2, 2021 9:43 am
[ +- ] Setting a game background image
Last edited November 8, 2021 10:28 am
Nov 2, 2021 6:48 pm
Quote:
Setting a game background image
Be careful of setting a background image, this choice can make the page very hard to read on some people's systems. Keep it subtle or avoid if unsure.
Dec 9, 2021 12:16 pm
[ +- ] Burning Wheel, Mouse Guard
Jan 17, 2022 5:06 pm
The definitive list of the dice rules json

Conditions
These conditions are ANDed, ie. they must all be true for the effect to be applied.
You can apply multiple dice rules for OR conditions.


rolled Matches part of the dice being rolled.
e.g. 'd20' matches 1d20, 5d20 etc. 'd' would match everything.
case insensitive so d6 matches 3D6
natural * If the die result matches this number.
ge If the die result is greater or equal to this number.
le If the die result is less than or equal to this number.
paired Two of the dice show the same value.
lastDie Special formatting for the last dice in a roll.
d100double If true and a d100 shows 11, 22, 33, ..., 99, 100 then this condition is met.
reason If the reason field of the roll contains this text (case insensitive).
total * If the total of the dice is equal to a value.


* natural and total both support expressions. Examples:
"natural":5 matches if a dice roll is exactly 5
"natural":"<15" matches if a dice roll is less than 15
"total":"10<=x<=15" matches if the total is between 10 and 15 (inclusive)
"natural":">=15" matches if a dice roll is greater or equal to 15



Effects
If the conditions are satisfied then the system applies effects specified in these parameters.

highlight Highlights the die, and combination of the following separated with spaces:
bold, success (green), fail (red), info (blue), invert, underline
content Changes the content of the die result. Emoji can be used for content.
contentAppend Appends the content to a dice result or total (depending on the condition used).
hideTotal Hide the total.


Special
If set to true then all the dice in this pool (matching the rolled condition) are sorted. Other conditions are ignored. This is used by games who always want to see the dice rolls in order.

autoSort Automatically sort the dice into numberical order


Examples:
{"rolled":"d20","natural":20,"highlight":"bold success invert"}
If any number of d20s have been rolled and if any of them show a natural 20, then highlight them bold, success (green), invert (white in a green background)

{"rolled": "1d20", "reason":"[injury]", "ge": 5, "le": 7, "content": "Internal Injury"}
If 1d20 is rolled and the reason contains the text '[injury]' and the roll is between 5 and 7, then change the content of the roll to say "Internal Injury"

{"rolled":"3d6","lastDie":true,"highlight":"underline"},
{"rolled":"3d6","paired":true,"highlight":"info bold"}
If 3d6 are rolled then highlight the last dice by underlining it.
If 3d6 are rolled and any two dice match, then highlight the last dice by making them blue and bold.

{"rolled": "2d6","total": "<=6","highlight": "fail bold invert", "contentAppend":"😫 Miss"},
{"rolled": "2d6","total": "7<=x<=9", "contentAppend":"😑 Partial Success"},
{"rolled": "2d6","total": "10<=x<=11", "contentAppend":"😊 Success"},
{"rolled": "2d6","total": ">=12","highlight": "success bold invert", "contentAppend":"🤩 Exceptional Success"}

Different highlighting and content appended to the result depending on dice total.

Hashes can be used as a substitute for arbitrary values.
e.g.
{"rolled": "1d20","reason": "DC##","total": "<##","contentAppend": "❌","highlight": "fail invert bold"},
{"rolled": "1d20","reason": "DC##","total": ">=##","contentAppend": "✅","highlight": "success invert bold"}
Last edited March 4, 2022 2:10 pm
Jan 31, 2022 11:27 pm
Adam says:

{"rolled": "2d6","total": "<=6","highlight": "fail bold invert", "contentAppend":"😫 Miss"},
{"rolled": "2d6","total": "7<=x<=9", "contentAppend":"😑 Partial Success"},
{"rolled": "2d6","total": "10<=x<=11", "contentAppend":"😊 Success"},
I tried the lines above and rather than doing what I thought they would (and probably what they are supposed to) it actually highlights the individual dice instead of the total (after the =). It also doesn't seem to work with the multiple lines, it always gives the same highlighting (on the dice not the total), nor does it add the text.

BTW.. is there any way to roll with taking away lowest or taking only best? Things like that?
Last edited January 31, 2022 11:42 pm
Feb 1, 2022 6:38 am
Ganesh says:
I tried the lines above and rather than doing what I thought they would (and probably what they are supposed to) it actually highlights the individual dice instead of the total (after the =). It also doesn't seem to work with the multiple lines, it always gives the same highlighting (on the dice not the total), nor does it add the text.
That code hadn't been deployed yet. It has now - give it a try.
Ganesh says:
BTW.. is there any way to roll with taking away lowest or taking only best? Things like that?
Not yet. That'll need to be in the dice code, not the highlighting code.
It's next on the dice list. Negative dice support was ahead of it in the improvement queue (e.g. 1d20-1d4+1)
Feb 1, 2022 8:21 am
Fantastic. Works like a charm!
Feb 1, 2022 2:55 pm
Hi Adam,

Have the minimum rules for natural and total been released yet?

"diceRules": [{"rolled": "1d10","reason": "[min 4]","natural": "<4","content": "4"},
{"rolled": "1d10","reason": "[min 4]","total": "<4","content": "4"}],
Feb 1, 2022 2:58 pm
wdunn says:
Hi Adam,

Have the minimum rules for natural and total been released yet?

"diceRules": [{"rolled": "1d10","reason": "[min 4]","natural": "<4","content": "4"},
{"rolled": "1d10","reason": "[min 4]","total": "<4","content": "4"}],
Hi. They have.
Apr 9, 2022 6:14 pm
[ +- ] Forbidden Lands
Supports separate rolls for skills and resource rolls. For resource rolls, the word "resource" needs to be in the reason.
Last edited April 9, 2022 11:44 pm
May 8, 2022 3:19 pm
Starting to look at those codes and implement them in my games (took some work and trial and errors as I suck at coding). Just one question though, where do you get all those emojis? I'm looking for something I could use for a critical success (maybe confettis) and something for a fumble (maybe a skull)...
Last edited May 8, 2022 3:20 pm
May 8, 2022 3:27 pm
On my laptop, Windows Key and . together open an emoji menu. Otherwise, you can usually just google "Skull emoji" or something and then just copypaste from there

🎉💀
May 8, 2022 3:36 pm
Be warned. Emojis don't display the same on everyone's systems. So you could get strange or undesirable results.
load next

You do not have permission to post in this thread.