Overview
Basic steps on how to edit textures and creating new units
Introduction
Hello modders (and other people too) !
Since I was sometimes asked how to edit textures, I have decided to create this guide. First, you have to download AOM texture editor[aom.heavengames.com].
Second, you need to have a software able to work with targa (.tga) files and channel alpha (the transparency layer).
In this tuto I will explain how to create a new unit. I will not talk about creating a new model, editing the proto or modifying a texture since there already are some tutos; but rather the general steps. This also applies to ui textures, in which case you only have to focus on the first step. You can do the different steps in which order you want, you just need to complete them all.
Unless you have chosen a different path, the standard path for AOM is C:Program FilesSteamsteamappscommonAge of Mythology. Open the “mods” folder. If it doesn’t exist, create it. In this folder are stored all your mods, active or not. If a mod is active, the game will look in this folder instead of the original ones for all replacers. The file path must be the same than the original game. For example, if you modify the proto, the path must be: Age of Mythologymods(mod name)dataproto2.5.xml (or proto1.0 for changes in the Fall of the Trident campaign).
1. Textures
1.1. Units textures
Like all the textures, they are stored in Age of Mythologytextures. To know which one is used, you have to open the model with the appropriate program. You can also look for the anim file located in Age of Mythologyanim. We will see below how to modify unit’s textures.
1.2. UI textures and icons
You can find these textures in Age of Mythologytexturesui and Age of Mythologytexturesicons. Units and techs icons are defined by proto and techtree.xml in Age of Mythologydata. All other UI textures are defined by different files also located in Age of Mythologydata.
1.3. Editing textures
Let’s create a new unit, the Blue Avenger. First, go in Age of Mythologytextures, search special e avenger map.ddt and put this file in your working folder (location doesn’t matter, it is just temporary).
Launch AOM editor and click on “Extractor”. Click on “Browse” and select your ddt file and the destination folder. If you check “Batch Extraction”, the program will extract all the ddt files in the selected folder. Once done, click on “Extract”. Pass the “COULD NOT WRITE” message.
Open the targa file. Screenshots are taken on Photoshop but GIMP works similarly. You can see different channels: red, green, blue and alpha. Since .tga file use an alpha channel for transparency.
In AOM, this channel behaves differently whether they are ui or unit textures. On ui textures, the black on alpha channel means transparent and white opaque. On units textures, white is used to tell the game where to put player’s colour or transparency depending how is the model built.
Once your stuff is done, save your targa file in your working folder as blue avenger.tga for example with 32 bit resolution. Go back to AOM editor. I advise you to launch multiple sessions, at least one for the extractor and one for the compiler.
Compile with 4 channel resolution and put the blue avenger.ddt in mods(mod name)textures.
2. Editing proto
Copy the last proto (it should be 2.5) in mods(mod name)data. Open this proto with any text editor (Notepad++, Word…). Put a copy of the “Avenger” bloc somewhere in the proto. Protoname and dbid of your unit must be unique. Change name “Avenger” to “Blue Avenger” (or something else). Modify what you want and save.
3. Editing anim file
Go in Age of Mythologyanimversion1.0 and search avenger_anim. Copy the file in mods(mod name)anim and rename it to blue avenger_anim. The anim files tell the game how a unit will look in the game when performing different actions (idle, walk, gather, pray, attack, heal, convert…). In every section you have “Visual Special E Avenger_(action)”. In each section add the line ReplaceTexture special e avenger/blue avenger.
Note: the “ReplaceTexture” command doesn’t work if you have “Visual Granny”.
4. Editing sound file
Go in Age of Mythologysound and search avenger_snds.xml. Copy the file in mods(mod name)sound and rename it to blue avenger_snds.xml. Open it and change protounit name to “Blue Avenger”.
Ladies and gentlemen, let me introduce you the mighty blue avanger !