Jump to content
Korean Random
Tey

Team WN8 / Командный WN8

Recommended Posts

I did something similar to compensate the lake of win chance. It shows the accumulated WN8 of both team and the ratio (it looks ugly on screenshot but not in game):

post-32219-0-50462500-1493946165.jpg

 

If you want to use it:

  • download that script and put it in res_mods\configs\xvm\py_macro
  • edit battleLabels.xc and change it that way:

    {
      "labels": {
        ...
        "formats": [
          ...
          , ${ "battleLabelsTemplates.xc":"def.teamRating"}
        ]
      }
    }
  • edit battleLabelsTemplates.xc and change it that way (and customize to your needs):

    {
      ...
      "def": {
        ...
        ,"teamRating": {
          "enabled": true,
          "updateEvent": "PY(ON_UPDATE_TEAM_RATING)",
          "x": 230,
          "y": 2,
          "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 5, "strength": 1.5 },
          "textFormat": { "size": 15 },
          "format": "Team WN8: <font color='{{py:alliesAliveRatingRatio>=0?#00EE00|#EE0000}}'>{{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=0?=|{{py:alliesAliveRatingRatio>0?>|<}}}} {{py:enemiesAliveRating}} ({{py:alliesAliveRatingRatio}}%)</font>"
        }
      }
    }
    
Note that this takes into account the WN8 of the current vehicle of each player instead of the overall WN8 of each player, unless the player played less than 100 battles with that vehicle.
  • Upvote 8

Share this post


Link to post

Short link
Share on other sites

I did something similar to compensate the lake of win chance. It shows the accumulated WN8 of both team and the ratio (it looks ugly on screenshot but not in game):

attachicon.gifteam_wn8.jpg

 

 

Excellent! It took me a couple of tries, but I finally got it to work! Thanks man! 

Edited by Grey_Mouser

Share this post


Link to post

Short link
Share on other sites
  • Note that this takes into account the WN8 of the current vehicle of each player instead of the overall WN8 of each player, unless the player played less than 100 battles with that vehicle.
    

 

 

If I wanted to change it to count  the overall win8, instead of the current vehicle, what would I change?

Share this post


Link to post

Short link
Share on other sites

Where it to write? (

Check battleLabels.xc

If I wanted to change it to count  the overall win8, instead of the current vehicle, what would I change?

I'm not familiar with this stuff, but I managed to do something. It seems to calculate the sum of the overall WN8 now, but incorrectly calculates the ratio. Unless the author replies, you may try it if you want mod_wn8_chance.zip

  • Upvote 3

Share this post


Link to post

Short link
Share on other sites

If I wanted to change it to count  the overall win8, instead of the current vehicle, what would I change?

 

Apply the following changes or just use konrad509's version (he did exactly the same thing).

Remove that part from mod_wn8_chance.py (lines 116 to 133):

        if 'wn8expDamage' in info and all(k in stats['v'] for k in ('b', 'frg', 'dmg', 'w', 'spo', 'def')):
            if stats['v']['b'] >= 100:
                # Compute WN8 for that vehicle
                rDAMAGE = stats['v']['dmg'] / (stats['v']['b'] * info['wn8expDamage'])
                rSPOT   = stats['v']['spo'] / (stats['v']['b'] * info['wn8expSpot'])
                rFRAG   = stats['v']['frg'] / (stats['v']['b'] * info['wn8expFrag'])
                rDEF    = stats['v']['def'] / (stats['v']['b'] * info['wn8expDef'])
                rWIN    = stats['v']['w']   / (stats['v']['b'] * info['wn8expWinRate']) * 100.0

                rWINc    = max(0,                     (rWIN    - 0.71) / (1 - 0.71) )
                rDAMAGEc = max(0,                     (rDAMAGE - 0.22) / (1 - 0.22) )
                rFRAGc   = max(0, min(rDAMAGEc + 0.2, (rFRAG   - 0.12) / (1 - 0.12)))
                rSPOTc   = max(0, min(rDAMAGEc + 0.1, (rSPOT   - 0.38) / (1 - 0.38)))
                rDEFc    = max(0, min(rDAMAGEc + 0.1, (rDEF    - 0.10) / (1 - 0.10)))

                WN8 = 980*rDAMAGEc + 210*rDAMAGEc*rFRAGc + 155*rFRAGc*rSPOTc + 75*rDEFc*rFRAGc + 145*min(1.8,rWINc)

                vehicle['wn8'] = WN8 

 

I'm not familiar with this stuff, but I managed to do something. It seems to calculate the sum of the overall WN8 now, but incorrectly calculates the ratio. Unless the author replies, you may try it if you want attachicon.gifmod_wn8_chance.zip

I would have done the exact same changes :) Do you have an example of wrong ratio (like which sums produce which wrong ratio)? My graphic card died, so I can't check it out with WoT currently, but I can probably figure out what's wrong from samples.

 

BTW, this macro does not handle players with no WN8 very well. It just ignores them, which is probably wrong as it's like considering they have a WN8 of 0 (they are probably newbies, but 0 is still too low). Of course, this impacts the WN8 sums comparison and ratio. I'm open to suggestions...

Edited by Tey

Share this post


Link to post

Short link
Share on other sites

 Do you have an example of wrong ratio (like which sums produce which wrong ratio)?

It seems to be showing 100% all the time if allies' WN8 > enemies' WN8 and -100% otherwise.

 

I don't know if it matters, but I checked it on replay only.

Edited by konrad509
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

It seems to be showing 100% all the time if allies' WN8 > enemies' WN8 and -100% otherwise.

 

Aw right, typical float/integer programming mistake. It's fixed in latest version, which also uses overall WN8 by default now (set useTankRating config key to True for the old behavior).

Edited by Tey
  • Upvote 3

Share this post


Link to post

Short link
Share on other sites

i think you add it to the .py file Konrad?

 

Capture.PNG.a1e726c30eea1dc1296a34a4d3c6

 

 

Untitled.png.35c1bb8dd82c7014d5d28f118b9

Edited by soulza
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

Indeed, I was too lazy to decide in which XC file to put the settings, so it's only in the Python file yet <_<

Share this post


Link to post

Short link
Share on other sites
If you want to use it:

 

Спасибо за реализацию.

Edited by refaol
  • Upvote 2

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.

×