From c36f49555adc4ecf20a36f4b3580233e062b926d Mon Sep 17 00:00:00 2001 From: Jylpah Date: Fri, 10 Jul 2020 20:01:13 +0300 Subject: [PATCH 1/4] Config file support for histogram buckets --- analyze_wotb_replays.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/analyze_wotb_replays.py b/analyze_wotb_replays.py index c0bcabf..8ddd7e1 100644 --- a/analyze_wotb_replays.py +++ b/analyze_wotb_replays.py @@ -550,6 +550,16 @@ async def main(argv): except (KeyError, configparser.NoSectionError) as err: bu.error(exception=err) + try: + if 'ANALYZER' in config.sections(): + configAnalyzer = config['ANALYZER'] + histogram_fields_str = configAnalyzer.get('histogram_buckets', None) + if histogram_fields_str != None: + set_histogram_buckets(json.loads(histogram_fields_str)) + + except (KeyError, configparser.NoSectionError) as err: + bu.error(exception=err) + try: if 'WG' in config.sections(): configWG = config['WG'] @@ -690,6 +700,17 @@ async def main(argv): if wi != None: await wi.close() return None + +def set_histogram_buckets(json: dict): + global histogram_fields + try: + for field in json.keys(): + histogram_fields[field][1] = json[field] + except (KeyError, Exception) as err: + bu.error(exception=err) + return histogram_fields + + def process_player_dist(results: list, player_stats: dict, stat_id_map: dict): """Process player distribution""" hist_stats = dict() From c629c4b2cc01534409e71b4c08e7371356be87f0 Mon Sep 17 00:00:00 2001 From: Jylpah Date: Fri, 10 Jul 2020 20:08:37 +0300 Subject: [PATCH 2/4] Example config for histogram_buckets --- blitzstats.ini.default | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/blitzstats.ini.default b/blitzstats.ini.default index 8793231..bb2c576 100644 --- a/blitzstats.ini.default +++ b/blitzstats.ini.default @@ -1,3 +1,6 @@ +## Configuration file for blitz-tools +## Rename it 'blitzstats.ini' and place it to the same directory with the scripts + [OPTIONS] ## You may set your preferred commandline param defaults here #opt_analyzer_extended = False @@ -5,17 +8,22 @@ #opt_analyzer_stat_func = player [WG] - -## Find your WG account_id : https://developers.wargaming.net/reference/all/wotb/account/list/ -# wg_id = 0 - ## wg_account format: nick@server, where server is either 'eu', 'ru', 'na', 'asia' or 'china'. ## China is not supported since WG API stats are not available there # wg_account = your_nick@eu +## Find your WG account_id : https://developers.wargaming.net/reference/all/wotb/account/list/ +## set either wg_account OR wg_id +# wg_id = 0 + ## WG API limits requests / sec to 10 for mobile apps. ## You can register your "own" server app and ## upgrade the rate limit to 20 requests / sec. ## Check https://developers.wargaming.net/documentation/guide/getting-started/ # wg_app_id = XXXXXXXXXXX +[ANALYZER] +## Define histogram buckets. Valid JSON required. The last field is the maximum, therefore very large. +# histogram_buckets = { "wins" : [ 0, 0.40, 0.5, 0.60, 0.70, 1], +# "damage_dealt" : [ 0, 500, 1000, 1500, 2000, 1000000], +# "battles" : [ 0, 1000, 5000, 10000, 15e3, 1e6 ] } From 63c690c441fd0b5350cefddac1ee7d7169cd461d Mon Sep 17 00:00:00 2001 From: Jylpah Date: Wed, 15 Jul 2020 08:48:20 +0300 Subject: [PATCH 3/4] Update 7.1 added --- releases.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases.md b/releases.md index 572f330..2868819 100644 --- a/releases.md +++ b/releases.md @@ -2,6 +2,7 @@ | Release | Date | Notes | Inaccurate? | |:-------:|:--------:|-------------|-----| +| 7.1 | 2020-07-15 | New Yukon map, IS-6, KV-4, Patton 48 armor buff, Grille DPM buff, SP IC, AMZ 13 75, M41 Bulldog mobility buff | | | 7.0 | 2020-06-17 | British LTs, graphics improvements, ATGM nerf, Sheridan nerf, map fixes | | | 6.10 | 2020-04-29 | T92E1 nerf, Tier V-IX heavy HP buff, Battle Pass, map fixes | | | 6.9 | 2020-03-25 | Japanese TDs, Tier X heavy HP buff | | From 8320c80edba8672434e0481312f4fd71bf11f6a8 Mon Sep 17 00:00:00 2001 From: Jylpah Date: Wed, 15 Jul 2020 16:10:32 +0300 Subject: [PATCH 4/4] Update 7.1 data --- maps.json | 1 + tanks.json | 126 ++++++++++++++++++++++++++++++----------------------- 2 files changed, 73 insertions(+), 54 deletions(-) diff --git a/maps.json b/maps.json index fa0e567..7e32cd6 100644 --- a/maps.json +++ b/maps.json @@ -16,6 +16,7 @@ "grossberg": "Dynasty's Pearl", "himmelsdorf": "Himmelsdorf", "holmeisk": "Wasteland", + "idle": "Yukon", "italy": "Vineyards", "karelia": "Rockfield", "karieri": "Copperfield", diff --git a/tanks.json b/tanks.json index e6a38e7..aff1aa1 100644 --- a/tanks.json +++ b/tanks.json @@ -1,7 +1,7 @@ { "status": "ok", "meta": { - "count": 445 + "count": 447 }, "data": { "1": { @@ -37,12 +37,12 @@ "name": "Type 59" }, "81": { - "tank_id": 81, - "nation": "uk", - "tier": 1, "is_premium": false, - "type": "mediumTank", - "name": "Vickers Medium Mk. I" + "name": "Vickers Medium Mk. I", + "nation": "uk", + "tank_id": 81, + "tier": 1, + "type": "mediumTank" }, "113": { "tank_id": 113, @@ -117,12 +117,12 @@ "name": "Tiger I" }, "545": { - "tank_id": 545, - "nation": "usa", - "tier": 1, "is_premium": false, - "type": "lightTank", - "name": "T1 Cunningham" + "name": "T1 Cunningham", + "nation": "usa", + "tank_id": 545, + "tier": 1, + "type": "lightTank" }, "577": { "tank_id": 577, @@ -418,7 +418,7 @@ "tier": 7, "is_premium": true, "type": "AT-SPG", - "name": "Helsing" + "name": "Helsing H0" }, "1665": { "tank_id": 1665, @@ -757,12 +757,12 @@ "name": "Black Prince" }, "3329": { - "tank_id": 3329, - "nation": "ussr", - "tier": 1, "is_premium": false, - "type": "lightTank", - "name": "MS-1" + "name": "MS-1", + "nation": "ussr", + "tank_id": 3329, + "tier": 1, + "type": "lightTank" }, "3345": { "tank_id": 3345, @@ -872,9 +872,9 @@ "tank_id": 3937, "nation": "japan", "tier": 10, - "is_premium": false, + "is_premium": true, "type": "AT-SPG", - "name": "Ho-Ri Type III" + "name": "Ho-Ri Type 3" }, "3953": { "tank_id": 3953, @@ -3178,7 +3178,7 @@ "tier": 6, "is_premium": true, "type": "heavyTank", - "name": "Tiger Kuromorimine SP" + "name": "Kuro Mori Mine" }, "63601": { "tank_id": 63601, @@ -3186,7 +3186,7 @@ "tier": 7, "is_premium": true, "type": "mediumTank", - "name": "Dracula" + "name": "T6 Dracula" }, "63841": { "tank_id": 63841, @@ -3194,7 +3194,7 @@ "tier": 5, "is_premium": true, "type": "mediumTank", - "name": "Panzer IV Ankou Special" + "name": "Panzer IV Anko Special" }, "64001": { "tank_id": 64001, @@ -3285,12 +3285,12 @@ "name": "IS-6 Fearless" }, "64785": { - "tank_id": 64785, - "nation": "germany", - "tier": 1, "is_premium": false, - "type": "lightTank", - "name": "Pz.Kpfw. II" + "name": "Pz.Kpfw. II", + "nation": "germany", + "tank_id": 64785, + "tier": 2, + "type": "lightTank" }, "64801": { "tank_id": 64801, @@ -3317,20 +3317,20 @@ "name": "MS-1" }, "65041": { - "tank_id": 65041, - "nation": "germany", - "tier": 1, "is_premium": false, - "type": "lightTank", - "name": "Leichttraktor" + "name": "Leichttraktor", + "nation": "germany", + "tank_id": 65041, + "tier": 1, + "type": "lightTank" }, "65057": { - "tank_id": 65057, - "nation": "usa", - "tier": 1, "is_premium": false, - "type": "lightTank", - "name": "T1 Cunningham" + "name": "T1 Cunningham", + "nation": "usa", + "tank_id": 65057, + "tier": 1, + "type": "lightTank" }, "65105": { "tank_id": 65105, @@ -3341,20 +3341,20 @@ "name": "Vickers Medium Mk. I" }, "65281": { - "tank_id": 65281, - "nation": "ussr", - "tier": 1, "is_premium": false, - "type": "lightTank", - "name": "MS-1" + "name": "MS-1", + "nation": "ussr", + "tank_id": 65281, + "tier": 1, + "type": "lightTank" }, "65297": { - "tank_id": 65297, - "nation": "germany", - "tier": 1, "is_premium": false, - "type": "lightTank", - "name": "Leichttraktor" + "name": "Leichttraktor", + "nation": "germany", + "tank_id": 65297, + "tier": 1, + "type": "lightTank" }, "65313": { "tank_id": 65313, @@ -3373,12 +3373,12 @@ "name": "Type 62" }, "65361": { - "tank_id": 65361, - "nation": "uk", - "tier": 1, "is_premium": false, - "type": "mediumTank", - "name": "Vickers Medium Mk. I" + "name": "Vickers Medium Mk. I", + "nation": "uk", + "tank_id": 65361, + "tier": 1, + "type": "mediumTank" }, "65377": { "tank_id": 65377, @@ -3432,7 +3432,7 @@ "tank_id": 19537, "nation": "uk", "tier": 10, - "is_premium": false, + "is_premium": true, "type": "lightTank", "name": "Vickers Light 105" }, @@ -3563,6 +3563,22 @@ "is_premium": true, "type": "heavyTank", "name": "T-2020" + }, + "20305": { + "tank_id": 20305, + "nation": "uk", + "tier": 8, + "is_premium": true, + "type": "mediumTank", + "name": "Centurion Mk. 5/1 RAAC" + }, + "21505": { + "tank_id": 21505, + "nation": "ussr", + "tier": 7, + "is_premium": true, + "type": "mediumTank", + "name": "T-44-85" } }, "userStr": { @@ -3996,6 +4012,8 @@ "It10_P43_BD": "P.43/06 anniversario", "R63_ST_IBD": "T-2020", "S16_Kranvagn": "Kranvagn", - "S25_EMIL_51": "EMIL 1951" + "S25_EMIL_51": "EMIL 1951", + "GB94_Centurion_Mk5-1_RAAC": "Centurion Mk. 5/1 RAAC", + "R98_T44_85": "T-44-85" } } \ No newline at end of file