Jump to content
kzkhak

show country code instead of country flags

Recommended Posts

Hi all,

Please forgive me if this is off-topic or out-of-place.

 

I want to show conutry code characters on XVM PlayersPanels instead of country flags images.

In playersPanel_large.xc

{"x": 60, "y": 6, "align": "center", "valign": "top", "src": "xvm://res/icons/client_flags/{{py:clientflag('{{name}}')}}.png", "alpha": "{{alive?100|30}}", "shadow": {} },

I don't know what this code is written in.

{{py:clientflag('{{name}}')}} returns country code characters. (right?) 

I want to show itself (country code characters) on XVM PP.

 

Is it possible with some hacks?

 

Thanks,

Share this post


Link to post
Share on other sites

Try to change:

 

{"x": 60, "y": 6, "align": "center", "valign": "top", "src": "xvm://res/icons/client_flags/{{py:clientflag('{{name}}')}}.png", "alpha": "{{alive?100|30}}", "shadow": {} },

 

To

 

{"x": 60, "y": 6, "align": "center", "valign": "top", "{{py:clientflag('{{name}}')}}", "alpha": "{{alive?100|30}}", "shadow": {} },

 

Haven't tested it.

Share this post


Link to post
Share on other sites

oh quick responce!

 

Thanks Aslain. I'm going to try that code when XVM update. :tounge_wink:

Share this post


Link to post
Share on other sites

@Aslain

 

At first I appreciate your great work although you are in vacation.

 

To get straight to the point, That code doesn't work with some errors.

It seems like systax errors.

Attach logs and screenshot.

Aslains_WoT_Logs.zip

shot_3364.jpg

Share this post


Link to post
Share on other sites

Try

{"x": 60, "y": 6, "align": "center", "valign": "top", "format": "{{py:clientflag('{{name}}')}}", "alpha": "{{alive?100|30}}", "shadow": {} },

Share this post


Link to post
Share on other sites

@Aslain

 

It works perfectly! This is what I want!

Do guys remember country flags...? I can't remember everything... :tired:

 

Thank you very much, Aslain! ;)

shot_3366.jpg

Share this post


Link to post
Share on other sites

Off-topic suggestion.
Noticed on startup you don't see HP(no data) for enemy team,
you can easily fix it inside playersPanel.xc under "hp" format.


default is something like this:

"format": "<font face='$FieldFont' size='11' color='#D9D9D9' alpha='{{alive?{{ready?#FF|#80}}|#80}}'><b>{{alive?{{hp|{{l10n:No data}}}}|{{l10n:Destroyed}}}}</b></font>",

Simply replace {{l10n:No data}} with {{hp-max}}

or add current / max hp using this:

"format": "<font face='$FieldFont' size='11' color='#D9D9D9' alpha='{{alive?{{ready?#FF|#80}}|#80}}'><b>{{alive?{{hp|{{hp-max}}}}|{{l10n:0}}}} / {{hp-max}}</b></font>",

example:
hp.thumb.jpg.04ea2aa0948b0d25971f365882496e1e.jpg

  • Like 1

Share this post


Link to post
Share on other sites
On 8/9/2018 at 4:34 PM, Ress said:

Off-topic suggestion.
Noticed on startup you don't see HP(no data) for enemy team,
you can easily fix it inside playersPanel.xc under "hp" format.


default is something like this:

"format": "<font face='$FieldFont' size='11' color='#D9D9D9' alpha='{{alive?{{ready?#FF|#80}}|#80}}'><b>{{alive?{{hp|{{l10n:No data}}}}|{{l10n:Destroyed}}}}</b></font>",

Simply replace {{l10n:No data}} with {{hp-max}}

or add current / max hp using this:

"format": "<font face='$FieldFont' size='11' color='#D9D9D9' alpha='{{alive?{{ready?#FF|#80}}|#80}}'><b>{{alive?{{hp|{{hp-max}}}}|{{l10n:0}}}} / {{hp-max}}</b></font>",

example:
hp.thumb.jpg.04ea2aa0948b0d25971f365882496e1e.jpg

I wonder if Aslian could make this a perm change.... Or at least an option...

Share this post


Link to post
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.

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.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.