Skip to content

Adding New Units Guide

created 2/08/04

By waveslave610

Modding Set-up
 

AoMed
The first step in making a new unit is to download AoM Edit, by Ykkrosh, which is essential in any kind of AoM modding. You can download it here.
 

Notepad, WordPad
Most likely, if you have Windows, you have these typing programs. If not, just use any basic typing programs like these.
 

Cheesy Anim Editor
Also available at the AoMed link. Although it is not completely necessary, and you can edit Anim files through Notepad if you like, but Anim Editor is a bit easier.
 

Age of Mythology or Age of Mythology: The Titans
Of course, installed and ready.



Getting the Proto(x).xml

The Proto, or Protox, is where data for AoM is stored to run. If you have AoM, you use Proto. If you use AoM: The Titans, you use Protox.

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. The files are set to be extracted to AoM/Data. If you want, you can specify a different folder at “Folder to extract data into” or just leave it at AoM/Data.
4. Click “Read Data File”. A black window with green text will appear. Let it finish.
5. Using AoMed again, press “Direct File Conversion” at the AoMed menu.
6. Go back to your specified folder, say AoM/Data. Click on either Proto.xmb (AoM) or Protox.xmb (Titans).
7. Specify a folder to put the new Proto/Protox.xml in, or leave it at AoM/Data.
8. Now you have Proto.xml/Protox.xml!

Adding Your Unit to Proto(x).xml

1. Open up Proto(x).xml with Notepad, or a different typing program.
2. Identify which unit your New Unit will be based on. Let’s say Hero Jason. Find the text for Jason by Ctrl-F, and copy and paste the whole text, from the beginning-
 

                </unit>

                <unit id="542" name="Hero Greek Jason">

                                <dbid>2296</dbid>

                                <displaynameid>16898</displaynameid>

                                <footprint>Footprint Military</footprint>

                                <icon>Hero G jason</icon>

                        to the end-

                                <action name="DropOff">

                                                <param name="TypedRange" type="AbstractTemple" value1="1"></param>

                                                <param name="Rate" type="AbstractTemple" value1="1"></param>

                                </action>

                </unit>


3. Next, scroll down to the very bottom. Make a space between unit and action, like-
 

                             </action>

               

             </unit>

</proto>


4. Paste the Jason information into the space. Make sure it ends like-
 

                          </action>

               </unit> 

</proto>


5. Change the beginning of the Jason text. Change the name in quotes to what you want, let’s say to Warrior. Also, look at the last unit text before your unit, and make the Unit ID one more than before. The last number in Proto.xml is 622, so your new unit would be 623. In Protox.xml, the last number is 800, so your number would be 801. Now it would look like this if we used Protox-
 

<unit id="801" name="Warrior">

                                <dbid>2296</dbid>

                                <displaynameid>16898</displaynameid>

                               
6. Now, change dbid and displaynameid to X. It would now look like-
 

<unit id="801" name="Warrior">

                                <dbid>X</dbid>

                                <displaynameid>X</displaynameid>


7. Save. With AoMed, convert Proto(x).xml to Proto(x).xmb and place it in the AoM/Data folder. It might take a while. Your Proto(x) now has your unit included. Now, check in-editor. The beginning of Place Objects should have ***Warrior. The three dots can only be removed with a text editor. The unit will be invisible at this point.

Giving Your Unit an Anim File

1. Using AoMed, press “Set Data Input File”
2. Find anim.bar, if you are using a unit from AoM, or anim2.bar, if you are using a Titans unit, at AoM/Anim and click Open.
3. Make a new folder and press “Folder to extract data into”. Specify the new folder you created.
4. Press “Read Data File”
5. Open up Cheesy Anim Editor. Press “Choose Anim File”.
6. Go to the new folder that you made, and search for the Anim file that matches your unit. Let’s choose Hero Greek Jason_anim.txt.
7. Now, you have the Jason anim file open. Now you have to Replace Texture. Under each “Connect” text, put- ReplaceTexture (Your Base Unit’s DDT Name)/(Your New DDT name)
So, if you are making a unit based on Jason, it should look like-

Visual Hero G Jason_boredA
Connect FRONTABDOMEN heroglow hotspot
ReplaceTexture Hero G Jason Head/Warrior Head
ReplaceTexture Hero G Jason Standard/Warrior Standard
ReplaceTexture Hero G Jason Shield/Warrior Shield
8. ReplaceTexture the whole anim file, under the “Connect” text.
9. Save your anim file with the EXACT name as you put in the proto(x). For example, I would save it as warrior_anim. So it is (Proto Name)_Anim.txt.
10. Place your new anim file in the AoM/Anim folder.

Renaming Your DDT Files

1. When you used ReplaceTexture in the Anim file, you told AoM to use different DDT files on your new unit than the base unit’s. So rename your DDT files to what you put in the Anim. I would rename them to Warrior Head, Warrior Standard, and Warrior Shield.
2. Place the texture files in the AoM/Textures folder.

Adding Sounds

1. Using AoMed, press “Set Data Input File”
2. Find sounds.bar, if you are using a unit from AoM, or sounds2.bar, if you are using a Titans unit, at AoM/Sound and click Open.
3. Make a new folder and press “Folder to extract data into”. Specify the new folder you created.
4. Press “Read Data File”
5. Find your base unit’s sound file, which will look like Hero Greek Jason_snds for me.
6. Don’t try to use the XML version of your sound files, because there is a XML and XMB version there. It is easier to use the XMB version, so, using AoMed, press “Direct File Conversion”.
7. Find your BaseUnit_snds.xmb at your new sounds folder. I would choose Hero Greek Jason_snds.xmb.
8. Specify a place to put your new XML sounds file, and the same folder is ok.
9. Open up the sound file with Notepad. Change the Proto name to your New Unit name. I would change- <protounit name ="Hero Greek Jason"> to-
<protounit name ="Warrior">. Save.
10. Rename the sound file to YourNewUnitName_snds.xml. I would name mine Warrior_snds.xml.
11. For my example, I would convert Warrior_snds.xml to Warrior_snds.xmb.
12. Place it in the AoM/Sound folder.

Your New Unit is Installed!

Check in game to see if it worked. It should be at the top of the objects list, and have a *** by its name.

If it didn’t install correctly, ask yourself:

1. Did I use Proto instead of Protox?
2. Did I ReplaceTexture correctly?
3. Did I make any spacing errors?
4. Did I use the same proto(x) name on everything?


If you have any questions, email me at Rickywam@aol.com, or talk to me on AIM at xwaveslave610x.

Back to the Modding Section