Skip to main content

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

w3g-1.0.2.tar.gz (26.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: w3g-1.0.2.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for w3g-1.0.2.tar.gz
Algorithm Hash digest
SHA256 38b2420f1f931a02ec9b9d992d9c890e62526070d3b92f3bf3fdfddb25ceb57f
MD5 2879163b8ef916920fe9b38db94119dd
BLAKE2b-256 1c4335a3dee12275f6e49de752fe78e749e2b1d1e71c3c2ed1fceec2380d3a53

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

This release

1.0.2 This release

1 file

1.0.1

1 file

1.0.0

1 file

0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page