scyorkie 50 Posted June 4, 2017 I generally understand how to create definitions. See: https://koreanrandom.com/forum/topic/37932-is-it-possible-to-consolidate-items-in-markers-files/ But I need help with something specific. I have a PP extraField that goes like this: "format": "<font color='#D3D3D3'><font color='{{player?{{c:wn8}}|{{wn8>899?{{c:wn8}}|{{wn8<300?{{c:wn8}}|#D3D3D3}}}}}}'>{{name%.10s~..}}</font></font>" The entire blue part can go into a definition section under "WN8name", and that entire line above can be changed to: "format": ${"def.WN8name"} However, what if I only want to create a definition for the orange part? "format": "<font color='#D3D3D3'><font color='{{player?{{c:wn8}}|{{wn8>899?{{c:wn8}}|{{wn8<300?{{c:wn8}}|#D3D3D3}}}}}}'>{{name%.10s~..}}</font></font>" Is it possible? I've tried some permutations of the usual way of making definitions and they didn't work. Quote Share this post Link to post Short link Share on other sites
Kapany3uk 948 #393775 Posted June 5, 2017 However, what if I only want to create a definition for the orange part? use {{.}} macro for example: - create a new file or section (may be use existing) with your own macros (named "my" or how you want) with this: "my": { "wn8color": "{{player?{{c:wn8}}|{{wn8>899?{{c:wn8}}|{{wn8<300?{{c:wn8}}|#D3D3D3}}}}}}" } - in @xvm.xc write reference to this new file/section - in config use written macro: "format": "<font color='#D3D3D3'><font color='{{.my.wn8color}}'>{{name%.10s~..}}</font></font>" ps. read more and see example Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #393778 Posted June 5, 2017 (edited) [ 1 ] I created a "def" section at the top of the PP file: "def": { "wn8color": "{{player?{{c:wn8}}|{{wn8>899?{{c:wn8}}|{{wn8<300?{{c:wn8}}|#D3D3D3}}}}}}" } What doesn't work: i. <font color='{{.def.wn8color}}'> doesn't work. I don't think it can ever work, based on sirmax's explanation here. ii. <font color='{{.playersPanel.def.wn8color}}'> doesn't work. I think this is because @xvm.xc points ".playersPanel" past the "def" section and directly to the "playersPanel" section in the middle of the file. What works: a. <font color='{{.playersPanel.def.wn8color}}'> will work if "def" is created in playersPanel.xc > playersPanel section. b. <font color='{{.texts.def.wn8color}}'> works if "def" is created under texts.xc > texts. c. Creating "def" in a new .xc file and referencing that in @xvm.xc works but I prefer not to, because I always overwrite that when I update XVM. d. Creating "def" in a new .xc file and referencing that in playersPanel.xc only works if the reference is made in playersPanel.xc > playersPanel section. That new file is "inserted" into playersPanel.xc at the point of reference, and becomes part of it. The syntax is similar to method (a) above. However, the problem with the 4 methods above is that changes made to this "def" section are not reflected by "autoReloadConfig" function. By comparison, if I use the general definition method ("format": ${"def.WN8name"}) for the entire "format" field, changes will be reflected by "autoReloadConfig". Any fix for this? ----- ----- ----- ----- ----- ----- ----- ----- [ 2 ] I also looked at your example that you linked, and cannot understand this part in blue (comments translated with Google): // macro to add to your game nick in his own name {{._my._i.{{name}}}}"_i": { "Duv21": " *Илья", "Duv21_RU": " *Илья" },// macro to insert player name {{._my._name}}"_name": "<font color='{{clannb=VO_SP?#FFCC66|{{player?#FFB964}}}}'>{{clan?{{name%.14s~..}}|{{name}}}}{{._my._i.{{name}}}}</font>", I can see that it is to add " *Илья" behind player name, if player is Duv21 (or Duv21_RU). But how do the "_i" definition and the {{._my._i.{{name}}}} macro work exactly? I've not seen a similar example in these forums before. ----- ----- ----- ----- ----- ----- ----- ----- [ 3 ] The use of <textformat> in your statisticForm relates to this other question I had here. If I follow your example, using: "formatLeftNick": "<textformat leading='-15'><font size='12' color='#555555'>{{clannb}}</font>\n</textformat><textformat leftMargin='39'><font size='12'>{{name}}</font></textformat>","formatRightNick": "<textformat leading='-15'><font size='12' color='#555555'>{{clannb}}</font>\n</textformat><textformat rightMargin='39'><font size='12'>{{name}}</font></textformat>", I can achieve this: http://i.imgur.com/yvDEhNZ.jpg However, how do I (without using monospace fonts) make allies' clan names alight to the right so that they are nearer to player names (like so: http://i.imgur.com/mDzsoI4.jpg), and enemy clan names similarly align to the left? Edited June 5, 2017 by scyorkie Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #393993 Posted June 6, 2017 Made many updates to my post #3 above. use {{.}} macro ... ps. read more and see example Please see my post #3. I am ready to receive your wisdom! :) Quote Share this post Link to post Short link Share on other sites
konrad509 445 #394052 Posted June 6, 2017 2. The macro {{._my._i.{{name}}}} returns the value that corresponds to the key/parameter(or whatever you call it) in the section _my->_i, that is equal to the value returned by the {{name}} macro. Quote Share this post Link to post Short link Share on other sites
Kapany3uk 948 #394108 Posted June 6, 2017 (edited) del Edited June 6, 2017 by Kapany3uk Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #394368 Posted June 8, 2017 (edited) 2. The macro {{._my._i.{{name}}}} returns the value that corresponds to the key/parameter(or whatever you call it) in the section _my->_i, that is equal to the value returned by the {{name}} macro. This is very interesting and actually helps with a question I've been thinking of asking for a long time. The default way of assigning icons to players is by using the res\clanicons\[server]\nick folder. With the {{.}} macro, there are more options: Option 1: - Set a definition in PP to display an image, with the "format" field as follows: "format": "{{.texts.nameicons.{{name}}}}" - Then texts.xc > nameicons, set "playername": "<img src='xvm://res/icons/friend.png'>" - With a single definition, you can set different icons for different players (limited to 1 icon per player) Option 2: - Set a definition in PP to display an image, with the "alpha" field as follows: "alpha": "{{.texts.icons.friends.{{name}}|0}}" - Then texts.xc > icons > friends, set "playername": "100" - Using this method, you can set multiple icons per player, but you also require multiple definitions in PP and multiple sections in texts.xc Are there other methods that I don't know about? Is there one way to just poll names from a list without having to also pair a value (whether alpha, or path to image) to a player name? This would make for easier maintenance. Edited June 9, 2017 by scyorkie Quote Share this post Link to post Short link Share on other sites
konrad509 445 #394370 Posted June 8, 2017 Is there one way to just poll names from a list without having to also pair a value (whether alpha, or path to image) to a player name? This would make for easier maintenance. Hm, I'm not sure what you mean. Could you give some example? Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #394374 Posted June 8, 2017 Hm, I'm not sure what you mean. Could you give some example? Let's say I use Option 2, my texts.xc > icons > friends section would look something like this: "friends": { "friend1": "100", "friend2": "100", "friend3": "100", ... } Is there some way I can make it look like this: "friends": { "friend1", "friend2", "friend3", ... } i.e. remove "100" value for alpha, thus making the list simpler. Quote Share this post Link to post Short link Share on other sites
konrad509 445 #394390 Posted June 9, 2017 Ah, I thought about it once as well. I guess it's not possible though. There always has to be a key and the corresponding value. Maybe something can be done using Python macros. Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #394391 Posted June 9, 2017 Do let me know if you come up with something! In the meantime, the new options make it easier to change the icons all at once without having to rename multiple files. Quote Share this post Link to post Short link Share on other sites
Kapany3uk 948 #394437 Posted June 9, 2017 @scyorkie, use the "white" list. Right in the hangar in XVM-comments add the link to the icon or label ("friend", for example) and in battle in the pp/markers will display the nick of the player + defined icon/label. It is still in your version I'll have to remember all the nicknames and edit the config, it's easier to do it right in the hangar. And then you can remove a player from your contacts - icon will still be visible. Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #394439 Posted June 9, 2017 Mm OK I'll try it after WGNA fixes the bugged contact list. I've not been able to use my contact list for weeks. Quote Share this post Link to post Short link Share on other sites
Kapany3uk 948 #394445 Posted June 9, 2017 I'll try it after WGNA fixes the bugged contact list it was not about WG notes the contact's name, and XVM comments Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #394455 Posted June 9, 2017 Hmm but you need to click on the names in your contact list, right? This is mine right now: http://i.imgur.com/tltBunO.jpg Quote Share this post Link to post Short link Share on other sites
Kapany3uk 948 #394457 Posted June 9, 2017 @scyorkie, I don't know what problem you have, in the EU client everything is fine Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #394458 Posted June 9, 2017 Yeah it's a NA problem. They say they were doing maintenance for the contact list, and many people were negatively affected. Not fixed for weeks. Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #394670 Posted June 10, 2017 With the {{.}} macro, there are more options: ... Option 2: - Set a definition in PP to display an image, with the "alpha" field as follows: "alpha": "{{.texts.icons.friends.{{name}}|0}}" - Then texts.xc > icons > friends, set "playername": "100" - Using this method, you can set multiple icons per player, but you also require multiple definitions in PP and multiple sections in texts.xc Are there other methods that I don't know about? Is there one way to just poll names from a list without having to also pair a value (whether alpha, or path to image) to a player name? This would make for easier maintenance. Just to return to this for a bit -- if I use Option 2 and set my "alpha" as follows: "alpha": "{{.texts.icons.friends.{{name}}?100|0}}" That part in bold becomes the "master control" for alpha. So it doesn't matter if in texts.xc > icons > friends, you set "playername": "" (ie no value) but you still need the : "" to be there. Quote Share this post Link to post Short link Share on other sites
sirmax 5,499 #394842 Posted June 11, 2017 Yeah it's a NA problem. They say they were doing maintenance for the contact list, and many people were negatively affected. Not fixed for weeks. All is ok on NA, as I can see. Can you attach log files after opening contacts list? Quote Share this post Link to post Short link Share on other sites
scyorkie 50 #394846 Posted June 11, 2017 Logs attached. FYI the contact list issue persists even in vanilla client. Here is a post on the NA forums which includes ticket responses from WG that confirm that it's a problem on WG's end: http://forum.worldoftanks.com/index.php?/topic/545615-cannot-connect-to-chat-server-no-friends-lists/page__pid__11041553#entry11041553 python.log xvm.log Quote Share this post Link to post Short link Share on other sites