Skip to main content

Access Warcraft 3 replay files from Python 2 or 3.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

w3g-1.0.3.tar.gz (26.5 kB view details)

Uploaded Source

File details

Details for the file w3g-1.0.3.tar.gz.

File metadata

  • Download URL: w3g-1.0.3.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200917 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.8

File hashes

Hashes for w3g-1.0.3.tar.gz
Algorithm Hash digest
SHA256 9f78f41b5f01f875ecd140c95163400a59f0e63e0f6d5e2459e78702413e13f2
MD5 108e4b5049d8599a75827a88ff749a92
BLAKE2b-256 0e318e388a25c95b2c4fc9a51043727f58ff85dc007af0d1f8a9ff0505f150a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page