This is a single module package that contains everything that is needed to read in the Warcraft 3 replay file format *.w3g. W3G is a custom binary format. The benefits of this are that the files are small, even for very long games. The downside is that for them to be meaningfully a lot of extra data needs to be provided (as is done here for you) for these files to be meaningfully deciphered.
The replays basically amount to a bunch of metadata (map, players, etc) and a big event list. The file parser here provides you with access to this data as well as some post-processed metrics, such as actions-per-minute (APM).
The API should be easy to use and figure out. Classes and attributes are named in a sane way. Here is an example of usage:
import w3g
f = w3g.File('replay.w3g')
winner = f.winner()
print(winner)
f.print_apm()
You can also use this file in script mode to print out the entire game and its stats:
$ ./w3g.py replay.w3g
If you have any questions or issues, please email me or leave an issue on the issue tracker.
/scopzout
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file w3g-0.1.tar.gz.
File metadata
- Download URL: w3g-0.1.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14ef035ee74e14a8f247222700db75e91d06797926de454d242c88cfbcbc0fe4
|
|
| MD5 |
133aaf95f16653b8a53be777df888e2f
|
|
| BLAKE2b-256 |
81a673306baad1dd56a3a09297cc1701c59eefe8bca1313548fd8467e4a0f070
|