How to create flags for civ4 - for dummys :)

Hey there,

This isn't exactly related to your tutorial. However, I have been having trouble figuring out how to install the DDS Plugin for GIMP. I have used Windows my whole life and have never compiled anything. So when I see things like Source and Binaries I don't know what to do.

If you or anyone else could tell me exactly how to get the DDS Plugin onto Gimp or send me a copy of your Gimp with the Plugin installed or something, it would be sorely appreciated.:blush:

Thanks,
Bill
 
However, I have been having trouble figuring out how to install the DDS Plugin for GIMP. I have used Windows my whole life and have never compiled anything. So when I see things like Source and Binaries I don't know what to do.
It should be quite easy to install the plugin, even if you are not that experienced with this stuff. Actually binaries are compiled programs (from the source code) and are executable, or to speak with Windows terms: binaries are exe-files. So actually all you have to do is the following:
- follow the link I posted in the first post
- download the zip file labeled with win32 binary in the download section of the mentioned webpage
- extract the zip, read the readme if you like and execute the exe; if you don't have Winzip, or WinRAR or 7z installed yet, you could handle the zip like an ordinary folder - so double click on it, read the readme for more details and execute the exefile; otherwise you could download and install 7z or Winzip and then right-click on the zip file, then select "extract here" (the "right-click-menu" could slightly differ, but you should find what I mean), from here on it's the same like with default Windows: read the readme and execute the exe that have been placed in the folder where the zip itself is when you extracted that zip
- the installer should take the rest, just follow the instructions

If you need more help, let me know. Then, describe your problem, be as detailed as possible, please. I don't have much time, so maybe it will take me a while to answer.
 
Okay...

Some questions on the flags.

For the mod I'm working on with the team of guys working with me...

We've created the flags. They are all in .dds form, etc., and all completed.

Now, they're all just saved on my desktop. We've created 50 new civilizations and have the flags/buttons/leaderheads done, etc.

I have the buttons/leaderheads completed and in the mod. Now...where do I take the flags and put them at originally? Assets/Art/Interface/???

Then, after that...when they are stored in my assets/art folder. What do I need to match it to on the civilization itself for it to show up in the game?
 
I suggest you to put them into Assets/Art/Interface/TeamColor. Basicly as far as I know it doesn't matter in whitch folder you put your art files if you have changed the path right.
The flags can be changed in ArtDefines_Civilization.xml. The code looks like this:
Code:
		<CivilizationArtInfo>
			<Type>ART_DEF_CIVILIZATION_AMERICA</Type>
			<Button>,Art/Interface/Buttons/Civilizations/America.dds,Art/Interface/Buttons/Civics_Civilizations_Religions_Atlas.dds,1,5</Button>
			[B]<Path>Art/Interface/TeamColor/FlagDECAL_Star.dds</Path>[/B]
			<bWhiteFlag>0</bWhiteFlag>
		</CivilizationArtInfo>
The line in bold is what you change. Put there the path where you placed your flag.
Hope that helps.
 
NotSoGood is right about the place where to store the flags: they can be stored everywhere you want, if only the path is given correctly in the xml. Still, it seems to me that you didn't make your mod modular. Making it modular makes it easier to maintain and combine your mod with others. Modular modding is not part of this tutorial, so I wont go deeper in this matter here. I just thought it might be worth thinking about this issue before you proceed.
 
I am having trouble getting my custom FLAGdecals to maintain its correct shape; they seem to stretch out to cover the entire flag.

First: Screenshot of problem; note how decal stretches to cover entire flag. ss01.jpg

This is how it should look Perfect Original.jpg

An image of the decal as it looked (no black) as it appears in the dds. DDSingame.jpg

This may be a simple beginners error, so appologies if it is a simple problem.
 
There is actually nothing really wrong, I'd say. From your dds, I'd expect it to look like on your screenshot. The problem is, that the flag has a ratio of 4:3, but the flags dds needs to be quadratic (128x128 pixels). That's something you can't change, but if you aware of that behaviour, you don't need to either. Usually, you should ignore the rule that the dds needs to be quadratic at first. Simply create a flag thats ratio is 4:3, do all your changes and as last step resize your flag image to the quadratic size (again: 128x128 pixels). Then, the flag will be stretched when you look at the image file, but will be resized automatically when displayed within civ4.
 
