e00E / Age-of-Empires-II-Grid-Generator

Add grid lines to the terrain textures of Age of Empires II.
GNU General Public License v3.0
4 stars 1 forks source link
aoe2 aoe2hd

Description

Adding grid lines to the ground textures in AoE2 helps placing buildings and judging distance. A popular mod on the Steam Workshop providing this is Alignment Grid.

However different mods modifying the same ground texture are not compatible and one has to take priority over the other. If a player wants to use a custom terrain which does not come with a grid they need to bug the author to make another version. On the other hand all mod authors that want to provide a grid need to go through the same manual process.

This project aims to solve both problems by adding grid lines to any existing mod or the base game in an automatic fashion. Players can add a grid to any terrain mod on their own and mod authors have to do less work if they do want to provide a grid in their mods.

Additionally the look of the grid is customizable with the defaults closely resembling the previously linked Alignment Grid mod.

This readme is written with the HD version in mind but should work with the original as well by moving folders around manually. Since I do not have the original I am not sure about the exact steps.

Installation

To run the python source Python 3 and Pillow are needed. Alternatively a stand-alone executable can be found under Releases here on Github.

Usage

This is a command line application without graphical user interface. Running it with --help gives a description of all the arguments.

After running the application a new mod called Grid Generator will appear in the Steam Workshop menu in the game. This mod contains the generated grid terrain. Make sure it has a higher priority than the other terrain altering mods.

Arguments

On Windows it might help to replace back with forward slashes in case a path to a directory is not recognized.

Examples

Add the default grid to a mod:

grid_generator --game-dir "C:\Program Files (x86)\Steam\steamapps\common\Age2HD" --mod-dir "C:\Program Files (x86)\Steam\steamapps\workshop\content\221380\176712202"

default grid Create a custom grid using the base game as the source terrain:

grid_generator --game-dir "C:\Program Files (x86)\Steam\steamapps\common\Age2HD" --alpha 1.0 --width 5 --color 255 0 0

custom grid alpha 1.0, width 5, color 255 0 0

Building

To make a release install PyInstaller and run

pyinstaller --clean --onefile grid_generator.py