detailed-cod-tracker/README.md

135 lines
5.8 KiB
Markdown
Raw Normal View History

2023-10-03 01:50:06 -04:00
# Modern Warfare 2019 Detailed Statistic Tracker
2023-10-14 04:35:12 -04:00
Tired of visiting [cod.tracker.gg](https://cod.tracker.gg/modern-warfare) to check your player stats? With this repository, you'll never have to visit that site again.
2023-10-03 01:50:06 -04:00
2023-10-14 04:35:12 -04:00
Get every single statistic Call of Duty <u>***tracks***</u> in one place, under a minute!
2023-10-03 01:50:06 -04:00
2023-10-14 04:05:49 -04:00
> To see an example, look in `/examples/`
2023-10-14 04:01:41 -04:00
## Table of Contents
2023-10-14 04:05:49 -04:00
- [**Features**](#features)
2023-10-14 04:01:41 -04:00
- [**Prerequisites**](#prerequisites)
2023-10-14 04:05:49 -04:00
- [**Installation**](#installation)
2023-10-14 04:01:41 -04:00
- [**Obtaining your ACT\_SSO\_COOKIE**](#obtaining-your-act_sso_cookie)
- [**Command Line Arguments**](#command-line-arguments)
- [**Sorting**](#sorting)
2023-10-03 01:50:06 -04:00
2023-10-14 04:01:41 -04:00
## Features
- Instantly download detailed statistics for any player, including ***Lifetime Statistics***, ***Match Statistics*** and ***season_loot***
- Download a list of all maps and game modes in current rotation
- Convert match start times, end times, and duration to human readable formats
- [**Sort**](#sorting) your statistics even better than the in-game Barracks does!
- Split detailed match data into separate files from most recent to least recent for easy viewing
- Convert all code names for weapons, killstreaks, equipment, etc. to human-readable strings
## Prerequisites
2023-10-03 05:44:39 -04:00
- Call of Duty Account
- Account API security settings set to open
2023-10-14 04:01:41 -04:00
- `Python 3.x` *(optional)*
- A Web Browser *(Tested with Chromium)*
2023-10-08 07:23:50 -04:00
- ~~[Curl](https://curl.se/download.html) ***(Installed by default on Windows)***~~
2023-10-14 04:01:41 -04:00
## Installation
#### Using the Latest Release **(EASIEST)**
- Navigate to the latest release and download `get_cod_stats.exe`
- Open a command line of your choise, navigate to the directory using `cd` and follow examples below
2023-10-14 04:35:12 -04:00
```
cd "C:\Users\John\Desktop\detailed-cod-tracker"
get_cod_stats.exe [-h] -p PLAYER_NAME [-a] [-sl] [-i] [-m] [-c] [-sm] [-csd] [-cmd]
```
2023-10-14 04:01:41 -04:00
#### Cloning the Repository
2023-10-14 04:13:23 -04:00
- Download the ZIP archive or clone the repository `git clone https://github.com/Ahrimdon/detailed-cod-tracker.git && cd detailed-cod-tracker`
2023-10-14 04:01:41 -04:00
- Run the setup using the command `python setup.py`.
## Obtaining your ACT_SSO_COOKIE
- Go to https://www.callofduty.com and login with your account
2023-10-14 05:06:47 -04:00
- Once logged in, press `F12` for your browsers developer tools. Then go to Application --> Storage -->
2023-10-14 05:06:09 -04:00
2023-10-14 05:06:47 -04:00
Cookies --> https://www.callofduty.com/ --> ACT_SSO_COOKIE
2023-10-14 04:01:41 -04:00
- Enter the value when prompted
2023-12-25 05:50:26 -05:00
## Obtaining your userInfo.json (Develop Branch ONLY)
- For some reason, Activision broke the userInfo API URL which in turn, broke the API Wrapper's logic to obtain certain user information. Unfortunately, this also means we also cannot use Curl. Follow the steps below if you wish to obtain General Info, friendFeed, eventFeed, Cod Point Balance, Connected Accounts, and Account Settings.
- This feature is only available on the `develop` branch.
1. Clone the repository, `git clone https://github.com/Ahrimdon/detailed-cod-tracker.git && cd detailed-cod-tracker`
2. Run the setup using `python setup.py`
3. Switch to the `develop` branch using `git checkout develop`
4. Obtain your [*ACT_SSO_COOKIE*](#obtaining-your-act_sso_cookie)
5. Go to `https://profile.callofduty.com/cod/userInfo/{ACT_SSO_COOKIE}` and copy the contents into `userInfo.json` in the repo's directory
> *Note:* Create the `userInfo.json` file manually
6. In the newly created `userInfo.json`, delete "*userInfo(*" and "*);*" at the beginning and end of the file. Alternatively, you can find and replace using the regular expression inside `clean_userInfo_regex.txt`
7. Run `get_cod_stats.py` using the `-a` argument (e.g. `python get_cod_stats.py -p Ahrimdon -a`)
If done correctly, this should return the extra API information.
2023-10-14 04:01:41 -04:00
## Command Line Arguments
2023-10-08 07:23:50 -04:00
```
usage: get_cod_stats.py [-h] [-p PLAYER_NAME] [-a] [-sl] [-id] [-m] [-i] [-f] [-e] [-cp] [-ca] [-s] [-c] [-sm] [-csd] [-cmd] [-cff] [-cef]
2023-10-14 04:01:41 -04:00
Detailed Modern Warfare (2019) Statistics Tool
2023-10-08 07:23:50 -04:00
optional arguments:
-h, --help show this help message and exit
2023-10-14 04:01:41 -04:00
Data Fetching Options:
-p PLAYER_NAME, --player_name PLAYER_NAME
2023-10-08 07:23:50 -04:00
Player's username (with #1234567)
2023-10-14 04:01:41 -04:00
-a, --all_stats Fetch all the different types of stats data
-sl, --season_loot Fetch only the season loot data
-id, --identities Fetch only the logged-in identities data
2023-10-14 04:01:41 -04:00
-m, --maps Fetch only the map list data
-i, --info Fetch only general information
-f, --friendFeed Fetch only your friend feed
-e, --eventFeed Fetch only your event feed
-cp, --cod_points Fetch only your COD Point balance
-ca, --connected_accounts
Fetch only the map list data
-s, --settings Fetch only your account settings
2023-10-14 04:01:41 -04:00
Data Cleaning Options:
-c, --clean Beautify all data
-sm, --split_matches Split the matches into separate JSON files within the 'matches' subfolder
-csd, --clean_stats_data
Beautify the data and convert to human-readable strings in stats.json
-cmd, --clean_match_data
Beautify the match data and convert to human-readable strings in match_info.json
-cff, --clean_friend_feed
Clean the friend feed data
-cef, --clean_event_feed
Clean the event feed data
2023-10-08 07:23:50 -04:00
```
2023-10-03 05:44:39 -04:00
2023-10-14 04:01:41 -04:00
## Command Examples
**Gather Player's Lifetime Statistics & 20 Recent Games**
```
get_cod_stats.exe -p Ahrimdon#1234567
```
**Sort, clean, and organize all data**
```
get_cod_stats.exe -c
```
**Split matches into separate files**
```
get_cod_stats.exe -sm
```
**Gather all data**
```
get_cod_stats.exe -p Ahrimdon#1234567 -a
```
2023-10-14 04:05:49 -04:00
2023-10-14 04:01:41 -04:00
> All data is saved to `/stats/`
2023-10-03 05:44:39 -04:00
2023-10-14 04:01:41 -04:00
## Sorting
2023-10-03 05:44:39 -04:00
* Game Modes are sorted by *Time Played* in descending order
* Weapons are sorted by *Kills* in descending order
* Field Upgrades are sorted by *Uses* in descending order
* Lethal and Tactical equipment are sorted by *Uses* in descending order
* Lethal and Support Scorestreaks by *Times Awarded* in descending order
2023-10-14 04:05:49 -04:00
* Accolades sorted in descending order