Aurons Guide to Modifying Units

by Auron
created 11/30/04

Introduction: This guide will teach the reader how to create their own, Icons, History information, and editing the name of a unit using the xpacklanguage.dll for both Age of Mythology and Age of Mythology: The Titans. Whether you just started modding, this wont be hard to learn. Just follow each step by step.

In order to Modify anything within AoM, you will need the following which are essential to modding:
AoMed this program will allow your to extract, and convert files that cant be opened into editable documents. you can download it at www.aom.heavengames.com
Resource Hacker: This program will allow you to edit the .dll files. you can download it Here The Resources Hacker, is an uselful program to edit a units name. If you are creating a new unit and want to get rid of the *** on his name, this guide will come very useful.
Notepad or WordPad This program will be needed in order to open .xml or .txt documents.

1). Creating New Icons : If you are planning to make a new unit, or editing a units status, this will provide greater quality to whatever you are doing. In order to have access to the .ddt texture files, you need to extract the Textures.bar(2) file. a .bar file is used to put together a whole bunch of files in one simple document. do the following steps:

1). Open AoMed, and press “Set Input data file”
2). Find textures.bar for AoM, or Textures.bar2 for AoM: the titans
3). Now press “Folder to extract data into”, and choose a folder to where you want the files to be installed.
4). Press “Read data file”, a box should appear with a green text. let it finish.

Now that you have the texturesbar(2) file extracted, you are ready to create your own icon. note that you can do this in a different way by creating your own images and setting it to the right pixels. do the following steps:

1). Open AoMed, and press “Direct File Conversation”
2). Go to the folder where you extracted the textures.bar(2) file, and find within the folder, another folder called “Icons”
3). Find any icon, and select open, then specify where you want to put this file. By doing this, you are changing the format from .ddt to .bmp, which allows you to edit the image with Paint.
4). While you are doing this, a message saying will appear saying to copy down what it says. You will need this information in order to change your icon back to .ddt
5). There are units that have a x32 and x64 icons. make sure to extract both of them. Open these files with MSPaint or whatever program yo have to edit textures, and make sure not to change the default size. Once you finish editing textures, (whether is copying and pasting a real texture):

A). If you are editing a unit icon already within the game, save over the file, and make sure to make a back up copy of the originals icons. Convert the files back to .ddt by using AoMed. select the file you just edited. A window should appear asking you to select a .ddt format. Remember what you had to copy when you converted this same file into .bmp? select the right .ddt format and your .bmp file will convert back to .ddt

B). If you are creating a new icon for a new unit: save the icons as the exact name you put in the proto(x). I would save it as (example): Silver Warrior icon 64. Convert the files back to .ddt by using AoMed. select the file you just edited. a window should appear with options about the .ddt format. Remember what you had to copy when you converted this same file into .bmp? select the right .ddt format and your .bmp file will convert back to .ddt. In order to do the following step, you must extract the data.bar file.

1). Open up AoMed and click on Set Data Input File.
2). Find Data. Bar or Data2.Bar at the AoM/Data folder and click ok.
3). Give a specific folder/place where you want the files to be extracted by selecting Folder to extract data into or just leave it at AoM/Data.
4). Click Read Data File. A window with green text will appear. Let it finish.
By now, you should have the Data(2).bar file extracted, therefore having the proto(x).xmb file. the proto(x).xmb is a file where all the units/objects of the game are defined, including their special attacks, name, and many other things. this file cannot be opened unless converting it to an editable format. In order to change this file format, open AoMed and do the following:

1). Press Direct File Conversion at the AoMed menu.
2). Go back to the place/folder where you extracted the data(2).bar, and select proto(AoM) or protox(AoM: TT)
3). Specify a folder where you want to put the .xml version of the proto(x).xml
4). Wait a couple of minutes until the file convertion is finished. by now, you should have a proto(x).xmb and proto(x).xml documents(s). now do the following

If unit contains a x32 icon, edit the following tag:

<icon>insert icon name here</icon>

Example: <icon>Silver Warrior icons 32</icon>

If unit contains a x64 icon, edit the following tag:

<portraiticon>insert icon name here</portraiticon>

Example: <portraiticon>Silver Warrior icon 64</portraiticon>

Keep in mind that when converting files into a different format, it will not overwrite the previous file format. Once you have done this, convert the proto(x) back to .XMB and put it in your data folder. when your icons are all finished, put them into the following directory: C:/program files/microsoft games/AoM/Textures/Icons Folder. In order to know whether the icon worked, Launch AoM or AoM: TT, go to the editor, and put your unit. select playtest scenario. when the scenario is being played, select your unit and make sure the icons are display correctly.

2). Creating a History File: This is rather easy to do. Even the most beginners are able to do this. Open the notepad or wordpad and write what you want as the History description of your new unit. If you want to modify the history information of a unit that already exist in the game, go to: History folder/units for AoM, or History2 folder/units for AoM: The Titans. Open the whatever unit you want to edit the History and re-write it. Once you finish save it on the History(2) folder. If you are making a new unit, make sure to save it under the exact name as you named your unit in the proto(x).

3). Editing The (xpack)Language.dll: In this step you will be using the resource hacker program, which will allow you to open .ddl files. If you are using AoM, open the Language.dll file, and if you are using AoM: TT, open the xpacklanguage.dll. in order to insert your new unit’s name into this file, do the following:

1). open the (xpack)language.dll file
2). Find a folder with an avaliable slot to put your unit id number & name
3). Once you find the right folder, do the following(example)

48970, "Silver Warrior"

The number “48970” is a number which no unit or object was using. it should be written in the left side followed by a comma, of course, you can write a different Id number. Now quote the name of your unit like i did with mine. make sure to make the correct space. Now save the file and make sure to make an original copy of the (xpack)language.dll file. Now there should be an option called Compile Script. press the buttom, and save it again. Put the file in the age of mythology folder. Now that you have registered the name of your unit under the (xpack)language.dll, it is now time to do the final step. open the proto(x).xml and do the following:

A). Put the number of the folder where you inserted the Id and name of your new unit into the following tag. Example: <dbid>3061</dbid>
B). type the Id number you give to your new unit into the following tag. Example: <displaynameid>48970</displaynameid>
Save the proto(x).xml, convert it back to .xmb, and put it in the data folder. Note that you dont have to use AoMed to do this. by putting the .xml document in the data folder, the game will automatically convert it to .xmb.

Final Notes: In this guide, you went over and learned how to create or edit new icons, history files, and editing your units name by using the resource hacker. you werent able to understand or follow each of the above steps, keep experimenting. You will not always get this right away. also, remember that by editing the proto(x).xmb, there might be some chances of not being able to play online. you might sometimes get an Out of Sync, or being unable to join a game for having a different AoM(TT) version. Always remember to make back up files when making or installing a mod.