Thanks, for the tutorial! You have been instrumental in helping me put together this beautiful creation! I am working on a mod where the flag will be used and I shall of course mention you in the thank you notes in my ReadMe-file, and also link to your helpful tutorial from there.
 

Attachments

  • Civ4ScreenShot0109 (2).JPG
    Civ4ScreenShot0109 (2).JPG
    101.9 KB · Views: 359
Thanks for your kind words. Your flag looks very well!
 
So I tried really hard to search and translate the directions for Photoshop CS4 but I seem to have hit a roadblock on the alpha channel threshold settings... I can create an alpha channel in CS4 just fine, but I can't seem to find the threshold nor do I know which options to pick through the Channel Options... Menu.

If anyone is proficient in PSCS4 please please please help! Thanks!

Awesome tut, by the way.
 
In Photoshop, adding an alpha channel works differently. You said you know how to add an alpha channel - well, then the rest should be easy. View the channels and select the alpha channel. Bucket paint it black. Now, you only need to save the file properly. In the save dialog (where you enter the name for the new file, not nvidias dialog), take a look at the options underneath the box where you enter the filename. There should be something about the alpha. The option should be checked. From there on, there is nothing more to say actually. Just save the file. You should disable mipmaps (in nvidias dialog) as otherwise the flag can become blurry. Save it as DXT3.
NOTE: Photoshop seems to have problems with dds files and their alpha channel. For me, it faisl to load the alpha if the dds contains an alpha. In this case, the channel is missing entirely. If the dds doesn't contain an alpha, PS adds one, but it will be white.

I'm not too trained in making flags with PS, could be that the alpha channel needs to be white here. Can't imagine there's anything else that could let you run into trouble. Feel free to report. If you still don't get it working, I'll take another look at this issue.
 
i admit, i didn't get it.:blush:

i understand every step of your tutorial and did it twice. also i have some knowledge about grafics - already made some tga, button, ...

But now i am at the verge to explode in my brain, so i give up.

The flag i wanna do is simple. Maybe someone can do it for me please, thanks.

 
Just wanted to give your flag a go. Glad to see you made it. Sure, you need the plugin. What did you do when you didn't use the plugin?
 
i saved as *.psd, than convert it with DDS Converter 2 -> did not work

by the way i wanna change just some colors of a flag, but when i try to convert the dds with DDS Converter 2 to a other format, he kicked me out while clicking on the dds-file. strange, or?
 
dds converter is instable. I had similar problems. It helped a little to first install an older version, then update it by installing the latest to the same location.
Actually, dds converter should have been able to convert to valid dds. Could be that it is unable to deal with psd files. At least, if those contain more then 1 layer. If you would have saved the file to bmp and converted that, it should have worked. Also, there is a box you need to check so dds converter adds the alpha channel.

Well, actually I don't use dds converter anymore since I figured out how these things work with GIMP. It might look difficult at first, but you get used to it soon. At least in case of decal flags.
 
I have a question about this part of the tutorial:

Now we have to add a well-defined alpha channel. We could add a new alpha channel similar to how we removed the old one: right-click on the layer and hit “add alpha channel”. But for the next step we’ll have to use the menu of the main window anyways, so I’ll show an alternative way to add the alpha channel. In the main windows menu choose layer->transparency-> add alpha channel. Next, choose layer->transparency again, but this time hit threshold alpha (it’s still grayed out on my screenshot, but should be available for you now):
Spoiler :

This menu will open:
Spoiler :

Push the bar to the very right or enter 255 in the textbox. Your picture will disappear, that’s normal. Close the window. If you check the channels now, then they should be all black if things worked. That’s also why opening dds in GIMP fails, it seems to be unable to handle alpha channels in dds. However, save the file as DXT3 dds again, but without overwriting the old file and without mipmaps. We finished the work on our picture, so we can close GIMP now.

