Jump to content
Korean Random
Sign in to follow this  
seth_321

{{v.c_damageRating}} | How do I edit the color rating to this?

Recommended Posts

(I use XCPad for my edits)

 

Right now, I am using this code:

 

"extraFields": [
      { "x": 38, "y": -3, "format": "<img src='img://gui/maps/icons/library/proficiency/class_icons_{{v.mastery}}.png' width='22' height='22'> " },
      { "x": -1, "y": 13, "format": "<font color='{{v.c_wn8effd}}'>{{v.tdb%4.3i}}</font> <font color='#7FFF2A'> / {{v.wn8expd%4.3i}}(EXPCTD)</font> " },
      { "x": -1, "y": 27, "format": "<font color='{{v.c_damageRating}}'>{{v.damageRating%4.2i|--}}% DMG</font> " }
    ]

 

This code works and everything is displayed correctly. However, I would like to edit the macro {{v.c_damageRating}}. I looked in colors.XC and couldn't find it. The color range is way to broad... I have one tank at 85% and the color is yellow. I would like to change this to this setup:

 

Value =   0 - 40 / RED

Value = 41 - 50 / ORANGE

Value = 51 - 64 / YELLOW

Value = 65 - 84 / GREEN

Value = 85 - 94 / BLUE

Value = 95+ / PURPLE

 

Can I a create/reference to colors in the carousel.xc file? How would I go about editing/changing this? If you can help me out, please and thank you!

 

-Seth

Share this post


Link to post

Short link
Share on other sites

This code works and everything is displayed correctly. However, I would like to edit the macro {{v.c_damageRating}}. I looked in colors.XC and couldn't find it.

 

Check colors.xc in default config folder

// Dynamic color by damage rating (percents for marks on gun)
    // Динамический цвет по рейтингу урона (процент для отметок на стволе)
    "damageRating": [
      { "value": 20,    "color": ${"def.colorRating.very_bad" } },  // 20% of players
      { "value": 60,    "color": ${"def.colorRating.bad"      } },  // better then 20% of players
      { "value": 90,    "color": ${"def.colorRating.normal"   } },  // better then 60% of players
      { "value": 99,    "color": ${"def.colorRating.good"     } },  // better then 90% of players
      { "value": 99.9,  "color": ${"def.colorRating.very_good"} },  // better then 99% of players
      { "value": 101,   "color": ${"def.colorRating.unique"   } }   // better then 99.9% of players
    ],

you may add this to your config if there is no rating section in it

Share this post


Link to post

Short link
Share on other sites

vlad_cs_sr,

 

     Cheers! I did find it in the new XVM (6.0.2) but ended up just placing the code in colors.xc on the xvm I am running and it worked perfect! I was able to make the edits I liked and now it looks much better!

 

Thank you again for your quick response! :)

 

-Seth

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...