Giter Club home page Giter Club logo

therecentstatofyou's Introduction

Python 2.7.7 Build status

Русский read in English

The Recent Stat of You

Мод с открытым исходным кодом для отображения недавней статистики игроков в бою.

Суть

Главное отличие этого мода от аналогичных — это возможность отображения обещающего быть более информативным недавнего рейтинга эффективности (примерно за последнюю тысячу боев, то есть примерно за последние 50 часов игрового времени). В остальном это все тот же мод, который Вы видели у XVM, PolarFox и Ekspoint.

Мод позволяет отображать недавнюю статистику игроков в следующих местах:

  • В окне загрузки боя.
  • В ушах.
  • В маркерах над техникой.
  • В таблице игроков при нажатии Tab.

Как это выглядит

На данный момент показ статистики достигается переименованием игроков: к имени добавляется префикс. Префикс настраивается в файле конфигурации.

Также присутствует возможность заменять нашивки – на данный момент есть два варианта:

  • Цвет XWN8 (по умолчанию).
  • Цвет команды в Битве Блогеров 2020.

Окно загрузки

Аналогично таблице игроков при нажатии Tab. recent-stat-battle-loading

Уши

recent-stat-players-panel

Маркеры

recent-stat-markers

Как это работает

Мод обращается к провайдерам недавней статистики, и если она находится, выводит ее вместо общей статистики.

Данные берутся с сайтов kttc.ru (разрешение на использование от представителя сайта получено) и noobmeter.com (связаться с представителем сайта не удалось, поэтому пока считаем, что запрета на использование сайта нет).

Внести вклад

Открытие Pull Request'ов, решающих как планируемые задачи, так и любые другие, приветствуется. Любые идеи по развитию также с радостью будут услышаны, Вы можете оставить свои вопросы и предложения во вкладке "Issues".

В ближайшее время я не планирую улучшать мод, ведь у меня есть другие проекты. Сам использую мод в текущем состоянии, и это меня устраивает.

Далекие планы

во вкладке "Issues".

Скачивание

во вкладке "Releases".

Установка

Положите файлы .wotmod в папку mods/{версия_игры}/. Для смены стандартных настроек мода скачайте папку configs и положите ее в папку mods/.

Построение из исходников

Запустите файл build.py, мод соберется в папке build/.

Для сборки мода иконок запустите badgesModifier/battleBadgesModifier.py, сохраните полученный в папке target файл PNG как файл DDS, запустите badgesModifier/build.py, мод иконок соберется в папке badgesModifier/build/.

Известные проблемы

  • Если использовать возможность показа недавней статистики, то на экране загрузки боя можно заметить подвисание от трех до десяти секунд, связанное со скачиванием относительно большого объема данных с сайта провайдера недавней статистики. Починить это вряд ли возможно: скорость загрузки ограничена скоростью сайта-провайдера.
  • Клиент иногда пишет в лог, что не может найти ник игрока и поэтому использует более медленный вариант поиска. Наверное, это связано с тем, что мод фактически переименовывает игроков. Пока видимых симптомов в клиенте игры не замечено. Но с обновлением клиента это может стать причиной вылетов, если не полной неработоспособности...

FAQ

Q. Новая версия Танков, а мод не адаптирован. Автор признаков жизни не подает. Моду конец?
A. Посмотрите файлы, изменяемые модом, в файле mod_recent_stat_init.py. Найдите те же файлы в репозитории декомпилированных файлов танкового клиента WorldOfTanks-Decompiled. Если они не менялись с новым патчем, то мод скорее всего будет работать в новой версии, необходимо только переложить его в папку с номером новой версии (по крайней мере, при обновлении с 1.1 на 1.2 код мода модифицировать не пришлось).

Q. На каком кластере работает мод?
A. Мод должен работать на любых кластерах. Попробуйте поменять регион в конфиге config_main.json.

Q. Как поменять провайдера недавней статистики или полностью отключить возможность показа недавней статы?
A. В конфиге config_main.json.

Q. Как полностью отключить показ статистики, но оставить информацию о блогерах?
A. В config_main.json выберите "badgeType": "bob2020TeamColor" и в config_format.json выберите "playerName": "".

Благодарности

ATTRIBUTIONS.MD.

English

The Recent Stat of You

An open-source mod displaying players' recent statistics in battle.

Idea

