Colmillo206 0 Posted August 12, 2018 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... Quote Share this post Link to post Short link Share on other sites
konrad509 445 #437992 Posted August 12, 2018 And what is the VWTR rating? Quote Share this post Link to post Short link Share on other sites
Colmillo206 0 #437996 Posted August 12, 2018 (edited) 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 August 12, 2018 by Colmillo206 Quote Share this post Link to post Short link Share on other sites
Ress 21 #437998 Posted August 12, 2018 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> Quote Share this post Link to post Short link Share on other sites
Colmillo206 0 #438002 Posted August 12, 2018 (edited) 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 August 12, 2018 by Colmillo206 Quote Share this post Link to post Short link Share on other sites
Ress 21 #438003 Posted August 12, 2018 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": "ĕ" right? just add font color to it (should work): "format": "<font color='{{py:xvm.color_rating('vwtr', {{vwtr}})}}'>ĕ</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) Quote Share this post Link to post Short link Share on other sites