Jump to content
Korean Random
gryphen

Adding XVM Country (Language) Flags into playerspanel.xc

Recommended Posts

Hi Everybody,

 

I created a thread at https://koreanrandom.com/forum/topic/41166-adding-xvm-country-language-flags-into-playerspanelxc/but it was pointed out to me that there was this English speaking section of the forum, so I will recreate the thread here.

 

(If an Admin wants to remove the other that would be good)

 

I am new to WoT, and enjoy using XVM, I have started using J1mB0's XVM config, which is nice and compact for me, but as I play on the ASIA server I'd like to add the Country/Nation Flags back into the playerspanel.xc for all the size panels.

I would find it helpful to know where a person is from, actually the language they use, when someone wants to squad up, as a few times I have been in a squad and the person is speaking another language and we are unable to communicate effectively.

Is anyone able to assist me?

I have searched online for a couple of days, and I think I ma now more confused than I was before about it.

 

playersPanel.xc

 

I'd like to see the flags there all during gameplay, so Short, Medium, Medium2 and Large :) I currently can see the flags when I press TAB during the game.

 

If anyone knows the script I need to add (and advise where to add it) to the PlayersPanel.xc that would be greatly appreciated.

 

 

Share this post


Link to post

Short link
Share on other sites

The relevant macro is {{flag}} and there are flag icons in \res_mods\mods\shared_resources\xvm\res\icons\flags

 

Example definition you can create in playersPanel.xc:

 

"flagIcon": {
"enabled": true, "bindToIcon": true,
"x": 140, "y": 4, "align": "center",
"format": "<img src='xvm://res/icons/flags/{{flag}}.png'>",
"alpha": 90

},

 

If you want to use it to only highlight other players from your country, you can change "alpha" to:

 

"alpha": "{{flag=SG?{{player?0|90}}|0}}"

 

(SG = Singapore, where I'm from, and note that it must be capitalized)

Edited by scyorkie
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Thankyou  Scyorkie :)

 

to add this to playerspanel.xc I add it in the begining as a defintion and then reference it under each of the small/medium/medium2/large, is that correct?

Share this post


Link to post

Short link
Share on other sites

Okay I did as I believe you suggested, and included the scrip at lines 124-131 and then added ${"flagIcon"}, in left and right panels for each size.

 

playersPanel.xc

 

But they still don't show up, 

 

 

Disregard... it does work :)


Awesome work Scyorkie, perfection :)

Edited by gryphen

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.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...