STAR TREK 2d20
  1. #1

    Color codes for damage dice...

    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!

  2. #2
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,242
    Blog Entries
    9
    Rhythm & Blues?

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  3. #3
    HA! So you're saying that it's Bardic damage?

  4. #4
    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

  5. #5
    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.

  6. #6
    Hmm, would it be possible to color the effects tags in the combat tracker? As in AC:1 AC:-1 DMG:1d6 ect?

  7. #7
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in