HOW TO create a decalc flag and use it with proper colors

LAnkou

Breizh A Tao
Joined
Sep 12, 2005
Messages
1,315
Location
Paris, première ville bretonne
thanks to WaxonWaxov for this, it may help a lot of people for creating flags in decalc

I just create a 128x128 pixel .PNG file in Phtoshop with a transparent background.

Then I add a WHITE pattern to it (say a skull and crossbones)

save it as a .PNG

Use .dds converter to convert it to .dds

When you choose your civ's color scheme. it has TWO colors. a Primary and a secondary. For example. The DARK_BLUE color scheme has a Primary color fo dark blue and a secondary of yellow.

The transparent part of your .dds with appear the PRIMARY color and the white part of your .dds will appear as the Secondary.

the color scheme of your civ can be found in the Civilization4infos.xml file in your mod/assets/xml/civilizations directory

it shows like this:

<CivilizationInfo>
<Type>CIVILIZATION_AMERICA</Type>
<Description>TXT_KEY_CIV_AMERICA_DESC</Description>
<ShortDescription>TXT_KEY_CIV_AMERICA_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_AMERICA_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_AMERICA_PEDIA</Civilopedia>
<DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>

see the "PLAYERCOLOR_BLUE"? that's the color scheme of the civ

now, go into the mod/assets/xml/interface directory

search for the PLAYERCOLOR_BLUE in the Civ4PlayerColorInfos.xml

it shows like this:

<PlayerColorInfo>
<Type>PLAYERCOLOR_BLUE</Type>
<ColorTypePrimary>COLOR_PLAYER_BLUE</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_WHITE</ColorTypeSecondary>
<TextColorType>COLOR_PLAYER_BLUE_TEXT</TextColorType>
</PlayerColorInfo>

so the scheme is Blue(principal) and White(secondary)

if you look after a particular scheme (the one of France, Incans), just look in the first file the <PlayerColorInfo> under the civ name.

next episode, add colors and colors schemes
 
now, we gonna try to add some colors:
you have to go in Civ4ColorsVals.xml

thanks to wikipedia for the following:

This file stores information regarding the modifiable color values for civilizations and the UI.

Those that modify the default colors of civilizations are designated with COLOR_PLAYER_[the name of the color]. Below the name of the color are RGBA values for the color.

For example, in this entry:

<ColorVal>

<Type>COLOR_PLAYER_DARK_CYAN</Type>
<fRed>0.00</fRed>
<fGreen>0.54</fGreen>
<fBlue>0.55</fBlue>
<fAlpha>1.00</fAlpha>

</ColorVal>

<fRed>, <fGreen> and <fBlue> tags give the RGB values of the color on a scale of 0 to 1 with 0 being the absence of the color and 1 being complete saturation. The <fAlpha> tag should always be set to 1 for COLOR_PLAYER types.

For each COLOR_PLAYER entry there is a corresponding COLOR_PLAYER_[the name of the color]_TEXT which defines the color of the leader/username in the score pane above the minimap and other civ specific text displays. It should always be brighter than the corresponding COLOR_PLAYER value, since it appears over the UI's default dark blue color in most situations, making dark colors difficult to see.

now, we gonna try to write another set of color scheme for a civ. Go to Civ4colorplayerInfos.xml

thanks wiki again:
This file defines the default combinations of colors from CIV4ColorVals into PLAYERCOLOR_[the name of the color] structs.

For example in:

<PlayerColorInfo>

<Type>PLAYERCOLOR_BLUE</Type>
<ColorTypePrimary>COLOR_PLAYER_BLUE</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_WHITE</ColorTypeSecondary>
<TextColorType>COLOR_PLAYER_BLUE_TEXT</TextColorType>

</PlayerColorInfo>

<ColorTypePrimary> defines the color for the civilization's borders, the primary color of its flag, and certain defined sections of its units. <ColorTypeSecondary> defines the secondary color of its flag (most often the symbol, but this is determined by the content of the flag's dds file) as well as certain defined sections of its units. <TextColorType> defines the color of the leadername/username in the panel above the minimap which shows the current scores.

To add a new color or a new schem, you don't have to delete an existing, on the opposite, you shouldn't do that since it will cause some problem to the vanilla civ.

Just add them following the previous schem for color

now you can define the scheme and colors for your civs and have the flag properly designed

Enjoy
 
I want to make a three-color-flag.
OK, I have primary, secondary color......but I still miss one!!!
What should I do??
 
if you have more than two color, it can't be decal Flag...

make your image, put the alpha channel to black and in the Artcivilisation xml files, put the whiteflag to 1
Normally, it should work...
 
This is probably a stupid question but once you created a flag and converted it to .dds, where do you find the folder with the rest of the flags so you can use it in the game.

I looked at the path and says art/interface/teamcolors/DecalcFlag_star.dds
but I can't find teamcolors anywhere except in the Mods section (American Revolution, etc...)
Your help would be much appreciated.:confused:
 
you need to create it in your mod folder

the best advice i can give you is to download a (currently working) mod and look at the way it is construct in term of folders
 
Lankou, or anyone else that is familiar with Gimp 2.2, perhaps you can offer some assisstance.

I've been having trouble recently creating proper flag decals using Gimp... The transparency shows ingame as black, no matter what color it should be, but only the white comes to be the color it should be. What course of action should I take in creating a flag decal when using this program?

Also, I need to make a flag (non-decal) with 3 colors. How should I accomplish this with Gimp? How do I set the Alpha channel to black?

Your help would be appreciated.
 
I'm having the same problem.... and in a month no one has come up with an answer?
 
as i don't use gimp i can't help you on this software

for the decal, do you set white flag on 1?

for the alpha channel, the best tip to find where to change it is to DL an existing flag, copy the alpha channel, and paste it over your new flag (works with photoshop)

HIH
 
the alpha channel is a kind of layer (red, green, blue and alpha) that determine the transparency of your picture in software like photoshop or GIMP (none in paint, sorry).

all the actions described have to been done in the software used...
 
I am making my own flag, but when i try it, its shows up white. I have changed the the code from 0 to 1 , still white. When i tried the DDS Converter to see its says : Conversion from BMP to DDS using nvDXT started
Error [My.bmp] size = not a power of 2
Conversion failed.

I have my BMP sized to 119 X 128, with black alpha channel behind it. What am i doing wrong?
Also tried DXTBMP to convert to dds , no problem there. I think.
But still will not work, maybe i am putting it in the wrong files, so i will ask, where and how do i make/change flags to make them work correctly?? I have look for about thre hours now in the forum and i cant find a good flag on how to make them and put them in a certain civ?
 
The size for the flag&#180;s graphics is usually 128 x 128. Probatly it&#180;s the size of your bmps (119 x 128) why it won&#180;t work.
 
be sure to save the dds-files as a dxt3-dds

or

try the way i do it:
1st: use DXTBmp (for me the best prog for dds-files)
2nd: open a aviable flagdecal_XX.dds
3rd: replace the graphics with your ones in the 128x128 format
4th: save the dds-file as your new flagdecal_YY.dds
5th: should work :)
 
Back
Top Bottom