Minimap generator for Age of Empires 2 savegames.
Version 1.2
- Fixed a crash on all modern recorded games (RMS/skirmish/ranked)-
- Fixed missing terrain on some maps by pulling the terrain color table from
mgz's bundled reference data (101 known terrain IDs). - Fixed a wall-coloring bug from Gaia-owned wall/gate objects.
- Fixed a crash on files where the map size came back as a differently-cased or unrecognized name (e.g. "Large" vs "large").
- Expanded the recognized food resource objects (added goats, ibex, zebras, and other animals added to the game since v1.1).
- Known limitation: replays recorded after the February 17, 2026 "Last Chieftains" DLC update currently fail to parse, due to an unresolved upstream bug in
mgzitself (issue #138). This isn't fixable from this repo; it needs an upstreammgzfix.
Vesion 1.1
- The bugs with some map sizes were fixed.
- Walls are now displayed on the minimap.
- All code was unified to a single 'main.py' file.
- New screenshots added to the readme.
- The code was tidied up, funcions are now more readable.
version 1.0.
- Generate minimap from a saved game (.mgl, .mgx, .mgz and .aoe2record files).
- Rotate the map and add transparency to the background.
- Display the location of each player.
- Display the piles of gold and stone resources.
- Display the food resorces (berry bushes, animals like sheeps, fishes, boars, etc.)
- Display Relics on the minimap
First, make sure you have Python3 installed on your machine.
Place the saved games in the same path as the Python script, then after having installed the necessary dependencies run the Python script "main.py", voilà, minimap images will be generated, displayed and saved in the same directory.
You could also move the python script called 'main.py' to your folder with the savesgames, run the script and it should work.
Try these commands until you find one that works for you (this is because each linux distro is very picky), one of them should be suitable for you. source: this question on Stack Overflow
Linux
sudo pip3 install pillow
sudo python3 -m pip install pillow
Windows
pip install Pillow
Just scroll to the end of the file, this is the master function
Extracted from recage/examples/map/terrainColors.json.
✔️ Add new TODOs.
✔️ Fix bugs with some map sizes.
✔️ Add walls when fortress (or whenever).
✔️ Unify all code to a single 'main.py' file.
🔲 Create a .exe file to non-python users.
🔲 Add more tests, with more maps & more sizes.
✔️ Tidy up all the mess with the files and screenshots.
White walls
Final without resources
Square without resources
Square with resources
Square with resources and players
Extra Large Player Points
All contributions are welcome! Feel free to open a pull request.
Thanks to aoc-mgz by @HappyLeavesAoC for the extract functions.









