Chance to win XVM wn8 in battle.

Published by soulza on

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #112267
    soulza
    Participant

    I found this on the XVM forums 

    Since latest patch chance to win has been removed due to recalc needed 

    so until its available this will do,

    Untitled.png

    This shows the overall WN8 for the selected vehicle and not a players overall wn8 making it more accurate 

    UPDATED TO SHOW PLAYERS OVERALL WN8

    (you can set it to vehicle only WN8 value per player by doing this :-

    set the useTankRating to TRUE (edit the .py file with PJO)

    Capture.PNG

    this is dynamic and updates when a tank is killed , it will display in two colors , green if ally team has higher wn8 value and red if enemy has higher value

    it also shows the percentage of how higher the value is.

    ok this is what you need to do,

    1. download this file and put it in res_modsconfigsxvmpy_macro   <a class="ipsAttachLink" data-fileid="6630" href="/applications/core/interface/file/attachment.php?id=6630″ rel=””>mod_wn8_chance.py

    2. edit battleLabelsTemplates.xc and add this to your templates (and customize to your needs):

      “teamRating”: {
          “enabled”: true,
          “updateEvent”: “PY(ON_UPDATE_TEAM_RATING)”,
          “x”: 190,
          “y”: 0,
          “shadow”: { “distance”: 1, “angle”: 90, “alpha”: 80, “blur”: 5, “strength”: 1.5 },
          “textFormat”: { “size”: 20 },
          “format”: “<font face =’agencyfb’ size=’20’color='{{py:alliesAliveRatingRatio>=0?#00EE00|#EE0000}}’><b>TEAM WN8 RATING {{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=0?=|      {{py:alliesAliveRatingRatio>0?&gt;|&lt;}}}} {{py:enemiesAliveRating}} ({{py:alliesAliveRatingRatio}}%)</font></b>”
        },

    3. edit battleLabels.xc and change it that way to add this setting:

    ${ “battleLabelsTemplates.xc”:”def.teamRating”},

     

    your battle labels.xc will look different from user to user , mine looks like this :-

    Capture.PNG

     

    full credit goes to TEY from the EU forums of XVM for this

     

    #112268
    soulza
    Participant

    ‘{{py:alliesAliveRatingRatio>=0?#00EE00|#EE0000}}’

     

    this line is correct  they are the green/red values make sure you have them correct

    #112269
    kupjones
    Member
    On 5/14/2017 at 7:36 AM, soulza said:

    set the useTankRating to TRUE (edit the .py file with PJO)

    Capture.PNG

     

    full credit goes to TEY from the EU forums of XVM for this

     

    So are you saying I cant get all wiggly thinking Soulza ***FINALLY*** became a python coder?????!!!!  

    nope :) just following others instructions , i cant code python but i can follow it enough to edit a few bits

    Mark my words, you are well on your way!!

    xD

    #112270
    kupjones
    Member

    Works great after I changed the font  :D

    4vBfcNWIlOIxkAAAAASUVORK5CYII=

    #112271
    SRQFlyer
    Participant

    I did not like the whole thing being one color so I did this:

    “format”: “Team WN8: <font color=’#00EE00′>{{py:alliesAliveRating}}</font>{{py:alliesAliveRatingRatio=0?<font color=’#ffff00′>=</font| {{py:alliesAliveRatingRatio>0?<font color=’#00EE00′>&gt;</font>|<font color=’#EE0000′>&lt;</font>}}}} <font color=’#EE0000′>{{py:enemiesAliveRating}}</font>  <font color='{{py:alliesAliveRatingRatio>=0?#00EE00|#EE0000}}’>({{py:alliesAliveRatingRatio}}%)</font>”      
     

    Now the good guys are green, bad are red, and the ratio and GT, LT signs are red or green based on positive or negative.

    #112272
    soulza
    Participant

    think i will borrow that m8 :)

     

    #112273

    can not get it to work  all I get is       Team WN8:  < {%}

    here is a copy of  what i am using   used both sou;za format line  and this SRQFlyer format line

    “teamRating”: {
          “enabled”: true,
          “updateEvent”: “PY(ON_UPDATE_TEAM_RATING)”,
          “x”: 190,
          “y”: 0,
          “shadow”: { “distance”: 1, “angle”: 90, “alpha”: 80, “blur”: 5, “strength”: 1.5 },
          “textFormat”: { “size”: 20 },
          “format”: “Team WN8: <font color=’#00EE00′>{{py:alliesAliveRating}}</font>{{py:alliesAliveRatingRatio=0?<font color=’#ffff00′>=</font| {{py:alliesAliveRatingRatio>0?<font color=’#00EE00′>&gt;</font>|<font color=’#EE0000′>&lt;</font>}}}} <font color=’#EE0000′>{{py:enemiesAliveRating}}</font>  <font color='{{py:alliesAliveRatingRatio>=0?#00EE00|#EE0000}}’>({{py:alliesAliveRatingRatio}}%)</font>”
        },

     

    #112274
    SRQFlyer
    Participant

    What is not working?

    Did you copy the mod_wn8_chance.py file to the correct place?

    Did you update the battleLabels.xc file.

    I assume the above you put in the battleLabelsTemplate.xc file?

    #112275
    soulza
    Participant

    here is SRQflyer’s code slightly (ever so) altered :)

    Untitled.png

      “teamRating”: {
          “enabled”: true,
          “updateEvent”: “PY(ON_UPDATE_TEAM_RATING)”,
          “x”: 190,
          “y”: 0,
          “shadow”: { “distance”: 1, “angle”: 90, “alpha”: 80, “blur”: 5, “strength”: 1.5 },
          “textFormat”: { “size”: 20 },
          “format”: “<font face =’agencyfb’ size=’20’><b>Team WN8: <font color=’#00EE00′>{{py:alliesAliveRating}}</font>{{py:alliesAliveRatingRatio=0?<font color=’#ffff00′>=</font| {{py:alliesAliveRatingRatio>0?<font color=’#00EE00′>&gt;</font>|<font color=’#EE0000′>&lt;</font>}}}} <font color=’#EE0000′>{{py:enemiesAliveRating}}</font>  <font color='{{py:alliesAliveRatingRatio>=0?#00EE00|#EE0000}}’>({{py:alliesAliveRatingRatio}}%)</b></font></font>”
        },

    #112276
    soulza
    Participant

    master you need the .py file m8 , the template is correct as you are seeing some text , its looking for the .py file and not finding it,

    mod_wn8_chance.py

    #112277
    1 hour ago, soulza said:

    master you need the .py file m8 , the template is correct as you are seeing some text , its looking for the .py file and not finding it,

    mod_wn8_chance.py

    I must of goofed the py file up when i tried to edit it using po.  redownloaded worked fine. thanks

    #112278
    WHYPHY
    Member

    any idea where i can get the fonts for the text? because all i see is this:

    Screenshot_25.png

    #112279
    SRQFlyer
    Participant
    3 hours ago, WHYPHY said:

    any idea where i can get the fonts for the text? because all i see is this:

    Screenshot_25.png

    Change teh line font face =’agencyfb’  to someother font like font face =’mono’ 

    #112280
    WHYPHY
    Member
    1 hour ago, SRQFlyer said:

    Change teh line font face =’agencyfb’  to someother font like font face =’mono’ 

    perfect, thank you

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.