holy-heck-i-really-like-stats/README.md

56 lines
1.8 KiB
Markdown
Raw Normal View History

2023-03-26 18:47:11 +11:00
# Holy Heck I Really Like Stats
Pokemon Showdown data processing, mostly for HHIRLLL's Pokemon league. Ugly as
fuck.
2023-03-26 18:52:26 +11:00
2023-04-27 10:41:28 +10:00
Also includes a bot to automate replay ingestion and provide misc utilities.
2023-03-26 18:52:26 +11:00
## Requirements
- Python with sqlite
- requests
## Usage
```sh
2023-04-07 09:16:15 +10:00
$ ./index.py -h
usage: hhirlstats [-h] [-v] [-C] [-t FILE] [-o FILE] replay [replay ...]
2023-03-28 00:24:28 +11:00
extracts stats from a Showdown replay
positional arguments:
replay replay ID or URL
options:
-h, --help show this help message and exit
-v, --verbose add debugging info (default: None)
-C, --no-cache fetch replays instead of using cache (default: False)
2023-04-07 09:16:15 +10:00
-t FILE, --teams FILE
JSON file defining players to teams (default: teams.json)
2023-03-28 00:24:28 +11:00
-o FILE, --output FILE
output data file (default: data.db)
2023-03-26 18:52:26 +11:00
```
2023-03-28 00:24:28 +11:00
Replay files are cached after they're downloaded for the first time save issuing
requests to Showdown on every new run.
2023-03-26 18:52:26 +11:00
2023-03-28 00:24:28 +11:00
Run the program once with all your replays (or once for each replay), then run
whatever SQL queries against the data file (default `data.db`) you want.
2023-03-26 20:08:45 +11:00
## Future work
- include timestamps in logs to correlate KOs with the mon that KOed
- calculate gametime based on active turns rather than moves used
- also solves the issue where paralyzed/confused turns are not counted
2023-04-27 10:41:28 +10:00
- use asyncio in bot
2023-05-21 22:20:11 +10:00
- allow for entering unplayed forfeits
- easy correction of game drift (e.g., two games played for a single team in a week)
- collect stats on teras and megas
- inline common queries into the base database as views
- channel filtering for replay collection
- move/damage tracking:
- delayed damage (Future Sight and co)
- self-damage misattribution (Belly Drum, possibly Explosion)
- indirect status (Toxic Spikes)
- weather?