Jump to content
Korean Random
Tey

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

Recommended Posts

1 час назад, SicFunzler сказал:

this script go no problems

 

MFG

SicFunzler

идет проверил но раньше не шел

рабочий скрипт с цветами mod_wn8_chance.py

 

Screenshot_1.png.c1c53609553b983f347964c4bab16a29.png

Share this post


Link to post

Short link
Share on other sites

С кажите у кого то работает в патче 1.19 ? а то после обновы перестало что то работать

Share this post


Link to post

Short link
Share on other sites
4 hours ago, P.S.Enot said:

С кажите у кого то работает в патче 1.19 ? а то после обновы перестало что то работать

 

Its works fine

MFG

SicFunzler

Share this post


Link to post

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

 

Its works fine

MFG

SicFunzler

странно у меня что то перестал после обновы работать

Share this post


Link to post

Short link
Share on other sites
14 часов назад, P.S.Enot сказал:

странно у меня что то перестал после обновы работать

А логи где? Знаешь ведь, что нужно прикреплять их.

Share this post


Link to post

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

А логи где? Знаешь ведь, что нужно прикреплять их.

Да знаю. не стал выкладывать решил почистить кэш и проверить заново. просто в прошлом патче работало 1.18 а как это вышел перестало пахать. хвм тот же скрипты все новые тоже . что бросило отображать не понимаю может техника не такая уже думал. картинку не показывает совсем только цифры нули стоят на обе команды и стрелка и все

хз знает че все почистил . не робит чет 

shot_015.thumb.jpg.a3108d5bbadb2b252cf46e466c32c4b7.jpg

 

Share this post


Link to post

Short link
Share on other sites

Anybody still interested or well-informed about this macro?

 

Anonymizer hides the XVM rating of its users and this macro is currently giving 0 score to such users, rendering it useless.

 

My idea to counter this is, take an "average rating" of the users and anonymized users are given that average rating for win chance calculation purpose.

 

