Jump to content
Korean Random

Recommended Posts

Hello everyone,

 

Is there a way to determine the colorblind mode setting in the client?  I have some XVM configs that I'd like to use specific colors, images, etc if the colorblind mode is enabled or disabled.

 

Thank You for you help!

 

Zavar

Share this post


Link to post

Short link
Share on other sites

Hi night_dragon_on,

I'm not having success is using the script.  For example, trying to use it to change an image based on the in-game setting doesn't work, unless I'm somehow using it incorrectly.  I was using:

"format": "{{py:isColorBlind=True?<img src='cfg://Aslain/TotalHPBar/TotalHPBar_GvP.png'>|<img src='cfg://Aslain/TotalHPBar/TotalHPBar_GvR.png'>}}"

Which seems to always use the second image, regardless of the in-game color blind setting.

 

Any help would be appreciated.

 

Thank You,

 

Zavar

Share this post


Link to post

Short link
Share on other sites

@Zavar , download the file again, fixed.

 

13 часов назад, Zavar сказал:

I was using

"format": "{{py:isColorBlind?<img src='image-1.png'>|<img src='image-2'>}}"

It is not necessary to specify the macro value itself in order to use this substitution :smile:

Share this post


Link to post

Short link
Share on other sites

try to use this in sight.xc

 

// ({{py:sight.c_piercingChance}})
    "c_piercingChance": {
      "not_pierced":    "{{py:isColorBlind?#E82929|#00FF00}}",
      "little_pierced": "{{py:isColorBlind?#E1C300|#A0CFFF}}",
      "great_pierced":  "{{py:isColorBlind?#2ED12F|#D042F3}}"

try also

 

"not_pierced":   "format":  "{{py:isColorBlind?<#E82929>|<#00FF00>}}",

 

but no changes in the color, shows always the first color codes.

Share this post


Link to post

Short link
Share on other sites
32 минуты назад, Heliomalt сказал:

try to use this in sight.xc

32 минуты назад, Heliomalt сказал:

try also

 

Macro is updated by event.

PY(ON_COLOR_CHANGED)
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@night_dragon_on 

"c_piercingChance": {
      "updateEvent":    "ON_COLOR_CHANGED",
      "not_pierced":    "{{py:isColorBlind?#00FF00|#E82929}}",
      "little_pierced": "{{py:isColorBlind?#A0CFFF|#E1C300}}",
      "great_pierced":  "{{py:isColorBlind?#D042F3|#2ED12F}}"

Works. Thanks.

Share this post


Link to post

Short link
Share on other sites

@night_dragon_on 

 

I'm trying to expand the correlation bar but the automatic change doesn't work. This is how the code used to work:

 

"fragCorBarEnemy": {
      "enabled": true,
      "updateEvent": "ON_VEHICLE_DESTROYED",
      "x": 240,
      "y": 38,
      "width": 400,
      "height": 30,
      "screenHAlign": "center",
      "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 3, "strength": 2 },
      "textFormat": {"align": "left", "size": 23 },
      "alpha": "{{battletype-key=epic_battle?0|100}}",
      "format": "<font color='#FF0000'>{{py:fcb.enemyVehicleAlive}}<font>"
    },

Automatic version, does not work:

 

"fragCorBarEnemy": {
      "enabled": true,
      "updateEvent": "ON_VEHICLE_DESTROYED, ON_COLOR_CHANGED",
      "x": 240,
      "y": 38,
      "width": 400,
      "height": 30,
      "screenHAlign": "center",
      "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 3, "strength": 2 },
      "textFormat": {"align": "left", "size": 23 },
      "alpha": "{{battletype-key=epic_battle?0|100}}",
      "format": "<font color='{{py:isColorBlind?#6060FF|#E82929}}'>{{py:fcb.enemyVehicleAlive}}<font>" 
    },

Doesn't work either:

 

"format": "<font color={{py:isColorBlind?#6060FF|#E82929}}>{{py:fcb.enemyVehicleAlive}}<font>"
"format": "<font color='{{py:isColorBlind?#6060FF|#E82929}}'>{{py:fcb.enemyVehicleAlive}}}}<font>" 

Either the color does not change or the frag correlation bar disappears entirely. Any hint? Thanks.

Share this post


Link to post

Short link
Share on other sites

@Heliomalt , write the event correctly in the config.

 

14.04.2020 в 17:20, night_dragon_on сказал:

PY(ON_COLOR_CHANGED)

 

Not

ON_COLOR_CHANGED
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@night_dragon_on  strange thing, because in sight.xc is working with

ON_COLOR_CHANGED

see post, but I changed this also. Thank you again.

 

Edit:

 

I made these changes for color blind players, does the script work with all of these files, or in other words, can the script be used across the configuration without any restrictions? The point of the thing would be to completely automate the entire XVM configuration. Would be extremely comfortable for color blind players. (like my son e.g.)

colorblind.zip

Edited by Heliomalt

Share this post


Link to post

Short link
Share on other sites

@night_dragon_on 

 

Try this in minimapLines.xc

"camera": { "enabled": true, "updateEvent": "PY(ON_COLOR_CHANGED)", "inmeters": true, "color": "{{py:isColorBlind?#1164ea|#FF0000}}" },

seems not working, are there any restrictions in the config for different xc files?

Share this post


Link to post

Short link
Share on other sites
7 часов назад, Heliomalt сказал:

are there any restrictions in the config for different xc files

 

Do not add non-existent parameters to partitions.

In all files where extended formatting is supported, I added a corresponding mark.

* extended format supported, see extra-field.txt
Format set (extended format supported, see extra-field.txt).

Share this post


Link to post

Short link
Share on other sites
15 hours ago, night_dragon_on said:

 

Do not add non-existent parameters to partitions.

In all files where extended formatting is supported, I added a corresponding mark.


* extended format supported, see extra-field.txt
Format set (extended format supported, see extra-field.txt).

 

Where I can find this marks? And from where you get this text. Reading all the files in \shared_resources\xvm\docdoc, can't find any hint.

Share this post


Link to post

Short link
Share on other sites
1 минуту назад, Heliomalt сказал:

Where I can find this marks?

 

In the "default" config files.

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.

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...