The main difference of this mod from similar is the ability to display more informative recent efficiency rating (approximately of the last thousand battles, that is, of the last 50 hours of playing time). Otherwise, this is the same mod that you saw from XVM, PolarFox and, Ekspoint.

The mod allows displaying statistics in the following places:

  • On the battle loading screen.
  • On the battle players panel.
  • In markers.
  • On the Tab players panel.

How does it look like?

Currently, statistics are displayed using players renaming: a prefix is added to the name. The prefix can be configured in the configuration file.

Also, there is an opportunity to modify badges – currently, two variants are available:

  • XWN8 color (default).
  • Team color in Battle of Bloggers 2020.

Battle loading screen

Equal to the Tab players panel. recent-stat-battle-loading

Battle players panel

recent-stat-players-panel

Markers

recent-stat-markers

How does it work?

Mod asks the providers of recent statistics, and if there is an answer, it displays recent stats instead of overall statistics.

Data is taken from kttc.ru (permission is granted) и noobmeter.com (I couldn't contact the site developers, so I assume there is no prohibition to use the site).

Contribute

Pull request opening to resolve planning tasks or any other tasks is appreciated. Any ideas on development will also be happy to be heard, you can leave your questions and suggestions in the "Issues" tab.

In the near future, I do not plan to improve the mod, because I have other projects. I use the mod in the current state, and it suits me.

Planing tasks

are located in the "Issues" tab.

Downloads

are located in the "Releases" tab.

Installation

Place the .wotmod files into mods/{game_version}/. To change default mod settings, download the configs dir and place it into mods/.

Build from sources

Run the build.py file, the mod will be built in the build/ dir.

To build badges modification, run the badgesModifier/battleBadgesModifier.py file, save the PNG file from target dir as a DDS file, run the badgesModifier/build.py file, the badges modification will be built in the badgesModifier/build/ dir.

Known issues

  • If you use the recent stat feature, at a battle loading start you can notice a lag of 3-10 seconds. It's because of the relatively big amount of data downloading from the Internet. I think there is no possible fix because speed is restricted by the provider.
  • Sometimes there are messages in the log like "can't find player name, use slow search". Maybe it's because the mod just renames players. There are no symptoms have been noticed. Anyway, in future game versions, it can become a problem...

FAQ

Q. The mod isn't adopted for a new World of Tanks version. A. Check mod_recent_stat_init.py for the list of modified files. Find the same files in the game decompiled sources WorldOfTanks-Decompiled. If they haven't been changed, it's likely the mod will work. It's only needed to put the mod in the new dir. For example, the mod was working after an update from 1.1 to 1.2.

Q. Which clusters are supported?
A. All clusters should be supported. Try to change it in config_main.json.

Q. How to change providers of recent stat or completely disable the recent stat feature?
A. In config_main.json.

Q. How to completely disable statistics, but leave info about bloggers?
A. In config_main.json choose "badgeType": "bob2020TeamColor" and in config_format.json choose "playerName": "".

Attributions

ATTRIBUTIONS.MD.

therecentstatofyou's People

Contributors

servb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

therecentstatofyou's Issues

Automate DDS modifier

Now need to convert PNG to DDS via Photoshop or else manually. It will be great to automate the process.

Set recent battle count in config

For now the number of recent battles is fixed (1000).

Add a feature to specify this number in config_main.

Recent stat providers have multiple recent battle stats so the mod has to check all these values and choose the most proper.

Colorize stats

Now when adding an HTML tag to format config (for example, <font> for color) player panels don't work properly. They don't show some players or even all players. Also, markers can disappear.

Maybe it's only because now the scope of rename is too wide. player_format renames players everywhere. So the issue can be resolved simply by the issue #11.

Архив .wotmod

Разобраться, как паковать мод в архив .wotmod. Стоит изучить #1 и #2. Видимо, это еще уберет перезапись файлов игры.

Add tests

To use CI not only for builds.

Many nicknames are required.

Settings in hangar

I've seen mods having settings right in the hangar (there is a button in the bottom right corner of the screen).

Implement the same feature.

Stats in achievements

Show stats on the achievements page. This will help not only to see your own stats without entering battle but also to see other players' stats (especially when accepting a player to your clan).

Also the feature to visit recent stats provider web page by click is needed (but it can be implemented in another time).

Victory chances

Show victory chances (by player efficiency ratings, by vehicles).

Поддержка файла конфигурации

Например:

в файле mod_recent_stat.json:

  • регион,
  • провайдер статы,
  • User-Agent для запросов,
  • файл конфигурации стилей;

а еще пара стандартных стилевых файлов вроде

  • mod_recent_stat_style_default_recent.json (для показа недавней статы, если есть),
  • mod_recent_stat_style_default_overall.json (для показа только общей статы).

Идея такая, что стилевые файлы создаются и выкладываются в открытый доступ, а вот основной файл модифицирует сам пользователь, если хочет.

Allow game loading when modxvm site is unavailable

It seems that when https://static.modxvm.com/wn8-data-exp/json/wn8exp.json is not working, the mod crashes the game on load.

Need to fix the behavior.

Log:

2020-01-24 14:57:26.954: INFO: [--- The Recent Stat of You vvv]
2020-01-24 14:57:26.954: INFO: Mod initialization is started.
2020-01-24 14:57:26.954: INFO: [--- The Recent Stat of You ^^^]
2020-01-24 14:57:26.954: INFO: [--- The Recent Stat of You vvv]
2020-01-24 14:57:26.954: INFO: Mod loading is started.
2020-01-24 14:57:26.954: INFO: [--- The Recent Stat of You ^^^]
2020-01-24 14:57:30.229: ERROR: [EXCEPTION] (scripts/client/game.py, 202):
Traceback (most recent call last):
  File "scripts/client/gui/mods/mod_recent_stat_network.pyc", line 33, in getRawSiteText
HTTPError: HTTP Error 503: Service Unavailable

Don't rename players in `player_format`

Change the method of stats displaying.

It's needed to find ways to change players' names and tank names in:

  • player panels,
  • Tab screen,
  • battle loading screen,
  • markers.

Client crashes

With update 1.2.0.2 something became wrong.

Here is a log:

2018-11-30 19:55:21.100: INFO: [--- The Recent Stat of You vvv]
2018-11-30 19:55:21.100: INFO: Vehicle info task count: 0.
2018-11-30 19:55:21.100: INFO: [--- The Recent Stat of You ^^^]
2018-11-30 19:55:21.100: INFO: [--- The Recent Stat of You vvv]
2018-11-30 19:55:21.100: INFO: Tasks are joined.
2018-11-30 19:55:21.100: INFO: [--- The Recent Stat of You ^^^]
2018-11-30 19:55:21.100: INFO: [--- The Recent Stat of You vvv]
2018-11-30 19:55:21.100: INFO: Stats loaded in 0 ms. With stats: 0, with recent stats: 0, without stats: 0.
2018-11-30 19:55:21.100: INFO: [--- The Recent Stat of You ^^^]
2018-11-30 19:55:21.105: INFO: [gui.battle_control.arena_info.arena_dp] Player's team not found.
2018-11-30 19:55:21.105: INFO: [gui.battle_control.arena_info.arena_dp] Player's vehicle ID not found.
2018-11-30 19:55:21.105: INFO: [gui.battle_control.arena_info.arena_dp] Uses slow player search by name
2018-11-30 19:55:21.105: INFO: [gui.battle_control.arena_info.arena_dp] Player's team not found.
2018-11-30 19:55:21.106: INFO: [gui.battle_control.arena_info.arena_dp] Player's vehicle ID not found.
2018-11-30 19:55:21.106: INFO: [gui.battle_control.arena_info.arena_dp] Uses slow player search by name
2018-11-30 19:55:21.106: INFO: [gui.battle_control.arena_info.arena_dp] Player's team not found.
2018-11-30 19:55:21.106: INFO: [gui.battle_control.arena_info.arena_dp] Player's vehicle ID not found.
2018-11-30 19:55:21.106: INFO: [gui.battle_control.arena_info.arena_dp] Uses slow player search by name
2018-11-30 19:55:21.106: INFO: [gui.battle_control.arena_info.arena_dp] Player's team not found.
2018-11-30 19:55:21.106: INFO: [gui.battle_control.arena_info.arena_dp] Player's vehicle ID not found.
2018-11-30 19:55:21.106: INFO: [gui.battle_control.arena_info.arena_dp] Uses slow player search by name
2018-11-30 19:55:21.106: INFO: [gui.battle_control.arena_info.arena_dp] Player's team not found.
2018-11-30 19:55:21.107: INFO: [gui.battle_control.arena_info.arena_dp] Player's vehicle ID not found.
2018-11-30 19:55:21.107: INFO: [gui.battle_control.arena_info.arena_dp] Uses slow player search by name
2018-11-30 19:55:21.107: INFO: [gui.battle_control.arena_info.arena_dp] Player's team not found.
2018-11-30 19:55:21.107: INFO: [gui.battle_control.arena_info.arena_dp] Player's vehicle ID not found.
2018-11-30 19:55:21.107: INFO: [gui.battle_control.arena_info.arena_dp] Uses slow player search by name
2018-11-30 19:55:21.108: INFO: [gui.Scaleform.app_factory] Creating app: scaleform/battle
2018-11-30 19:55:22.915: ERROR: [EXCEPTION] (scripts/common/Event.py, 46):
Traceback (most recent call last):
  File "scripts/common/Event.py", line 44, in __call__
  File "scripts/client/gui/battle_control/arena_info/listeners.py", line 175, in __arena_onNewVehicleListReceived
  File "./src/scripts/client/gui/mods/mod_recent_stat_init.py", line 18, in buildVehiclesDataNew
  File "./src/scripts/client/gui/mods/mod_recent_stat_loader.py", line 50, in loadPlayerDataByVehicleList
  File "./src/scripts/client/gui/mods/mod_recent_stat_wg_stats.py", line 83, in loadPlayerDataByVehicleList
TypeError: argument of type 'NoneType' is not iterable

2018-11-30 19:55:22.915: ERROR: Traceback (most recent call last):
2018-11-30 19:55:22.915: ERROR:   File "scripts/client/Avatar.py", line 2177, in updateArena
2018-11-30 19:55:22.915: ERROR:   File "scripts/client_common/ClientArena.py", line 281, in update
2018-11-30 19:55:22.915: ERROR:   File "scripts/client_common/ClientArena.py", line 373, in __onVehicleListUpdate
2018-11-30 19:55:22.916: ERROR:   File "scripts/common/Event.py", line 44, in __call__
2018-11-30 19:55:22.916: ERROR:   File "scripts/client/gui/battle_control/arena_info/listeners.py", line 175, in __arena_onNewVehicleListReceived
2018-11-30 19:55:22.916: ERROR:   File "./src/scripts/client/gui/mods/mod_recent_stat_init.py", line 18, in buildVehiclesDataNew
2018-11-30 19:55:22.916: ERROR:   File "./src/scripts/client/gui/mods/mod_recent_stat_loader.py", line 50, in loadPlayerDataByVehicleList
2018-11-30 19:55:22.916: ERROR:   File "./src/scripts/client/gui/mods/mod_recent_stat_wg_stats.py", line 83, in loadPlayerDataByVehicleList
2018-11-30 19:55:22.916: ERROR: TypeError: argument of type 'NoneType' is not iterable
2018-11-30 19:55:23.078: NOTICE: [NOTE] (scripts/client/game.py, 477): [SPACE] Loading space: spaces/07_lakeville
2018-11-30 19:55:23.197: INFO: [gui.app_loader.loader] Space is changed: LoginSpace() -> BattleLoadingSpace()
2018-11-30 19:55:23.198: INFO: [gui.Scaleform.app_factory] Destroying app: scaleform/lobby
2018-11-30 19:55:23.210: INFO: [gui.app_loader.loader] App is destroyed: scaleform/lobby
2018-11-30 19:55:23.357: INFO: [gui.app_loader.loader] App is initializing: scaleform/battle
2018-11-30 19:55:23.576: INFO: [gui.app_loader.loader] App is initialized: scaleform/battle
2018-11-30 19:55:24.316: ERROR: Traceback (most recent call last):
2018-11-30 19:55:24.316: ERROR:   File "scripts/client/gui/Scaleform/framework/entities/BaseDAAPIComponent.py", line 76, in registerFlashComponent
2018-11-30 19:55:24.316: ERROR:   File "scripts/client/gui/Scaleform/framework/entities/DisposableEntity.py", line 63, in create
2018-11-30 19:55:24.316: ERROR:   File "scripts/client/gui/Scaleform/daapi/view/battle/shared/battle_loading.py", line 68, in _populate
2018-11-30 19:55:24.316: ERROR:   File "scripts/client/gui/battle_control/battle_session.py", line 199, in addArenaCtrl
2018-11-30 19:55:24.316: ERROR:   File "scripts/client/gui/battle_control/arena_info/listeners.py", line 776, in addController
2018-11-30 19:55:24.316: ERROR:   File "scripts/client/gui/battle_control/arena_info/listeners.py", line 165, in addController
2018-11-30 19:55:24.316: ERROR:   File "scripts/client/gui/Scaleform/daapi/view/battle/shared/battle_loading.py", line 59, in invalidateArenaInfo
2018-11-30 19:55:24.316: ERROR:   File "scripts/client/gui/Scaleform/daapi/view/battle/shared/battle_loading.py", line 94, in _setTipsInfo
2018-11-30 19:55:24.316: ERROR:   File "scripts/client/gui/battle_control/arena_info/arena_vos.py", line 572, in getTypeInfo
2018-11-30 19:55:24.316: ERROR: IndexError: tuple index out of range
2018-11-30 19:55:24.403: INFO: [gui.app_loader.loader] Space is updated: BattleLoadingSpace()
2018-11-30 19:55:24.462: INFO: [WL] Whitelist from web set to empty
2018-11-30 19:55:27.811: ERROR: [gui.battle_control.controllers.quest_progress.quest_progress_ctrl] Storage for quest:pm2_5_1_1 is not found.
2018-11-30 19:55:29.903: INFO: [gui.app_loader.loader] Space is changed: BattleLoadingSpace() -> BattleSpace()
2018-11-30 19:55:40.465: ERROR: [EXCEPTION] (scripts/common/Event.py, 46):
Traceback (most recent call last):
  File "scripts/common/Event.py", line 44, in __call__
  File "scripts/client/gui/battle_control/arena_info/listeners.py", line 229, in __arena_onAvatarReady
  File "scripts/client/gui/battle_control/arena_info/arena_dp.py", line 162, in updateVehicleStatus
KeyError: 8978250

2018-11-30 19:55:40.465: ERROR: Traceback (most recent call last):
2018-11-30 19:55:40.465: ERROR:   File "scripts/client/Avatar.py", line 2177, in updateArena
2018-11-30 19:55:40.465: ERROR:   File "scripts/client_common/ClientArena.py", line 281, in update
2018-11-30 19:55:40.465: ERROR:   File "scripts/client_common/ClientArena.py", line 458, in __onAvatarReady
2018-11-30 19:55:40.465: ERROR:   File "scripts/common/Event.py", line 44, in __call__
2018-11-30 19:55:40.465: ERROR:   File "scripts/client/gui/battle_control/arena_info/listeners.py", line 229, in __arena_onAvatarReady
2018-11-30 19:55:40.465: ERROR:   File "scripts/client/gui/battle_control/arena_info/arena_dp.py", line 162, in updateVehicleStatus
2018-11-30 19:55:40.465: ERROR: KeyError: 8978250
2018-11-30 19:55:57.766: ERROR: [EXCEPTION] (scripts/common/Event.py, 46):
Traceback (most recent call last):
  File "scripts/common/Event.py", line 44, in __call__
  File "scripts/client/gui/battle_control/arena_info/listeners.py", line 209, in __arena_onVehicleKilled
  File "scripts/client/gui/battle_control/arena_info/arena_dp.py", line 162, in updateVehicleStatus
KeyError: 8978223

2018-11-30 19:55:57.767: ERROR: Traceback (most recent call last):
2018-11-30 19:55:57.767: ERROR:   File "scripts/client/Avatar.py", line 2177, in updateArena
2018-11-30 19:55:57.767: ERROR:   File "scripts/client_common/ClientArena.py", line 281, in update
2018-11-30 19:55:57.767: ERROR:   File "scripts/client_common/ClientArena.py", line 448, in __onVehicleKilled
2018-11-30 19:55:57.767: ERROR:   File "scripts/common/Event.py", line 44, in __call__
2018-11-30 19:55:57.767: ERROR:   File "scripts/client/gui/battle_control/arena_info/listeners.py", line 209, in __arena_onVehicleKilled
2018-11-30 19:55:57.767: ERROR:   File "scripts/client/gui/battle_control/arena_info/arena_dp.py", line 162, in updateVehicleStatus
2018-11-30 19:55:57.767: ERROR: KeyError: 8978223

KeyError: 8978223: as far as I understand this player ID doesn't exist...

Add configs dir in release assets

Now config dir is relatively hard to download.

I think a zip with mods/configs/io.github.servb.recent_stat dir should be provided in release assets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.