No description or website provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 9c33f49 Nov 25, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples add examples Oct 5, 2017
mgz small bugfix Nov 25, 2018
util add header extraction util Oct 8, 2017
.gitignore construct 2.8, py 3 Oct 4, 2017
LICENSE update structure, indent, construct Sep 4, 2016
Makefile add map Oct 5, 2017
README.md construct 2.8, py 3 Oct 4, 2017
pylintrc add map Oct 5, 2017
setup.py small bugfix Nov 25, 2018
tox.ini fix up15 restore Nov 26, 2017

README.md

mgz

AoC MGZ parsing in Python 3.

Usage

  • header.parse_stream(file)
  • Loop: body.command.parse_stream(file)
  • Handle your own buffering

Caveats

  • Parses only portions useful for multiplayer recorded game analysis
  • UserPatch 1.4, 1.5 only

Dependencies

Improvements Needed

  • Parse objects fully (units, buildings, etc)
  • Enum expansion
  • Support for previous versions
  • Resolve unknown bytes

Contribution

  • Pull requests & patches welcome

Resources

Output

General format of the file, noting interesting parts.

  • Header
    • Version
    • AI
    • Record properties
      • Speed
      • Number of players
      • View of
    • Map
      • Size
      • Tiles
    • State
      • Start time
      • Players[]
        • Name
        • Diplomacy
        • Civilization
        • Color
        • Camera
        • Objects[]
          • Type
          • ID
          • Position
    • Achievements[]
    • Scenario
      • Instructions
      • Victory condition
      • Map type
      • Difficulty
      • Triggers
    • Lobby
      • Teams
      • Reveal map
      • Population limit
      • Game type
      • Lock diplomacy
      • Pre-game chat
  • Body
    • Commands[]
      • Sync, Message, or Action