Help with flags

Fabius

Chieftain
Joined
Oct 27, 2005
Messages
83
I made some new unit flags and now I can't figure out how to get them to show up in the game. Ideally I'd like them to show up in an unmodded game (by replacing the default textures). But even if it shows up as a mod, how do I do it?

Like I said, I have the dds files, and I thought I put them in the right place, but they don't show up in the game.

I originally put them in Assets\Interface\Teamcolor\ but that didn't work (even though they were named the same as the default patterns). So then I put them in a Mods folder under the same tree (in the Mods\ModName folder) and still no joy. I checked out the existing mods to see the format and I saw nowhere that it specifically referenced flag textures.

Can anyone give a new modder some hope? I did all the flags in Pirates! to make them historically accurate, yet Civ IV is kicking my butt when it comes to figuring out where they belong.
 
What do you mean they "didn't work"? Did the old flags show up in the game? Did blank flags show up?
 
The original flags showed up in both cases. It's like what I did wasn't recognized by the game. Yet I don't see how what I did was different from any of the mods that came with the game. Even when I loaded a mod and started a new game, the old flags showed up despite my new flags being there.

And it didn't matter that they were named for the old names (like Greece was named flagdecal_helmet.dds). I thought the game would automatically look for new unpacked versions of the files first, just like Pirates! did. For that if you made a new flag, in the right format, and put it in a directory equivalent to the FPK file it came from it would read it instead of the standard. So when I made a helmet.dds that had a pattern I wanted as the file with a blank mask I thought it should read it. But instead it acted like I had done nothing, which means the game was looking somewhere else and needed to be told to look at my new file. Yet the mods that came with the game didn't have any XML (that I saw) that referenced the new flags.
 
Okay, I guess I'm a little more confused that I thought I was.

Let me state things the way I think they work, then someone can chime in and knock me down.

The flags are packed in the Art0.fpk file. Within that file, they exist in the /Assets/Art/Interface/TeamColor directory inside the fpk file. There's an XML file in the Civ 4 directory in the /Assets/XML/Art subdirectory called CIV4ArtDefines_Civilization.xml. In that file there's a key for each civ under <CivilizationArtInfo> called the <Path>. That <Path> key points the game to the location of the nation's flags, I'm guessing within the fpk file. Now I did a lot of flag modding for Pirates! and I know that if you put a modified extracted file in the same directory structure as the packed file points to, it used the unpacked modified file instead.

So I went into CIV4ArtDefines_Civilization.xml and changed it for a given nation to change the <Path> from Art/Interface/TeamColor/FlagDECAL_Mask.dds to Art/Interface/TeamColor/FlagDECAL_Newfile.dds. Then I put a new DDS file (without any fancy alpha channels) named FlagDECAL_Newfile.dds in the Art/Interface/TeamColor subdirectory of my game.

When I load the game and look at the given nation, the flags appear as the nation's SECONDARY color. It's like whatever I did covered up the entire primary color to reveal the secondary only (as if my new DDS was a completely transparent mask allowing the secondary color to show through entirely).

Why?

I originally tried to do all this as a "mod" but the more I thought about it the more I wanted this to happen all the time, every time, in every game, every day. So I thought I would just change the actual files themselves in the game directory. All my works has had some effect (instead of showing my flag it shows the secondary color) but I'm not sure what I'm missing here.
 
You mean once you unpack it you have to use the entire unpacked batch of files from that point on? Is there a "repacking" tool?
 
Back
Top Bottom