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.
May 9, 2022 12:26 am
Yeah, I'm using Mac, not sure if I have any such function on my computer...

Len

May 9, 2022 4:18 am
kalajel says:
Yeah, I'm using Mac, not sure if I have any such function on my computer...
@Kalajel here is a website with a complete list of emoji characters: https://unicode.org/emoji/charts/full-emoji-list.html

You can cut and paste an emoji from the "Browser" column into forum text, and it shows you what the emoji will look like in various mobile platforms.
May 9, 2022 5:10 am
It's Ctrl+Cmd+Space on this Mac.
May 9, 2022 2:04 pm
@Len: Thanks. I also decided to search on how to access emojis on my Mac, and from what I saw, they look like exactly the sort of emojis that's been posted on here so far... Though, it's probably still good to be safe than sorry and perhaps use your link instead...
Jul 2, 2022 10:15 am
Possibly of interest to some, the Reason field only needs to start with "base" or "stress" and is not case sensitive, so a player who types the Reason "STRESS DicE" will still get the output formatted correctly.

Unfortunately, there is not (yet!) a way to count both 6s and 1s on the Stress Dice, but I am looking into it. Will update the post if I can figure out how!
[ +- ] Alien RPG
Last edited July 2, 2022 10:17 am
Jul 25, 2022 12:41 am
[ +- ] Kult
[ +- ] Powered by the Apocalypse
Last edited July 25, 2022 11:03 am
Oct 14, 2022 3:06 am
Add DC 4 to focused rolls reason
[ +- ] Tiny D6

For critical hit or miss I couldn't find a way to evaluate the total if it was hidden so it is a totally different rule set
[ +- ] Tiny d6 with Critical hit/miss
Last edited February 3, 2023 5:17 pm
Nov 29, 2023 4:14 am
I'm trying to do custom dice codes for Star Scoundrels, which uses the Action Tales system (also used for Neon City Overdrive and Hard City). It's a dice pool system where you roll a d6 for each thing you have going for you, and a d6 for each thing you have going against you. So it might be 3d6 vs. 4d6, or 5d6 vs. 2d6. Any "ties" between positive and negative dice cancel. The highest remaining positive die is the result.

Results are that 6 = success, 4-5 = partial success, 3- is a failure. Extra leftover 6s act as critical successes. If you last positive die has a 1 (or you don't have any positive dice left), that's a critical failure.

So, say you are rolling 4d6 in positive dice vs. 3d6 in negative dice. You get: (1, 4, 6, 6) vs. (2, 4, 6). The negative 6 cancels one of the positive ones, the negative 4 cancels the positive 4, and noting else cancels. You have a 1 and 6 left of your positive pool, so the higher number is the result (6).

It's a pretty simple system, but if anyone with more knowhow wants to try to figure out the system code, I'd be much obliged. If not, I'm glad I wrote all this out, as I can return to it as I puzzle through this myself. :)
Last edited November 29, 2023 4:15 am
Nov 29, 2023 7:51 am
You can easily color in the dice to highlight the different result types (6, 4-5, 1-3) in diffrent colors. But I can't think of any way that you could program the dice canceling each other out in the GP dice codes.
Nov 30, 2023 4:05 am
Bummer. I just tested it out, and it's easy enough to do "4d6, 3d6" and then do the cancelation mentally. I do note that auto sort is a thing -- it apparently auto-sorts the results into numerical order. That, at the very least, would make the cancelation easier to do. How would I use that rule and that rule alone?
Nov 30, 2023 7:32 am
{"background": {"image": ""},
"diceRules": [
    {"rolled":"d6","autoSort":true}
    ],
"characterSheetIntegration": {"gmSheets": []},
"diceDefaults": {}
}
Dec 3, 2023 11:58 pm
[ +- ] Free League's The One Ring RPG (2e)
Jan 20, 2024 3:39 am
Simple rules for the dice pool used in Mythiria.
[ +- ] Mythiria
Apr 21, 2024 6:08 pm
Hey, thanks for adding Lasers and Feelings as a selectable code. I made an improvement.

Laser numbers are blue. Feelings numbers are red. Laser-feelings is green! Laser-feelings counts as a success by normal rules, so that’s how I set it up.
[ +- ] Lasers & Feelings
[ +- ] Table for Character Sheets
Last edited May 1, 2024 8:30 pm
May 2, 2024 9:51 pm
Thanks to Chalrytharendir for troubleshooting.
[ +- ] Delta Green

You do not have permission to post in this thread.