Heliomalt 53 Posted July 23, 2018 Has someone a working config example for this two macos? Does this mean that an icon is displayed or the name is colored? Thanks for your help Quote Share this post Link to post Short link Share on other sites
Ress 21 #436937 Posted July 23, 2018 @Heliomalt Personally i never used {{friend}}, {{ignored}}, {{muted}} or {{chatban}}. Not sure if return is 1|0, yes|no or just friend|nothing. But my guess is they all work similar to {{ally}} & {{squad}} So In "theory" you should be able to do: -as color <font color='{{friend?#yes|#no}}'>{{name}},{{vehicle}}.... -as image <img src='cfg:default//icons/{{friend?ImageName}}.png'> -something else <font alpha='{{ignored?0|100}}'>{{name}}</font> {{ignored?IGNORED|{{name}}}} Also not sure if you will be able to preview it on replays or must be on live game. Not all macros work on replays. 1 Quote Share this post Link to post Short link Share on other sites
konrad509 445 #436939 Posted July 23, 2018 1 hour ago, Ress said: Not sure if return is 1|0, yes|no or just friend|nothing. friend|nothing The macros should work in replays too. At least {{ingored}} does. 1 Quote Share this post Link to post Short link Share on other sites
Heliomalt 53 #436972 Posted July 24, 2018 (edited) Can you please post your solution/code for the ignored. Tried different ways, can't get it working. Thank you. Edited July 24, 2018 by Heliomalt Quote Share this post Link to post Short link Share on other sites
Ress 21 #436980 Posted July 24, 2018 @Heliomalt {{ignored?IGNORED|{{friend?FRIEND|}}}} {{ignored?#ignored_color|{{friend?#friend_color|#otherwise_color}}}} {{ignored?ImageName|{{friend?ImageName|}}}} Yesterday in game tested all 4 ({{friend}}{{ignored}}{{muted}}{{chatban}}), blocked someone random and shows as ignored and muted. Quote Share this post Link to post Short link Share on other sites
elektrosmoker 5 #437099 Posted July 27, 2018 (edited) hello, i´m new to xvm editing and have a question related to the markers: if i want a friendmarker on my playerspanel, do i have to enter it somewhere in this rows? "nickFormatLeft": "<font face='mono' size='{{xvm-stat?13|0}}' color='{{c:r}}' alpha='{{alive?#FF|#80}}'>{{r}}</font> {{name%.15s~..}}<font alpha='#A0'>{{clan}}</font>", "nickFormatRight": "<font alpha='#A0'>{{clan}}</font>{{name%.15s~..}} <font face='mono' size='{{xvm-stat?13|0}}' color='{{c:r}}' alpha='{{alive?#FF|#80}}'>{{r}}</font>", and paste something like this: <font color='{{friend?#AAAAAA|#BBBBBB}}>{{nick}}</font> or this: {{friend?<img src='cfg://xxx/xxx/friend.png'>}} i would be very greatful if someone can help me out and may provide me a working sample! thx in advance Edited July 27, 2018 by elektrosmoker Quote Share this post Link to post Short link Share on other sites
Ress 21 #437100 Posted July 27, 2018 @elektrosmoker Well if you only wanna colorize name and not clan tag use {{friend}} color on {{name}}, also if you only wanna colorize IF FRIEND then add only first color {{friend?#AAAAAA}}. <font color='{{friend?#AAAAAA|}}'>{{{name%.15s~..}}</font> But if you wanna use {{nick}} macro no point having {{clan}} part: "nickFormatLeft": "<font face='mono' size='{{xvm-stat?13|0}}' color='{{c:r}}' alpha='{{alive?#FF|#80}}'>{{r}}</font> <font color='{{friend?#AAAAAA|}}'>{{{nick}}</font>", 1 Quote Share this post Link to post Short link Share on other sites
elektrosmoker 5 #437109 Posted July 27, 2018 (edited) thank you for your quick answer! as i said, i´m new in xvm, coding isnt my profession ;) but i will try that out! and if i want to add a picture for that instead of colorizing the name, will that following do the trick? "{{friend?<img src='cfg://res_mods/mods/shared_resources/xvm/res/clanicons/EU/friend.png'>|<img src='cfg://res_mods/mods/shared_resources/xvm/res/clanicons/EU/nofriend.png'>}}" if added to (e.g.) this lines (showing only vehicle name right now) "vehicleFormatLeft": "<font color='{{c:r}}' alpha='{{alive?#FF|#80}}'>{{vehicle}}</font>", "vehicleFormatRight": "<font color='{{c:r}}' alpha='{{alive?#FF|#80}}'>{{vehicle}}</font>", or did i just mess it all up? edited: "vehicleFormatLeft": "{{friend?<img src='cfg://res_mods/mods/shared_resources/xvm/res/clanicons/EU/friend.png'>|<img src='cfg://res_mods/mods/shared_resources/xvm/res/clanicons/EU/nofriend.png'>}}<font color='{{c:r}}' alpha='{{alive?#FF|#80}}'>{{vehicle}}</font>", "vehicleFormatRight": "<font color='{{c:r}}' alpha='{{alive?#FF|#80}}'>{{vehicle}}</font>{{friend?<img src='cfg://res_mods/mods/shared_resources/xvm/res/clanicons/EU/friend.png'>|<img src='cfg://res_mods/mods/shared_resources/xvm/res/clanicons/EU/nofriend.png'>}}", i also tried this one: "vehicleFormatLeft": "<img src='cfg:default//icons/{{friend?friend}}.png'><font color='{{c:r}}' alpha='{{alive?#FF|#80}}'>{{vehicle}}</font>", "vehicleFormatRight": "<font color='{{c:r}}' alpha='{{alive?#FF|#80}}'>{{vehicle}}</font><img src='cfg:default//icons/{{friend?friend}}.png'>", what i want to do is only adding the friend/nofriend picture to the config, not changing anything else if possible. this is my players panel, but i cant get the changes to work playersPanel.xc if possible, can you give me another hint please? Edited July 27, 2018 by elektrosmoker Quote Share this post Link to post Short link Share on other sites
Ress 21 #437122 Posted July 27, 2018 (edited) "vehicleFormatLeft": "{{friend?<img src='cfg://res_mods/mods/shared_resources/xvm/res/clanicons/EU/friend.png'> First of, that is kinda strange path to look for image, you are calling for image from inside config folder "res_mods"? If you have image inside config folder use: <img src='cfg://config_folder/whatever_folder/imagename.png'> if you have image inside xvm resources(res) folder use: <img src='xvm://res/whatever_folder/imagename.png'> or if you wanna use image from game files (example:res/packages/gui) use: <img src='img://gui/maps/icons/whatever_folder/imagename.png'> Simple way create/find 2 png images name them friend.png and nofriend.png create icons folder inside your config folder (default for example) and add this to vehicle formats: <img src='cfg://default/icons/{{friend?friend|nofriend}}.png'> It should work in game, on replays don't think so. Make sure to double check naming, image path, and macros. Missing { " ' , < or space are common errors. Also if needed after .png' you can add width='XX' height='XX' vspace='XX'> (sometimes image have to be shift up/down using vspace to align with text or you might not see text at all) EDIT: You can still test images width, height, vspace on replays by using different macro, for example {{alive}} Once you are done fine tuning image replace alive with friend <img src='cfg://default/icons/{{alive?friend|nofriend}}.png' width='24' height='24' vspace='-12'> Edited July 27, 2018 by Ress 1 Quote Share this post Link to post Short link Share on other sites
elektrosmoker 5 #437124 Posted July 27, 2018 wow, thats a service! i´m impressed again of the quick reactions to my post and about this very good "manual"! just in case nobody else does - BIG THX !! i will trial and error it out to get it to work, thanks again! Quote Share this post Link to post Short link Share on other sites
Heliomalt 53 #437151 Posted July 27, 2018 (edited) This is my solution in the playersPanel.xc add this in the def section (I don't use an icon for nofriend) // Friend icon. "friend": { "enabled": true, //"hotKeyCode": 56, "onHold": "true", "visibleOnHotKey": true, "x": 70, "y": 5, "width": 12, "height": 18, "align": "center", "alpha": 100, "bindToIcon": false, "src": "xvm://res/icons/friend/{{friend?friend}}.png" }, // Ignored icon. "ignored": { "enabled": true, //"hotKeyCode": 56, "onHold": "true", "visibleOnHotKey": true, "x": 70, "y": 5, "width": 14, "height": 14, "align": "center", "alpha": 100, "bindToIcon": false, "src": "img://gui/maps/icons/library/{{ignored?marker_blocked}}.png" } this in the extraFields Left and Right in each panel, if you like it, I use it only at the large panel ${"def.friend"}, ${"def.ignored"} Hope this help you. Edit: I have this little problem, if a player is on my ignore list, I see also the standard icon from WG. How to remove/resolve this problem? Edited July 27, 2018 by Heliomalt Quote Share this post Link to post Short link Share on other sites
elektrosmoker 5 #437158 Posted July 27, 2018 another big thx goes out to heliomalt! ;) I just got one problem: before i wanted to make a patchfile that implements the code into playerspanel.xc, i tested it by doing it manually. after starting wot, it seems that the backup/standard-xvm-config was loaded - my whole config was gone. this happened to me sometimes when i saved a configfile with wrong character encoding (ansi/utf), or false textformatting, but i can exclude both ( #1 checked that, #2 the code is yours ;) ) ... and it also happens when i want to create any new entry in the def-section. you may have a clue what i´ve done wrong this time? if not - no problem! thx anyways for poviding the code! Quote Share this post Link to post Short link Share on other sites
konrad509 445 #437160 Posted July 27, 2018 There's most likely some syntax error. You should see the info about the error during battle loading. You can also find that info in the xvm.log file. If you can't solve it by yourself, just attach your playersPanel.xc file. Quote Share this post Link to post Short link Share on other sites
elektrosmoker 5 #437167 Posted July 27, 2018 @konrad509 found the error in xvm.log. there was a hidden \ufeff character that caused that (maybe forum copy/paste problem). now it works just fine! great, thank you again! all 3 of you! Quote Share this post Link to post Short link Share on other sites
Ress 21 #437170 Posted July 27, 2018 (edited) Yep copy/paste from post or inside spoiler can create hidden \ufeff characters. You always wanna paste inside code and then check for red squares and delete them. Otherwise you will have hard time running over config and finding each hidden character. hint:You can simply copy from post (if not inside <Code>), start Reply and paste inside code and check for red squares. Edited July 27, 2018 by Ress 1 Quote Share this post Link to post Short link Share on other sites
elektrosmoker 5 #437207 Posted July 28, 2018 (edited) edited: done! Edited July 28, 2018 by elektrosmoker Quote Share this post Link to post Short link Share on other sites
Ress 21 #437209 Posted July 28, 2018 (edited) Well you need to use "<img src=' '>" when typing inside a "format": but if you wanna use image as/inside extra field you don't need that part, only "src": " " (You can look inside default carouselNormal.xc for example with extra field images) I am little bit confused what you are exactly trying to do here... But my guess is you do need "<img src=' '>" as well. (unless you are removing "format": part) You are replacing/adding inside "format": , right? ps.its already 01:05 here, my brain is slow, maybe i miss read your entire post, sorry in advance. EDIT: i better go night-night maybe someone awake can help... Edited July 28, 2018 by Ress Quote Share this post Link to post Short link Share on other sites
elektrosmoker 5 #437211 Posted July 28, 2018 @Ress i figured it out! it was only a little less thinking and a typo and yes, it´s now 1:35, so i´m a little out of brain today too... ;) gn8! Quote Share this post Link to post Short link Share on other sites