What name should I give to this file? Not the same as the original, that's impossible. Then how will the game "know" that I have both types (with and without alpha channel) anyway?
 
You will have to add that second file the same name as the first one. You won't include both files into the mod at once though. It's actually easy: for one group of users the version with alpha channel, for the rest the version without the alpha channel will cause the flag become completely white. The idea is, that per default you provide your mod with only one of the two files (I suggest he version with alpha channel). Besides of this, you provide something like a patch containing nothing but the other version of the flag. If someone has troubles, he will load your patch and overwrite the flag with the version from the patch. That's sort of ugly, but to my knowledge there is no way to provide a mod containing a user made flag that works for all users. And I'm pretty sure this is not because I only didn't heard about it - it's impossible. Lot's of modders only provide one flag, without patch. Well, for most users that'll work, but it won't require you much work to create a second version. Also, the version that seems to work for most users is the one with alpha channel, so you get the other version as 'side-effect' anyways, so I suggest you do it the way I said. Again: you should give both files the same name, otherwise users will need to edit the xml.

BTW: There are installer scripts that allow you to set up an installer for both the mod and the flag patch. Take a look at my hun mod if you want to see an example - I think that's an acceptable solution for both types of users.
 
Hello,

I have been trying to use this tutorial to make some flags for a Mod im working on. 24 in total, 1 for ea civ. Now I have managed to make the dds files, 128x128, 1 with the Alpha channel and 1 without.

I have to use the dds without the Alpha channel otherwise the flags dont show up in the civlopedia. You can see them in the screenshot labled "Screenshot of civs in Pedia".

They all look and work fine so far. Now I start a Game, pick a random civ and wait for it to load. Which ever Civ the game randomly picks (or if I pick one) doesnt have the flag I made next to the Unit. See Screen shot named ARGHH.

The XML code I wrote for these is like so ArtDefines_Civ (Its not modular):-

Spoiler :
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_GWYNEDD</Type>
<Button>,Art/Interface/Buttons/Civilizations/Gwynedd.dds</Button>
<Path>Art/Interface/TeamColor/FlagDECAL_ZuluShield.dds</Path>
<bWhiteFlag>1</bWhiteFlag>
</CivilizationArtInfo>


As you can see in the second screenshot the game is just using the team colour + a Flag Decal. Im sorry if I got this wrong but form your tutorial it should be showing me my custom flag? Now this happens for every one of my 24 Civ's.

I will add one of ea dds that I made with Gimp + dds plugin(not the one you have linked on the first page, the link is broken and just give me a page load error, I got 1 form Medieval:TW website, a dds plugin).

OS im using is:-

Windows 7 Ultimate 64bit
UAC is Off.
User Account has Admin Rights.

Now if I change the XML to look like this:-

Spoiler :
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_GWYNEDD</Type>
<Button>,Art/Interface/Buttons/Civilizations/Gwynedd.dds</Button>
<Path>Art/Interface/Buttons/Civilizations/Gwynedd.dds</Path>
<bWhiteFlag>1</bWhiteFlag>
</CivilizationArtInfo>


I just get a Plain Green Flag.

Also tried it with bWHiteFlag set to 0 and I also get a Plain Green flag.
If I have the XML as example 1 with bWHiteFlag set to 0 I get a Decal Flag with a Gray Backround instead of white.

When I try to use the dds files with the Alpha channel, they dont show up at all in Civ.


EDIT!!!!

Got them to work, had to use the Alpha channel dds for the decal and the non alpha for the button. Leaving the description of the problem I had in the Post just incase some one else has a similar issue ;)

So the XML now look like:-

Spoiler :
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_GWYNEDD</Type>
<Button>,Art/Interface/Buttons/Civilizations/Gwynedd.dds</Button>
<Path>Art/Interface/Buttons/Civilizations/TeamColour/Gwynedd.dds</Path>
<bWhiteFlag>1</bWhiteFlag>
</CivilizationArtInfo>


Oh and BTW Blinding Tutorial!!!!! 10/10
 
Top Bottom