I figured this mod will be popular and already we’ve had two requests in the modding section for custom flags. The process is rather simple and I think a tutorial is a good idea since it will empower even the modding newbie to add custom flags to their scenarios. This tutorial has two major sections. The first covers the process in detail, and discusses how to use AOE3ED and how conceptually mods work when applied to the AOE3 engine. The second part is an express version which is intended for experienced modders who want a fast explanation of the process. I give you my word, once you understand the basics, changing flags within the game takes about 15 minutes. Basically we're just telling the engine to use a different texture for a predetermined file name that's already in the game. We do this by saving our custom flag image using the same file name that the game assigns to any chosen flag. In other words, if we want to replace the French flag in our game with our custom map, we simply save the custom flag file using the same name as the vanilla French flag. In order to tell the engine to replace the texture, we simply put it higher in the art file folder hierarchy. Three things are required: 1.Access to the web (for flag pictures. Not necessary if you’re creating a totally custom flag). The first thing to do is create a folder somewhere on your computer. Name it AOE3 Mods. This is where we’ll set up our mod files. Next thing you need is a picture of the flag you want to add. There are many sources on the web for free flag images. Alternatively you could create one from scratch using your paint program. Any image will do but be mindful that we’re going to size it into a square so some distortion may occur depending on the original size and content of your image. For people not familiar with AOE3ED (which I’ll call just ED), basically there’s two components to it, an archive viewer and a file converter. The reason we use ED is because AOE3 files are compressed into files which windows and standard programs won’t open. Examples are .bar, .xmb, and .ddt extension files. ED allows us to open these files as well as convert more ordinary files to these extensions. ED’s viewer goes further as you can preview .bar files without having the extract them. Considering the Art1.bar itself is about 430 Megs, this is good news. In creating our custom flag we want to find the original flag files for reference. DL and install ED and open up the viewer. Using the file menu at top, click open and navigate to the C/Program Files/Microsoft Games/AOE3/Art folder and click on the art2.bar file. You’ll see it will generate a list of the bar’s contents. Notice at the bottom of the ED viewer window there is a space called “search for file” ( a wondrous feature) and typing in “flag” will update the file list to include only the ones that contain the word “flag”. Let’s look at the German one shall we? Find the German flag (Art/objects/flags/germans.ddt), click on the file name once so it’s highlighted, and at the top menu click “view” then “preview”. You’ll notice a small preview of the German flag is generated and it looks like this: We can minimize the ED program now, open a new window and navigate to our AOE3 Mod folder. You’ll notice in your AOE3 Mod folder that ED created a sub-folder called “objects”, within which is another folder called “flags” within which will be the file “germans.ddt”. Leave this folder structure in tact as it is the basis for our mod. Now, the “germans.ddt” is the image file we previewed in ED but it’s a compressed .ddt file which most paint programs won’t recognize. This is where ED’s converter comes in. Open the Ed FileConverter and when the open file window pops up, navigate to the AOE3 Mods/objects/flags/germans.ddt file and either double click or click once and click “open” the germans.ddt file. You’ll notice ED puts in a file called germans.(0,0,4,6).tga. We now have a tga version of the original .ddt flag image file, a version that we can open with most paint programs. Launch your paint program and open the germans.(0,0,4,6).tga file, It will look like this: This is the actual picture the game uses to depict the German flag in the game, and if we look at its preferences, we note it’s 128 x 128 pixels in size. We then take our custom flag image, resize it to 128 x 128 pixels, and save it as a 32-bit, targa image with the name “germans.(0,0,4,6).tga”. Mine looked like this - notice I cropped the edges since the original was rectangular and needs to be square. Cropping will insure distortion is minimized. Also we’re going to delete the AOE3 Mods/objects/flags/germans.ddt file. These steps just help to minimize a proliferation of files. You can do it differently as long as you end up in the same place as I do. The next step is to convert our new “germans.(0,0,4,6).tga” (which is actually a shot of our custom flag) to a ddt since AOE3’s engine won’t recognize tga files. Open the ED FileConverter, click on the “germans.(0,0,4,6).tga” file in our AOE3 Mods/objects/flags folder and double click the file name or click once and click “open”. ED will now convert the .tga back to a .ddt. So up to now we have a this folder AOE3 Mods/objects/flags with two files in it, “germans.(0,0,4,6).tga” and file “germans.ddt”. I now like to move the germans.(0,0,4,6).tga to another location on my computer, and any will do as long as it isn’t in the AOE3 game anywhere. Now we’re ready to put our custom flag into the game. Open a new window and navigate to the C\Program Files\Microsoft Games\AOE3\art folder and open it. You’ll see three bar files (Art1, art2 and art3) as well as another folder called “ui” Open another window and go to your AOE3 Mods folder and open it so you see the “objects” sub-folder. Then it’s simply a matter of selecting the “objects” folder and dragging it into the C\Program Files\Microsoft Games\AOE3\art folder. Our mod is now installed and ready to try. We launch AOE3, go into the editor, and when we place any German flag-bearing unit, our mod will replace the German flag with our custom flag. The change is global, which means that anywhere the game would normally place the German flag (even in German home cities), it will now place our custom flag. Our flag mod must be un-installed before playing on-line or before watching replays, otherwise OSS errors will occur. By setting up your folder structure the way I described, you can simply swap the “objects” folder in and out of the C\Program Files\Microsoft Games\AOE3\art folder to activate/deactivate the mod. Also, since the changes are global, you cannot for instance have your custom flag and the original German flag appear at the same time – well not with this simple mod anyway. Also this mod doesn’t talk about shading the custom flag image to match the normal map. If you take a close look at the original German flag artwork, you’ll see folds and highlights. Notice the pattern is exactly the same for all the flags. That’s because they all probably share the same normal map. To really give your custom flags a terrific look you should paint the folds. Anyone interested in modding should take the time to learn about normal maps and what they do. AOE3 uses normal maps extensively to give their objects a nice 3D appearance. I only mentioned normals briefly to save swamping the newbies among you with too much information. But if you don’t paint in the folds, the result is still really nice and satisfying. 1. Retrieve the original flag file name that you want to overwrite from the art2 bar and preview its targa file name, or use the reference list below. French: Art/objects/flags/french.ddt ===========================================================
2.A paint program capable of handling .tga (Targa) image files.
3.AOE3ED (a free program used to view the contents of bars and convert files)
Well this isn’t really what the image looks like, it’s just a preview image. Making sure the file’s name is highlighted on the list, go to the top menu of the ED viewer and click “extract” and “selected”. A window will pop up and you use that to tell ED where to extract the flag image file to. Place it in your AOE3 Mod folder. This is one of the many great features of ED, when it extracts the file, it will create the sub-folders automatically. The importance of this will be clear in a second.
===========================================================
2. Resize your custom targa flag image to 128 x 128 and save it as the same name as the file you want to overwrite.
3. Convert the targa file to .ddt and put it in the folder structure “objects\flags\xxx.ddt”.
4. Move the “objects\flags\xxx.ddt”. folder into the AOE3 art folder.
German: Art/objects/flags/germans.ddt
Dutch: Art/objects/flags/dutch.ddt
Russian: Art/objects/flags/russians.ddt
Spanish: Art/objects/flags/germans.ddt
Portuguese: Art/objects/flags/portuguese.ddt
Ottoman: Art/objects/flags/ottomans.ddt
British: Art/objects/flags/british.ddt