(The average rating of whole server users can be seen in website like this: https://wotlabs.net/ for example, SEA realm's average WN8 rating is 909 while the average WN8 rating of 'active' users is 1237.)

 

I don't know how to design an API to retrieve real-time value of that average, so I tried just declaring a global constant like DEFAULT_RATING = 1237.0 .

 

I succeeded to modify the "frag update" function. Every time an anon user dies, the rating of DEFAULT_RATING is subtracted from the total rating.

@xfw.registerEvent(FragsCollectableStats, 'addVehicleStatusUpdate')
def FragsCollectableStats_addVehicleStatusUpdate(self, vInfoVO):

    ...

    else:
        if vid in vehicles:
            vehicle = vehicles.pop(vid)

            if vehicle.get('wn8', None) is not None:
                if is_ally:
                    allies_wn8 -= vehicle['wn8']
                else:
                    enemies_wn8 -= vehicle['wn8']

                LOG_DEBUG('ALLIES=%d ENEMIES=%d RATIO=%s' % (allies_wn8, enemies_wn8, (allies_wn8  * 100 / enemies_wn8) if enemies_wn8 != 0 else -1))
                as_event('ON_UPDATE_TEAM_RATING')

            # kwj mod - blank stats (by anonymizer) are set to DEFAULT_RATING
            else:
                if is_ally:
                    allies_wn8 -= DEFAULT_RATING
                else:
                    enemies_wn8 -= DEFAULT_RATING
                LOG_DEBUG('ALLIES=%d ENEMIES=%d RATIO=%s' % (allies_wn8, enemies_wn8, (allies_wn8  * 100 / enemies_wn8) if enemies_wn8 != 0 else -1))
                as_event('ON_UPDATE_TEAM_RATING')

But the same trick did not work for initially summing the ratings.

 

It turns out that, the function

def onStatsReady():
    for vid, vehicle in vehicles.iteritems():
        if vehicle.get('stats') is None:
            setVehicleStats(vid, vehicle)
            LOG_DEBUG('%s => %s' % (vid, vehicle))

is calling the function setVehicleStats(vid, vehicle) many more times than the actual number of vehicles (the array vehicles.iteritems() is somewhat larger?), so I can't figure out how to get the correct sum of ratings. It's always too many or too less.

 

I tried many roundabouts but all failed, and now I ran out of idea.

 

At least, I need to know

 

1. Exactly how does the vehicles.iteritems() look like?
2. If a user is using anonymizer, how does his returns to getPlayerStats(vid) function look like?

 

Or any other ideas to do this?

 

==============================================================================================

 

Okay, I finally figured out how to set all anonymized players to a certain constant "Default rating".

 

Here is the product.

 

The default rating must be manually set ( DEFAULT_RATING = ****.* ). If anybody knows how to load a real-time statistics of average WN8 rating from a website, please add.

 

Edited by Genba_Kantoku_s
Debug

Share this post


Link to post

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

(The average rating of whole server users can be seen in website like this: https://wotlabs.net/ for example, SEA realm's average WN8 rating is 909 while the average WN8 rating of 'active' users is 1237.)

Согласно данным на сайте XVM, 50% игроков имеют xwn8≈30 (wn8≈956). https://modxvm.com/ru/рейтинги/шкала-xvm/цвета/

 

12 часов назад, Genba_Kantoku_s сказал:

If anybody knows how to load a real-time statistics of average WN8 rating from a website, please add.

 

 

from xvm_main.python import vehinfo

wn8 = vehinfo.getXvmScaleData('wn8')
if wn8 is not None:
    sup50 = wn8[29]

 

Edited by ktulho

Share this post


Link to post

Short link
Share on other sites
4 hours ago, ktulho said:

According to the XVM website, 50% of players have xwn8≈30 (wn8≈956). https://modxvm.com/ru/ rates/scale-xvm/colors/

 

It seems like the different servers (EU, NA, Asia, RU) have different average ratings, while the one called by your code is an average for all servers.

 

Also, I think using the "active users" value is more plausible, because only active users will bother to set the anonymizer on. That's why I chose 1237 from https://wotlabs.net/ .

Share this post


Link to post

Short link
Share on other sites

Improved version, as of 2023-04-10

 

1. (as in 2023-04-07 version of mine) Anonymized (and thus no XVM rating info available in match) players will be given an 'average rating' as a default value.

 

I made the codes in def setVehicleStats(vid, vehicle): (and some other functions) further cleaner and neatier, as my understandings of the code is improved.

 

2. The color scheme now follows the XVM dynamic color scale of https://kr.cm/f/t/2625/ , but also somewhat modified.

 

In the game, the win chance value at the point of the beginning of the match seldom goes lower than 30% (ally wn8 is below 60% of enemy wn8), and that is already quite a rare landslide situation. So I 'amped up' the win chance percentage for color scale 2.5 times.

 

Instead of the value defined in the above link (and as a default, colors.xc/"x" in the XVM config file set), the color will be determined according to the following color scale:

 

below 36.56% = "very_bad" (red)

36.56% - 43.36% = "bad" (orange)

43.36% - 50.96% = "normal" (yellow)

50.96% - 60.16% = "good" (green)

60.16% - 66.96% = "very_good" (teal)

above 66.96% = "unique" (purple)

 

It is apparent that this color scale is still quite distorted, especially because the boundaries of yellow color (looks like evenly matched) and green color (looks like the allies are in advantage) are lower than the intuition. I chose this color scale just for simplicity of code. We need a better alternative for this.

mod_wn8_chance.py

Edited by Genba_Kantoku_s

Share this post


Link to post

Short link
Share on other sites

Genba_Kantoku_scейчас так, как сделать ПРАВИЛЬНО:

"format": "<font color='{{py:alliesAliveRatingRatio>=50?#00EE00|#EE0000}}'>{{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=50?=|{{py:alliesAliveRatingRatio>50?&gt;|&lt;}}}} {{py:enemiesAliveRating}} ({{py:alliesAliveRatingRatio}}%)</font>"

shot_048.jpg.6bbdcdf4ef83f6c21e226c2273e2a889.jpg

Edited by sergey spb

Share this post


Link to post

Short link
Share on other sites

Парни, что, тема совсем мертвая или кто-нибудь все-таки поможет/подскажет. Сам скрипт с этой страницы, пост @P.S.Enot  от 13 ноября 2022 года.

Код из battleLabelsTemplates.хс

"teamRating": {
      "enabled": true,
      "updateEvent": "PY(ON_UPDATE_TEAM_RATING)",
      "x": 1290,
      "y": 3,
      "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 5, "strength": 1.5 },
      "textFormat": { "size": 22 },
      "format": "WN8: <font color='{{py:alliesAliveRatingRatio>=50?#00EE00|#EE0000}}'>{{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=50?=|{{py:alliesAliveRatingRatio>50?&gt;|&lt;}}}} {{py:enemiesAliveRating}} ({{py:alliesAliveRatingRatio}}%)</font>"

Вроде и работает, но есть нюансы. Только два цвета отрабатывают - красный и зеленый. Т.е. 49% и меньше будет красный, а 50%+ будет зеленый. Непонятно, куда делись желтый, синий и т.д. Сам скрипт не трогал, т.к. не соображаю. Может что battleLabelsTemplates не так?

В общем, нужна помощь спецов!

shot_009.jpg

shot_010.jpg

mod_wn8_chance.py

Edited by O6opMoT
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
14.04.2023 в 18:46, sergey spb сказал:

Genba_Kantoku_scейчас так, как сделать ПРАВИЛЬНО

Вот так, похоже:
 

"format": "WN8: <font color='{{py:c_alliesAliveRatingRatio}}'>{{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=50?=|{{py:alliesAliveRatingRatio>50?&gt;|&lt;}}}} {{py:enemiesAliveRating}} ({{py:alliesAliveRatingRatio}}%)</font>"

Пять дней промучился, методом научного тыка пришел к такому результату. Так у меня все работает правильно.

 

ЗЫ. Всем откликнувшимся большое спасибо за помощь, ага.

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

Доброго времени суток. ребята у всех все нормально работает. а то не норма . не эффективность не вн8 цифр вообще нет

Share this post


Link to post

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

@P.S.Enot , вчера вечером работал без проблем.

странно у меня не норма не фига не показывает после обновы. можешь свой скрипт кинуть и настройку попробую если не трудно?

Share this post


Link to post

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

@P.S.Enot , может активация хвм слетела?
Держи

 

ВН8.rar 5 kB · 0 скачиваний

ну у меня эти макросы по чему то не отрабатывает {{py:efficiency.wn8}}, {{py:efficiency.eff}},

не пашет что то

 

Share this post


Link to post

Short link
Share on other sites
7 минут назад, P.S.Enot сказал:

ну у меня эти макросы по чему то не отрабатывает {{py:efficiency.wn8}}, {{py:efficiency.eff}},

Реплей запустил - все пашет.

spacer.png

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