Jump to content
Korean Random
Sign in to follow this  
Colmillo206

I wanna coloring rating mark with VWTR, How I do it?

Recommended Posts

How I put color based in VWTR? I tried editing color.xc, but after edit it shows gray, and if I take another color scale, and modified it for vwtr... it shows colors based on the not modified scale...

Share this post


Link to post

Short link
Share on other sites

Is the wtr per vehicle...

If I edit the color.xc, delete // from:

// Custom dynamic colors by ratings.
    // If you want use your own color scales,
    // uncomment this block and replace "rating_name" to one of this values: "eff", "wn8", "wtr", "wgr"
    // Динамический цвет по указанному рейтингу.
    // Если вы хотите использовать свои собственные границы цветов вместо стандартных,
    // раскомментируйте блок и замените "rating_name" на одно из следующих значений: "eff", "wn8", "wtr", "wgr"
    //"rating_name": [
    //  { "value": 500,  "color": ${"def.colorRating.very_bad" } }, //    0 - 500   - very bad
    //  { "value": 1000,  "color": ${"def.colorRating.bad"      } }, //  501 - 1000  - bad
    //  { "value": 2000,  "color": ${"def.colorRating.normal"   } }, // 1001 - 2000  - normal
    //  { "value": 3000,  "color": ${"def.colorRating.good"     } }, // 2001 - 3000  - good
    //  { "value": 5000,  "color": ${"def.colorRating.very_good"} }, // 3001 - 5000  - very good
    //  { "value": 99999, "color": ${"def.colorRating.unique"   } }  // 5001 - 99999 - unique
    //],

 

And replace it with:

"vwtr": [
      { "value": 2718,  "color": ${"def.colorRating.very_bad" } },
      { "value": 4334,  "color": ${"def.colorRating.bad"      } },
      { "value": 6180,  "color": ${"def.colorRating.normal"   } },
      { "value": 8179, "color": ${"def.colorRating.good"      } },
      { "value": 9564, "color": ${"def.colorRating.very_good" } },
      { "value": 99999, "color": ${"def.colorRating.unique"   } }
    ],

 

It shows in gray all marks.

 

If I take and replace another color definition like tdb:

"tdb": [
      { "value": 499,  "color": ${"def.colorRating.very_bad" } },
      { "value": 749,  "color": ${"def.colorRating.bad"      } },
      { "value": 999,  "color": ${"def.colorRating.normal"   } },
      { "value": 1799, "color": ${"def.colorRating.good"     } },
      { "value": 2499, "color": ${"def.colorRating.very_good"} },
      { "value": 9999, "color": ${"def.colorRating.unique"   } }
    ],

And replace it with:

"tdb": [
      { "value": 2718,  "color": ${"def.colorRating.very_bad" } },
      { "value": 4334,  "color": ${"def.colorRating.bad"      } },
      { "value": 6180,  "color": ${"def.colorRating.normal"   } },
      { "value": 8179, "color": ${"def.colorRating.good"      } },
      { "value": 9564, "color": ${"def.colorRating.very_good" } },
      { "value": 99999, "color": ${"def.colorRating.unique"   } }
    ],

All tank marks shows in red...

A tank with 1280 vwtr shows in red (thats correct), but a tank with 4030 vwtr shows in red too.

 

What Im missing?

Edited by Colmillo206

Share this post


Link to post

Short link
Share on other sites

1.Where are you trying to colorize? PP, markers, hangar?
2.Did you try using {{py:xvm.color_rating(r, v)}} ?

example:

<font color='#{{py:xvm.color_rating('vwtr', {{vwtr}})}}'>{{vwtr}}</font>

 

Share this post


Link to post

Short link
Share on other sites

I'm trying to colorize rating mark (left hp bar)... where before "color": "{{c:r|#999999}}" was, I change it for "color": "{{c:vwtr|#999999}}"

 

I need to change this? "color": "{{py:xvm.color_rating('vwtr',{{vwtr}})|#999999}}",

Edited by Colmillo206

Share this post


Link to post

Short link
Share on other sites

You mean little square on hp bar on markers?
You can add that or colorize it inside "format" (both options should work)
default is "format": "&#x115;" right?
just add font color to it (should work):

"format": "<font color='{{py:xvm.color_rating('vwtr', {{vwtr}})}}'>&#x115;</font>"


btw {{c:vwtr|#999999}} doesn't work, no such macro as {{c:vwtr}}, only {{c:xvwtr}}

in general If you wanna use custom colors:
1. you have to add it to colors.xc (named vwtr in this case)
2. link it using {{py:xvm.color_rating(r, v)}}
r=name for color rating from colors.xc  (vwtr in this case)
v=value (this can be anything..even some py math, as long as you get some value at the end to colorize base on r color scale)

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