PDA

View Full Version : Color codes for damage dice...



TheoGeek
August 8th, 2019, 05:15
May be a dumb question, but I'm not above asking dumb questions. :)

In my Improved Critical extension, I account for damage dice, critical dice, and effect dice. In the code, those are denoted by "d", "g", and "p" respectively and are reflected in the color of the rolled damage die in the chat window - for example, critical dice are colored green, and effect dice are colored purple.

So, given that, the code that calculates damage looks for the following: "[dDrRgGbBpP]"

Does anyone know what the "r" and "b" colored die represent?

I'd like to know if I need to handle them in my extension.

Thanks!

LordEntrails
August 8th, 2019, 05:21
Rhythm & Blues?

TheoGeek
August 8th, 2019, 05:23
HA! So you're saying that it's Bardic damage? :)

Moon Wizard
August 8th, 2019, 07:51
There are red/blue/green/purple die icon assets defined, which are represented by r#/b#/g#/p#. They are used for game penalties (red), game bonuses (green), effect modifications (purple), and other (blue) (can't remember off top of my head which rules use this).

Regards,
JPG

TheoGeek
August 8th, 2019, 21:24
Thanks Moon!

I wonder what unintended side effects my extension has since it assumes that all green dice are critical (if the CRITICAL tag is present), and it doesn't account for red or blue die at all.

Dtoad
August 8th, 2019, 22:22
Hmm, would it be possible to color the effects tags in the combat tracker? As in AC:1 AC:-1 DMG:1d6 ect?

TheoGeek
August 8th, 2019, 23:10
I don't think that would address what I'm looking at. The structure that my code looks at is constructed like this (example is a half-orc barbarian/rogue sneak attack critting with a greatsword...

{ s'bWeapon' = s'', s'bCritical' = s'', s'range' = s'M', s'sDesc' = s'[DAMAGE (M)] Greatsword [EFFECTS 1d6] [CRITICAL] [TYPE: slashing (2d6+4)(strength)(1)()] [TYPE: slashing (1d6)()(1)()] [TYPE: slashing,critical (3d6)()(1)()] [TYPE: slashing,critical (1d6)()(1)()]', s'clauses' = s'', s'nMod' = #4, s'sType' = s'damage', s'bSecret' = bFALSE, s'aDice' = { #1 = { s'result' = #5, s'type' = s'd6' }, #2 = { s'result' = #3, s'type' = s'd6' }, #3 = { s'result' = #5, s'type' = s'g6' }, #4 = { s'result' = #2, s'type' = s'g6' }, #5 = { s'result' = #3, s'type' = s'g6' }, #6 = { s'result' = #2, s'type' = s'p6' }, #7 = { s'result' = #1, s'type' = s'g6' } } }

it's a lot of info, but notice how the dice are coded:

... the normal damage dice (#1, #2) are coded with a "d" ("d6")
... the next damage dice (critical damage: #3, #4, #5) are coded with a "g" ("g6") (#3 and #4 are the normal critical die, #5 is from the savage attack)
... the next damage die (effect damage: #6) is from the sneak attack and is coded with a "p" ("p6")
... the last damage die (critical damage: #7) is the critical damage from the sneak attack damage die and is coded with a "g" ("g6")

As you can see, as soon as the dice are coded, the green die lose the association with the critical.

This is why I inserted my extension so far down the chain, I wanted Fantasy Grounds to compute and roll of the necessary damage dice and so I could add my extension in a place that is completely independent of anything else going on.

But, if there are other bonus dice (i.e. other green dice), they will be affected by my extension as well (dependent on what options you have selected.) This may be OK since FG has already determined all of the dice to be rolled because of the critical by the time it gets to my extension.