P.S.Enot Posted November 13, 2022 Share Posted November 13, 2022 1 час назад, SicFunzler сказал: this script go no problems MFG SicFunzler идет проверил но раньше не шел рабочий скрипт с цветами mod_wn8_chance.py @ Quote Link to comment Short link Share on other sites More sharing options...
P.S.Enot Posted December 3, 2022 Share Posted December 3, 2022 С кажите у кого то работает в патче 1.19 ? а то после обновы перестало что то работать @ Quote Link to comment Short link Share on other sites More sharing options...
SicFunzler Posted December 3, 2022 Share Posted December 3, 2022 4 hours ago, P.S.Enot said: С кажите у кого то работает в патче 1.19 ? а то после обновы перестало что то работать Its works fine MFG SicFunzler @ Quote Link to comment Short link Share on other sites More sharing options...
P.S.Enot Posted December 3, 2022 Share Posted December 3, 2022 6 часов назад, SicFunzler сказал: Its works fine MFG SicFunzler странно у меня что то перестал после обновы работать @ Quote Link to comment Short link Share on other sites More sharing options...
yepev Posted December 4, 2022 Share Posted December 4, 2022 14 часов назад, P.S.Enot сказал: странно у меня что то перестал после обновы работать А логи где? Знаешь ведь, что нужно прикреплять их. @ Quote Link to comment Short link Share on other sites More sharing options...
P.S.Enot Posted December 4, 2022 Share Posted December 4, 2022 2 минуты назад, yepev сказал: А логи где? Знаешь ведь, что нужно прикреплять их. Да знаю. не стал выкладывать решил почистить кэш и проверить заново. просто в прошлом патче работало 1.18 а как это вышел перестало пахать. хвм тот же скрипты все новые тоже . что бросило отображать не понимаю может техника не такая уже думал. картинку не показывает совсем только цифры нули стоят на обе команды и стрелка и все хз знает че все почистил . не робит чет @ Quote Link to comment Short link Share on other sites More sharing options...
Genba_Kantoku_s Posted April 7, 2023 Share Posted April 7, 2023 (edited) 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 April 7, 2023 by Genba_Kantoku_s Debug @ Quote Link to comment Short link Share on other sites More sharing options...
Genba_Kantoku_s Posted April 7, 2023 Share Posted April 7, 2023 Okay, there was one line I forgot to add. Reuploading. mod_wn8_chance.py @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted April 7, 2023 Share Posted April 7, 2023 (edited) 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 April 7, 2023 by ktulho @ Quote Link to comment Short link Share on other sites More sharing options...
Genba_Kantoku_s Posted April 8, 2023 Share Posted April 8, 2023 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/ . @ Quote Link to comment Short link Share on other sites More sharing options...
Genba_Kantoku_s Posted April 9, 2023 Share Posted April 9, 2023 (edited) 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 April 9, 2023 by Genba_Kantoku_s @ Quote Link to comment Short link Share on other sites More sharing options...
sergey spb Posted April 14, 2023 Share Posted April 14, 2023 (edited) Genba_Kantoku_s, cейчас так, как сделать ПРАВИЛЬНО: "format": "<font color='{{py:alliesAliveRatingRatio>=50?#00EE00|#EE0000}}'>{{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=50?=|{{py:alliesAliveRatingRatio>50?>|<}}}} {{py:enemiesAliveRating}} ({{py:alliesAliveRatingRatio}}%)</font>" Edited April 14, 2023 by sergey spb @ Quote Link to comment Short link Share on other sites More sharing options...
O6opMoT Posted May 9, 2023 Share Posted May 9, 2023 (edited) Парни, что, тема совсем мертвая или кто-нибудь все-таки поможет/подскажет. Сам скрипт с этой страницы, пост @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?>|<}}}} {{py:enemiesAliveRating}} ({{py:alliesAliveRatingRatio}}%)</font>" Вроде и работает, но есть нюансы. Только два цвета отрабатывают - красный и зеленый. Т.е. 49% и меньше будет красный, а 50%+ будет зеленый. Непонятно, куда делись желтый, синий и т.д. Сам скрипт не трогал, т.к. не соображаю. Может что battleLabelsTemplates не так? В общем, нужна помощь спецов! mod_wn8_chance.py Edited May 12, 2023 by O6opMoT 1 @ Quote Link to comment Short link Share on other sites More sharing options...
O6opMoT Posted May 13, 2023 Share Posted May 13, 2023 14.04.2023 в 18:46, sergey spb сказал: Genba_Kantoku_s, cейчас так, как сделать ПРАВИЛЬНО Вот так, похоже: "format": "WN8: <font color='{{py:c_alliesAliveRatingRatio}}'>{{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=50?=|{{py:alliesAliveRatingRatio>50?>|<}}}} {{py:enemiesAliveRating}} ({{py:alliesAliveRatingRatio}}%)</font>" Пять дней промучился, методом научного тыка пришел к такому результату. Так у меня все работает правильно. ЗЫ. Всем откликнувшимся большое спасибо за помощь, ага. 2 @ Quote Link to comment Short link Share on other sites More sharing options...
P.S.Enot Posted October 25, 2023 Share Posted October 25, 2023 Доброго времени суток. ребята у всех все нормально работает. а то не норма . не эффективность не вн8 цифр вообще нет @ Quote Link to comment Short link Share on other sites More sharing options...
O6opMoT Posted October 25, 2023 Share Posted October 25, 2023 @P.S.Enot , вчера вечером работал без проблем. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
P.S.Enot Posted October 25, 2023 Share Posted October 25, 2023 4 минуты назад, O6opMoT сказал: @P.S.Enot , вчера вечером работал без проблем. странно у меня не норма не фига не показывает после обновы. можешь свой скрипт кинуть и настройку попробую если не трудно? @ Quote Link to comment Short link Share on other sites More sharing options...
O6opMoT Posted October 25, 2023 Share Posted October 25, 2023 (edited) @P.S.Enot , может активация хвм слетела? Держи ВН8.rar Edited October 25, 2023 by O6opMoT @ Quote Link to comment Short link Share on other sites More sharing options...
P.S.Enot Posted October 25, 2023 Share Posted October 25, 2023 9 минут назад, O6opMoT сказал: @P.S.Enot , может активация хвм слетела? Держи ВН8.rar 5 kB · 0 скачиваний ну у меня эти макросы по чему то не отрабатывает {{py:efficiency.wn8}}, {{py:efficiency.eff}}, не пашет что то @ Quote Link to comment Short link Share on other sites More sharing options...
O6opMoT Posted October 25, 2023 Share Posted October 25, 2023 7 минут назад, P.S.Enot сказал: ну у меня эти макросы по чему то не отрабатывает {{py:efficiency.wn8}}, {{py:efficiency.eff}}, Реплей запустил - все пашет. @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
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.