Go to file
2023-04-15 11:42:58 +10:00
.gitignore add bot 2023-04-07 10:10:49 +10:00
bot.py fix db name 2023-04-10 10:05:53 +10:00
facts.txt leaguefacts 2023-04-15 11:42:58 +10:00
flake.lock initial commit 2023-03-26 18:47:11 +11:00
flake.nix add bot 2023-04-07 10:10:49 +10:00
games.txt add game 5.3 2023-04-09 13:05:30 +10:00
index.py move main file 2023-04-07 10:10:49 +10:00
README.md move main file 2023-04-07 10:10:49 +10:00
teams.json add HHIRLLL S3 teams 2023-04-02 17:26:11 +10:00

Holy Heck I Really Like Stats

Pokemon Showdown data processing, mostly for HHIRLLL's Pokemon league. Ugly as fuck.

Requirements

  • Python with sqlite
  • requests

Usage

$ ./index.py -h
usage: hhirlstats [-h] [-v] [-C] [-t FILE] [-o FILE] replay [replay ...]

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)
  -t FILE, --teams FILE
                        JSON file defining players to teams (default: teams.json)
  -o FILE, --output FILE
                        output data file (default: data.db)

Replay files are cached after they're downloaded for the first time save issuing requests to Showdown on every new run.

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.

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