Konfus-ius 0 Posted December 7, 2017 Fellow Tankers, after setting up my own xvm-configuration (based on the various great examples), one key ingredient is missing: Coloring of player names in the panels with name-dependend colors. I tried to define within colors.xc; // Dynamic color by prominent player "name": [ { "value": "Quickfingers", "color": "0xDD4444" }, { "value": "piskinas", "color": "0xDD4444" }, { "value": "SirFoch", "color": "0xDD4444" } ], and also tried some HEX-representation of the names. But unfortunately, no coloring happend. My question is: how to define the "values" in order to get a string-dependend coloring of player names. Is there any hope? Thanks for your support, Konfus-ius Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #414229 Posted December 7, 2017 You can look through this thread to see how I assigned icons to players using XVM: https://koreanrandom.com/forum/topic/39687-help-with-definitions/ It is possible to use a similar method for colouring names, but I'm away from my PC for the next few days so maybe someone else from that thread will come along and help you too. :) Quote Share this post Link to post Short link Share on other sites
kupjones 30 #414232 Posted December 8, 2017 One way to do it: create new file "nick.xc" with the contents that define nickname alternative formatting /** * This file is used to change players names in players panels to multi colored formats */ { "nick": { // Changing the names of nicknames for the macro {{.nick.name.{{name}}}}. "name": { "kupjones": "<font face='gunplay'>KupJones</font>", // "kupjones": "<font face='gunplay'><font color='#FE7903'>K</font><font color='#F8F400'>U</font><font color='#D042F3'>P</font><font color='#02C9B3'>J</font><font color='#60FF00'>O</font><font color='#FE0E00'>N</font><font color='#FE7903'>E</font><font color='#F8F400'>S</font></font>", "sailorboy7982": "<font face='gunplay'>Sailorboy</font>", "playersname": ${"nick.name."} }, // color your clan nick {{.nick.clan.{{clan}}}}. "clan": { "[SOGG]": "<font face='$TitleFont' color='#02C9B3'>[TEST]</font>" } } } Add to "xvm.xc" boot file //create new nicknames "nick": ${"nick.xc":"nick"}, 1 Quote Share this post Link to post Short link Share on other sites
SmashPuppet 72 #414233 Posted December 8, 2017 (edited) 5 hours ago, Konfus-ius said: Fellow Tankers, after setting up my own xvm-configuration (based on the various great examples), one key ingredient is missing: Coloring of player names in the panels with name-dependend colors. I tried to define within colors.xc; // Dynamic color by prominent player "name": [ { "value": "Quickfingers", "color": "0xDD4444" }, { "value": "piskinas", "color": "0xDD4444" }, { "value": "SirFoch", "color": "0xDD4444" } ], Untested... but should work. Like this in colors.xc // Dynamic color by prominent player "name": { "Quickfingers": "#DD4444", // or 0xDD4444 etc depending on what you are doing. HTML doesn't care too much for hex. "piskinas": "#DD4444", "SirFoch": "#DD4444" }, And then you would call it like this if using HTML like you might in the PlayersPanel <font color='{{.colors.name.{{name}}|{{c:wn8}}}}'>{{name}}</font> //Assuming you put "name" under "colors" in colors.xc The |{{c:wn8}} is something to color any name that doesn't match your list. You can use whatever you want... I also use the above mentioned nick.xc file. It works the same way as I just described. Cheers! Edited December 8, 2017 by SmashPuppet addition Quote Share this post Link to post Short link Share on other sites
Konfus-ius 0 #421756 Posted February 20, 2018 Thanks SmashPuppet, this exactly solved it. Great. Had for the meantime some issues with color definition (0x... vs #...). Thanks for the support, Konfus-ius Quote Share this post Link to post Short link Share on other sites