View Full Version : How to mod civ colors?
jkp1187 Oct 27, 2005, 07:31 AM This should be an easy one. How do I mod the colors assigned to the various civs? I've just gotten so used to barbs being white that it just doesn't feel right for a civ to have that color.
Thanks in advance!
dalek master Oct 27, 2005, 07:34 AM in civ III, you could go on to the editor and change what colours are for what civs, but I'm not sure about Civ IV. I personaly would like to add my own colours but I'm even more unsure about that.
Spyder1 Oct 27, 2005, 10:50 AM The key to the new editor is simple: there isn't an "editor", there's several different layers of editors that have to all be used to achieve anything substantial, requiring skills in understanding XML editing (so you don't screw it all up), plus Python, plus the upcoming SDK, and the World Builder (which lacks a way to randomly-generate a new world on the fly, you have to log out to the main menu, start a new game, to "achieve" this simple task).
Back in college in the various programming classes I took, we were told to strive for the maximum level of involvement and complexity delivered through the simplest and easiest-to-use interfaces. Guess they didn't decide to subscribe to that theory this time.
PeteT Oct 27, 2005, 11:25 AM To change the Barbs to white, go to ...\Assets\XML\ and you'll find a file called CIV4CivilizationInfos.xml. You can open it with any text editor (e.g., NotePad). Scroll down well towards the bottom and you'll see:
<CivilizationInfo>
<Type>CIVILIZATION_BARBARIAN</Type>
<Description>TXT_KEY_CIV_BARBARIAN_DESC</Description>
<ShortDescription>TXT_KEY_CIV_BARBARIAN_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_BARBARIAN_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_BARBARIAN_PEDIA</Civilopedia>
<DefaultPlayerColor>PLAYERCOLOR_BLACK</DefaultPlayerColor>
Change "PLAYERCOLOR_BLACK" to "PLAYERCOLOR_WHITE".
Similarly, you can change the English from white to some other colour.
Not everything is that easy.
jkp1187 Oct 27, 2005, 12:25 PM To change the Barbs to white, go to ...\Assets\XML\ and you'll find a file called CIV4CivilizationInfos.xml. You can open it with any text editor (e.g., NotePad). Scroll down well towards the bottom and you'll see:
<CivilizationInfo>
<Type>CIVILIZATION_BARBARIAN</Type>
<Description>TXT_KEY_CIV_BARBARIAN_DESC</Description>
<ShortDescription>TXT_KEY_CIV_BARBARIAN_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_BARBARIAN_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_BARBARIAN_PEDIA</Civilopedia>
<DefaultPlayerColor>PLAYERCOLOR_BLACK</DefaultPlayerColor>
Change "PLAYERCOLOR_BLACK" to "PLAYERCOLOR_WHITE".
Similarly, you can change the English from white to some other colour.
Not everything is that easy.
Dude! You rock!!!! Thanks!
Now, I'm going to press my luck and ask one more question: Is there a list of colors available anywhere, or do the colors used represent the total colors available?
PeteT Oct 27, 2005, 12:43 PM Check out .../Assets/XML/Interface/CIV4PlayerColorInfos.xml. Each PLAYERCOLOR_XXX actually has a ColorTypePrimary and a ColorTypeSecondary. But anyway, all the available colours should be there.
You might be able to add your own new colour scheme. I dunno though cause I haven't tried that.
jkp1187 Oct 27, 2005, 01:16 PM Do I have to change the code in both CIV4CivilizationInfos.xml AND CIV4PlayerColorInfos.xml?
PeteT Oct 27, 2005, 02:05 PM If you want to use the existing colour schemes, you just have to change the one line in CIV4CivilizationInfos.xml (like from "PLAYERCOLOR_BLACK" to "PLAYERCOLOR_WHITE").
OTOH, I just had a go at putting in a new colour scheme. At the bottom of CIV4PlayerColorInfos.xml I added PLAYERCOLOR_GREEN_YELLOW:
<PlayerColorInfo>
<Type>PLAYERCOLOR_YELLOW</Type>
<ColorTypePrimary>COLOR_PLAYER_YELLOW</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_DARK_BLUE</ColorTypeSecondary>
<TextColorType>COLOR_PLAYER_YELLOW_TEXT</TextColorType>
</PlayerColorInfo>
<PlayerColorInfo>
<Type>PLAYERCOLOR_GREEN_YELLOW</Type>
<ColorTypePrimary>COLOR_PLAYER_GREEN</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_YELLOW</ColorTypeSecondary>
<TextColorType>COLOR_PLAYER_GREEN_TEXT</TextColorType>
</PlayerColorInfo>
This combo wasn't used before. But you have to make up a unique name because PLAYERCOLOR_GREEN was previously used with the secondary colour black.
So next I went to CIV4CivilizationInfos.xml and gave the Japanese this new scheme:
<Type>CIVILIZATION_JAPAN</Type>
<Description>TXT_KEY_CIV_JAPAN_DESC</Description>
<ShortDescription>TXT_KEY_CIV_JAPAN_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_JAPAN_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_JAPAN_PEDIA</Civilopedia>
<DefaultPlayerColor>PLAYERCOLOR_GREEN_YELLOW</DefaultPlayerColor>
And it worked: when I started a new game the Japanese had my new colour scheme. :)
jkp1187 Oct 27, 2005, 03:47 PM SO was the color...blue...? :D
Eyemaze Oct 27, 2005, 03:54 PM Nice one PeteT
jkp1187 Oct 28, 2005, 06:00 AM SO was the color...blue...? :D
Nevermind. Now I see what you mean about secondary colors.
I changed the color of England to Red, and Barbarians to white. It worked. Now, however, the English flag thingy is a white cross on a red background instead of vice-versa. Any way to change the color of *just* the banner?
King Jason Oct 28, 2005, 06:09 AM You'll need to edit the color itself. For example, you chose england to Red.
if you open up the CIV4PlayColorInfos XML in the interface folder, you'll see the list of colors, if you scroll down to red you get this:
<PlayerColorInfo>
<Type>PLAYERCOLOR_RED</Type>
<ColorTypePrimary>COLOR_PLAYER_RED</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_WHITE</ColorTypeSecondary>
<TextColorType>COLOR_PLAYER_RED_TEXT</TextColorType>
</PlayerColorInfo>
Because these colors also show up on the player flag ingame, there is the secondary color that makes up the design, in this case, the cross.
The primary color will always equal your border color for the civ, so we leave that as red for endland. The secondary color is the stripe, if you want to have a blank red flag, then you can choose red again. Or you can come up with any other combo.
just a note; when editing the colors it's best to go ingame first to see what the color combo actually is, for example; here for englane we have the background the primary color, while the cross is the 2ndary, conversely for Japan (who originally has red in civ4) the Circle has the primary, where the background has the 2ndary.
So you'll need to figure those out first.
one rule that's always the same is that the primary color is always the color of the nation's borders.
jkp1187 Oct 28, 2005, 07:11 AM I see. So if you specify primary color to be, for instance, RED, then the game looks in the other file, sees that if Red = primary, then white = secondary, then applies those colors to the cross pattern assigned to the English flag, and I end up with a white cross on a red background, looking much like the Danish flag.
I note that the flags in the scenarios (scenaria?) are different -- the English flag is the Union Jack, for example. So much more extensive mods of hte flag must be possible. Any thoughts on how I would go about changing the BASIC DESIGN of the flag?
To keep it simple, let's say I just want to change the coloring of the "St. George's Cross" flag, so that the PRIMARY color goes to the cross and the SECONDARY color goes to the background.
Again, I appreciate all the help you guys are giving here!
jkp1187 Oct 28, 2005, 02:06 PM Okay, I noticed that in the Revolutionary War folder, there is an /Art/TeamColor directory that containes files such as these:
FlagDECAL_BetsyRoss.dds
FlagDECAL_France.dds
FlagDECAL_FranceAlternative.dds
FlagDECAL_FranceBleu.dds
FlagDECAL_Rebels.dds
FlagDECAL_Spain.dds
FlagDECAL_Spain1785.dds
FlagDECAL_UK.dds
I have searched the various Python and XML files, and none of them seem to point to these files or the *.dds files. I'd like to import these into my game and use them in a regular game, but I'm not sure how to do that.
The corresponding "CIV4CivilizationInfos" file in the Am Rev scenario seems simliar to the one for the default game.
Confused here.
PeteT Oct 28, 2005, 08:08 PM I don't have the final version of the American Revolution Mod, but there should be in it's .../Assets/XML/Art folder a file called CIV4ArtDefines.xml. Here's a snippet from the corresponding file in the North Africa Mod:
<!--WW2NA - Civs-->
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_UK</Type>
<Button>Art/Interface/Buttons/Civilizations/England.dds</Button>
<Path>Art/Interface/TeamColor/FlagDECAL_UK.dds</Path>
<bWhiteFlag>1</bWhiteFlag>
</CivilizationArtInfo>
(Note that CIVILIZATION_UK is a new civ in this Mod, it's not the same as CIVILIZATION_ENGLAND.)
This is where those FlagDECAL_XXX.dds files that you mentioned get referenced.
The corresponding "CIV4CivilizationInfos" file in the Am Rev scenario seems simliar to the one for the default game.
That's how Mods work. To make a Mod:
1. Create a folder in ...\Mods\ with the name of your Mod, e.g., MyMod.
2. In the folder MyMod, duplicate (where necessary) the file structure of vanilla game.
So if you want to mod the above XML file, CIV4ArtDefines.xml, thats in the vanilla .../Assets/XML/Art, you create a folder Assets in your new MyMod folder; then a folder XML in this new Assets folder; etc. Check out how Locutus, Dale, and Trip/Jon_S did it with the mods that came with the game.
3. Now modify CIV4ArtDefines.xml and put it in your .../MyMod/Assets/XML/Art folder.
4. Go to 2 and repeat for any other files you want to modify.
When you tell the game to load a Mod, it uses these new Mod files instead of it's vanilla files.
oldStatesman Oct 28, 2005, 08:16 PM Looking for clarification:
For a mod do you need to duplicate the entire vanilla tree - or just the files that have changed. I.E. will the mod look for the missing files in the vanilla tree.
PeteT Oct 28, 2005, 08:18 PM You just need to duplicate the paths to the files you've changed.
oldStatesman Oct 28, 2005, 08:20 PM You just need to duplicate the paths to the files you've changed.
Thanks! :D :goodjob:
jkp1187 Oct 29, 2005, 09:43 AM Okay, but I was looking for a way to permanently change the file so that I didn't have to go to "mods" every time I played the game. I found the following text in the "vanilla" Civ4ArtDefines_Civilization file:
<Type>ART_DEF_CIVILIZATION_ENGLAND</Type>
<Button>,Art/Interface/Buttons/Civilizations/England.dds,Art/Interface/Buttons/Civics_Civilizations_Religions_Atlas.dds,7,5</Button>
<Path>Art/Interface/TeamColor/FlagDECAL_StGeorgeCross.dds</Path>
<bWhiteFlag>0</bWhiteFlag>
</CivilizationArtInfo>
<CivilizationArtInfo>
I figured I would just put the "FlagDECAL_UK.dds" file in the appropriate path, and either change its name to "FlagDECAL_StGeorgeCross.dds" or just replace the language so that the code points to the path in the Mod file
Thing is, I can't find a "FlagDECAL_StGeorgeCross.dds" file anywhere. Odd. In fact, NONE of the FlagDecal files in the ArtDefines file are anywhere to be found. Well, I'll try to change the code to point to the UK flag in the mod file and see how that works.
jkp1187 Oct 29, 2005, 10:06 AM Well, that didn't work.
[EDIT]
Whoops, typo when I entered the code. I got it to work. Problem is....well, part of the flag's colors are tied to the civ's primary color setting. So the flag won't work unless England has white as a primary color setting. But then that subverts my original goal of having barbarians colored white.
Surely there must be some way around that -- I mean, the British flag is properly colored in the Revolutionary War mod, while the British player has RED as his territorial color. Is there some easily (HA!) accessible XML coding that controls territory color?
low Oct 29, 2005, 10:18 AM Go here:
http://www.2kgames.com/civ4/support_ati.htm
Bottom of page and download PakBuild. Now you can unpack the "Art0.FPK" file located in the Assets folder. You should then be able to find the .dds you're looking for.
jkp1187 Oct 29, 2005, 10:33 AM Go here:
http://www.2kgames.com/civ4/support_ati.htm
Bottom of page and download PakBuild. Now you can unpack the "Art0.FPK" file located in the Assets folder. You should then be able to find the .dds you're looking for.
THanks. Unfortunately, I'm still using Windows 2000, so I won't be able to use this until they make the software compatible with it. :(
ShroudedMist Oct 29, 2005, 10:54 AM You can also just open a specific World Builder Save file and edit civ colors specifically for that one scenario as well if you don't want to globally change every color.
What we really need is some updated xml files that allow one to pick civ colors in the setup screens when you're choosing you civ, leader and difficulty level.
low Oct 29, 2005, 10:56 AM What we really need is some updated xml files that allow one to pick civ colors in the setup screens when you're choosing you civ, leader and difficulty level.
Good idea.
jkp1187 Oct 29, 2005, 11:05 AM You can also just open a specific World Builder Save file and edit civ colors specifically for that one scenario as well if you don't want to globally change every color.
What we really need is some updated xml files that allow one to pick civ colors in the setup screens when you're choosing you civ, leader and difficulty level.
Hmm. I'll bet that's what they did in that American Revolution scenario.
Oh well, at least I learned a bit about how XML works trying this.
ShroudedMist Oct 29, 2005, 11:24 AM Correct jkp1187
Some of the World Builder Save files have sections such as
BeginPlayer
Team=0
...
Color=PLAYERCOLOR_BLUE
....
Handicap=HANDICAP_NOBLE
EndPlayer
which follow the Begin Team sections. I left out most of what occurs there but it's fairly straight forward what a lot of the settings correspond to ingame.
\Assets\XML\Interface\CIV4ColorVals.xml in your install directory has listings for the appropriate color names although a save file with 18 civs will list them all as well.
jkp1187 Oct 29, 2005, 11:33 AM For what it's worth, the stars & stripes work relatively well with the default American colors (although the white stripes appear light blue, close enough for government work and/or someone who doesn't really know how to program). The union jack for England looks fine, as long as you keep the default colors.
vladdy Oct 29, 2005, 12:11 PM Here's something more advanced.
You can alter flags using NVidia DDS plug-in for photoshop.
http://developer.nvidia.com/object/nv_texture_tools.html
Not tested, I'm getting ready to try it.
Flags are located in
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\Art\interface\buttons\civilizations
XML file for your custom civ should reference new symbol.
Kopernikus1979 Oct 29, 2005, 03:49 PM I also wanted to mod the new Civ IC colours to the "old" Civ III colours. Seems to be some kind of difficult... :(
jkp1187 Oct 31, 2005, 07:19 AM I also found out that even just altering the color XML files gives your opponents a "Civ versions do not match!" warning when going multiplayer.
DaveShack Oct 31, 2005, 01:16 PM Here's another subject on modding civ colors. I'd like the transparency level to be a little less transparent at the edge, so the border actually shows up a little better. Any ideas on how to change this? And I'd like to totally replace the white one with something else, it really doesn't show up well. Can you specify the actual color values to be used?
bad_ronald Oct 31, 2005, 10:30 PM For what it's worth, the stars & stripes work relatively well with the default American colors (although the white stripes appear light blue, close enough for government work and/or someone who doesn't really know how to program). The union jack for England looks fine, as long as you keep the default colors.All you have to do is go to '\Assets\XML\Art\CIV4ArtDefines_Civilization.xml' and change <bWhiteFlag>0</bWhiteFlag> to <bWhiteFlag>1</bWhiteFlag> for all the civs who you've given a flag that requires a white background to look correct.
Take a look (America conquered Shanghai):
http://www.civfanatics.net/uploads10/Civ4FlagMods.JPG
I took the Union Jack from the American Revolution scenario, and the American and Spanish flags from the Desert War scenario (note that the Spanish flag is from the WWII era, not the current one). I also "fixed" the Eye of Ra ;).
jkp1187 Oct 31, 2005, 11:03 PM Brilliant! If it wasn't 1AM here, I'd try it out. Wait until....yawn....tomorrow...zzzzzzzzz
jkp1187 Nov 01, 2005, 07:08 AM Got it. It works beautifully. Thank you!
Perhaps this should be stickied....
Kopernikus1979 Nov 01, 2005, 07:13 AM Could you please tell us, how exactly you have made the changes? thx...
jkp1187 Nov 01, 2005, 08:13 AM Could you please tell us, how exactly you have made the changes? thx...
I'll do a write-up when I get home from work tonight.
bad_ronald Nov 01, 2005, 03:20 PM Note: It is good practice to back up your files before modifying them
In order to set the English flag as the Union Jack, and set the American flag, and Spanish (WWII) flag as defaults, make the following changes:
Open "...\Assets\XML\Art\CIV4ArtDefines_Civilization.xml"
Under <Type>ART_DEF_CIVILIZATION_AMERICA</Type> find <Path>Art/Interface/TeamColor/FlagDECAL_Star.dds</Path> and replace with <Path>Mods/Desert War/Assets/Art/Interface/TeamColor/FlagDECAL_USA.dds</Path>
Under <Type>ART_DEF_CIVILIZATION_ENGLAND</Type> find <Path>Art/Interface/TeamColor/FlagDECAL_StGeorgeCross.dds</Path> and replace with <Path>Mods/American Revolution/Assets/Art/Interface/TeamColor/FlagDECAL_UK.dds</Path>
Under <Type>ART_DEF_CIVILIZATION_SPAIN</Type> find <Path>Art/Interface/TeamColor/FlagDECAL_Castle.dds</Path> and replace with <Path>Mods/Desert War/Assets/Art/Interface/TeamColor/FlagDECAL_Spain.dds</Path>
For all three civs change <bWhiteFlag>0</bWhiteFlag> to <bWhiteFlag>1</bWhiteFlag>
In order to make the Egyptian flag look like it does in the pic, you have to modify the civ colors (this will make Egypt appear as black on the map, military advisor screen, etc.). So, if you're okay with that, here is how to do it:
Open "...\Assets\XML\Civilizations\CIV4CivilizationInfos .xml"
Find <Type>CIVILIZATION_EGYPT</Type> and replace <DefaultPlayerColor>PLAYERCOLOR_YELLOW</DefaultPlayerColor> with <DefaultPlayerColor>PLAYERCOLOR_BLACK</DefaultPlayerColor>
Next, open "...Assets\XML\Interface\CIV4PlayerColorInfos.xml"
Find <Type>PLAYERCOLOR_BLACK</Type> and replace <ColorTypeSecondary>COLOR_PLAYER_WHITE</ColorTypeSecondary> with <ColorTypeSecondary>COLOR_PLAYER_DARK_CYAN</ColorTypeSecondary>
As a useful general note, any time you make changes in your (hopefully) backed up xml files, you can leave a comment after any change you make by typing <!--[comment goes here]-->. I put the original colors / flag links in comments after any changes I made.
jkp1187 Nov 02, 2005, 05:51 AM Heh, beat me to it, so I'll just add a couple of marginal things that others may find useful.
Changing <bWhiteFlag>0</bWhiteFlag> to <bWhiteFlag>2</bWhiteFlag> (I experimented) gets you an XML error at startup. It appears to be a binary variable.
The file C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets\XML\Interface\CIV4ColorVals.xml enumerates the available colors and their values. Changing these numbers would (presumably) adjust the appearance of the color. It looks like this:
<ColorVal>
<Type>COLOR_RED</Type>
<fRed>1.00</fRed>
<fGreen>0.00</fGreen>
<fBlue>0.00</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>
<ColorVal>
<Type>COLOR_PLAYER_DARK_RED</Type>
<fRed>0.62</fRed>
<fGreen>0.00</fGreen>
<fBlue>0.00</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>
Note that the "Dark Red" color is not used as a default primary civilization color (it is used as a secondary color), so I changed the English to this color, so that I did not have to change Japan's primary from "Red". The distinction between the two is no worse than the White/Gray distinction.
For the newbies: the "Primary" color is the color of the civilization's borders. It is also one of the colors that appears on the default flag and in color-coded text refering to that civilization. The "Secondary" color also appears on the default flag, depending on how those colors were assigned.
If you have a typo or otherwise enter an invalid value for the design of the flag (e.g., put down "FlagDECAL_USS.dds" instead of "FladDECAL_USA.dds",) the flag will appear as a plain banner colored the secondary color.
Hope all this is helpful.
jkp1187 Nov 04, 2005, 08:31 AM *** Bump ***
ShroudedMist Nov 04, 2005, 09:56 AM Speaking of colors.
Has anyone looked into modding the opacity of your civilizations cultural area and its boundary lines? On the main map it's damn hard to see when you bump into a player's area, especially in certain terrains.
jkp1187 Nov 07, 2005, 02:27 PM Speaking of colors.
Has anyone looked into modding the opacity of your civilizations cultural area and its boundary lines? On the main map it's damn hard to see when you bump into a player's area, especially in certain terrains.
I have to admit, I have not run into this problem. Still, does anyone have an idea of where the cultural/boundary line code is located?
Fabius Nov 09, 2005, 05:33 AM I have run into a snag, maybe someone else can help.
I wanted to add a new color to my new modded civilization so it wouldn't clash. So in my mod's Assets\XML\Interface I edited CIV4ColorVals.xml to include the following:
<ColorVal>
<Type>COLOR_PLAYER_NAVY_BLUE</Type>
<fRed>0.21</fRed>
<fGreen>0.40</fGreen>
<fBlue>1.00</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>
<ColorVal>
<Type>COLOR_PLAYER_NAVY_BLUE_TEXT</Type>
<fRed>0.698</fRed>
<fGreen>0.776</fGreen>
<fBlue>1.00</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>
I realize it's actually the same color as BLUE, but I tried using different values last night had problems, so I wanted to take one of the possible problems (new color's numbers) out of the mix.
Then I went into CIV4PlayerColorInfos.xml and added the following:
<PlayerColorInfo>
<Type>PLAYERCOLOR_NAVY_BLUE</Type>
<ColorTypePrimary>COLOR_PLAYER_NAVY_BLUE</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_YELLOW</ColorTypeSecondary>
<TextColorType>COLOR_PLAYER_NAVY_BLUE_TEXT</TextColorType>
</PlayerColorInfo>
Last, in CIV4CivilizationInfos.xml I edited the tag under my new civ to be:
<DefaultPlayerColor>PLAYERCOLOR_NAVY_BLUE</DefaultPlayerColor>
Should work, right? I can't see anything I'm doing wrong. Yet when I load the mod, when it's doing the InitXML before the game even starts it gives the following error:
Tag:PLAYERCOLOR_NAVY_BLUE in Info class was incorrect
Current XML file is Civilizations/CIV4CivilizationsInfos.xml
For the life of me I can't see what I have done wrong. But these sorts of problems have plagued me from the very beginning with this mod. I put in everything right, yet it doesn't work (I don't have a cache folder, I'm on Windows 2000).
jkp1187 Nov 09, 2005, 08:08 AM Is there another function you have to add someplace to get it to recognize that you've added a new color?
If youfeel like re-arranging colors, "DARK_RED" exists as a pre-defined color -- you could, perhaps, color France dark red, and give "DARK_BLUE" to your new civ. Just a thought.
Fabius Nov 09, 2005, 09:06 AM As for another place to change the colors, I'm not sure. PeteT claimed that when he made a new PLAYERCOLOR scheme in CIV4PlayerColorInfos.xml that it worked. Granted, he used existing colors and didn't try to make new colors themselves like I did. But I'm not getting an error in CIV4PlayerColorInfos.xml, my error is in CIV4CivilizationInfos.xml. As for that, I don't know why as all I'm doing is referencing a tag in CIV4PlayerColorInfos.xml that looks set up correctly to me.
I also looked in the Turkey mod. He made a brand new color scheme (Crimson), pointed Turkey to that scheme in CIV4CivilizationInfos.xml, set up the new scheme in CIV4PlayerColorInfos.xml, then defined the new color variables in CIV4ColorVals.xml. I even took his colors directly from his files and put them in mine . . . same error. For some reason, my CIV4CivilizationInfos.xml won't accept anything new for a color scheme.
And I noticed DARK_RED last night. I dropped DARK_RED into my civ, just to try it, it did work. It's almost like it doesn't want any new colors other than the ones already set up by the game. But if that's the case, then how does the Turkey mod do it? I'm so very confused. It's like I keep hitting 2+2 on my calculator and it keeps coming up 5 (sometimes it comes up 3), while for everyone else in the world it comes up 4!
One thing I was curious about. In the schema, a lot of things say textonly, but for some of the color info it says "eltonly". What is "elt"? Can some programmer (or at least someone more closely resembling a programmer than myself) chime in on that one?
PeteT Nov 09, 2005, 10:58 PM One thing I was curious about. In the schema, a lot of things say textonly, but for some of the color info it says "eltonly". What is "elt"?
<ElementType name="PlayerColorInfos" content="eltOnly">
This line states that we will have an element with the name 'PlayerColorInfos' that will only contain other elements and no other values.
The above was adapted from A Quick Introduction to XML Schemas (http://devcentral.iticentral.com/articles/XML/intro_XML_schemas/default.php), a brief but useful tutorial.
Fabius, if you haven't sorted it out yet, could you zip up the three xml files that you changed and attach them to a post. I copied and pasted from your first post but didn't get the error that you mentioned.
Futumch Nov 10, 2005, 01:18 AM Fabius, I went through the same procedure as you to make nine new player colours for a mod. These were paired up with new flags and eventually they'll replace the names of towns, leader names and such. The mod is called 'Aberrant', based on a Diplomacy variant.
Here's the changes I made for Byzantium, which was a sort of salmon-pink colour. Hopefully this should help you out.
Firstly I worked out the new colours I needed : The RGB value was 253,139,139 - each value has to be normalised to make it fit into Civ's 0 to 1 colour value range (divide the values by 255). That gave me 0.99, 0.545 and 0.545.
The first XML edited was the Assets\XML\Interface\CIV4ColorVals.xml file. I added this script to the bottom end of the main script:
<ColorVal>
<Type>COLOR_PLAYER_BYZA</Type>
<fRed>0.99</fRed>
<fGreen>0.545</fGreen>
<fBlue>0.545</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>
Next I needed to change the Civ that was going to become Byzantine to use this new colour. This is handled by the Assets\XML\CivilizationsCIV4CivilizationInfos.xml file, and you only need to edit two lines there (for each civ):
<DefaultPlayerColor>PLAYERCOLOR_BYZA</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_BYZA</ArtDefineTag>
Next I needed to add the links to the new flag, and that's done by adding to the end of the Assets\XML\Art\CIV4ArtDefines_Civilization.xml file. Here I've used spain's code as a template. Eventually I'll draw buttons for the new nations too.
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_BYZA</Type>
<Button>,Art/Interface/Buttons/Civilizations/Spain.dds,Art/Interface/Buttons/Civics_Civilizations_Religions_Atlas.dds,1,6</Button>
<Path>Art/Interface/TeamColor/flag_byza.dds</Path>
<bWhiteFlag>1</bWhiteFlag>
</CivilizationArtInfo>
Last I added the new colours to the Assets\XML\InterfaceCIV4PlayerColorInfos.xml file.
<PlayerColorInfo>
<Type>PLAYERCOLOR_BYZA</Type>
<ColorTypePrimary>COLOR_PLAYER_BYZA</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_PEACH</ColorTypeSecondary>
<TextColorType>COLOR_PLAYER_WHITE_TEXT</TextColorType>
</PlayerColorInfo>
And there you have it.
Futumch Nov 10, 2005, 02:03 AM Screenshot of the Byzantine border colour in-game. Looks like some Spanish git wanted to get in the screenshot too.
http://www.bluestar.com.au/civ4/byzantines.jpg
Ralendil Nov 10, 2005, 04:31 AM For colors:
Files needed:
\Assets\xml\interface\CIV4ColorVals.xml
\Assets\xml\interface\CIV4PlayerColorInfos.xml
\Assets\xml\civilizations\CIV4CivilizationInfos.xm l
CIV4ColorVals.xml
here, you put your new color:
<ColorVal>
<Type>COLOR_PLAYER_BLUEGREEN</Type>
<fRed>0.220</fRed>
<fGreen>0.70</fGreen>
<fBlue>0.51</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>
<ColorVal>
<Type>COLOR_PLAYER_BLUEGREEN_TEXT</Type>
<fRed>0.213</fRed>
<fGreen>0.70</fGreen>
<fBlue>0.512</fBlue>
<fAlpha>1.00</fAlpha>
</ColorVal>
be careful to add the COLOR_PLAYER_XXX_TEXT (where XXX is the color) to the file... or crash :p.
CIV4PlayerColorInfos.xml
Here you will define the valors linked to the color
<PlayerColorInfo>
<Type>PLAYERCOLOR_BLUEGREEN</Type>
<ColorTypePrimary>COLOR_PLAYER_BLUEGREEN</ColorTypePrimary>
<ColorTypeSecondary>COLOR_PLAYER_DARKVIOLET</ColorTypeSecondary> <!--COLOR_PLAYER_DARK_BLUE-->
<TextColorType>COLOR_PLAYER_BLUEGREEN_TEXT</TextColorType>
</PlayerColorInfo>
CIV4CivilizationInfos.xml
Finally you have to put it in the civilizations entries:
<DefaultPlayerColor>PLAYERCOLOR_BLUEGREEN</DefaultPlayerColor>
Find an entry and replace the color with your color.
BE CAREFUL: Don't put same color for 2 civilizations.... if you do that it would work for some turns until... return to windows :)
For flags:
Files needed:
\Assets\xml\art\CIV4ArtDefines_Civilization.xml
\Assets\xml\civilizations\CIV4CivilizationInfos.xm l
CIV4ArtDefines_Civilization.xml
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_PERSIA</Type>
<Button>,Art/Interface/Buttons/Civilizations/Persia.dds,Art/Interface/Buttons/Civics_Civilizations_Religions_Atlas.dds,6,6</Button>
<Path>Art/Interface/TeamColor/Persia.dds</Path>
<bWhiteFlag>0</bWhiteFlag>
</CivilizationArtInfo>
Type: the entry. You can define it in the file \Assets\xml\civilizations\CIV4CivilizationInfos.xm l
Button: the picture used in the civilopedia. Here I don't have tried yet to put a new button, I personnally use the existing one...
Path: here is the entry for the flag. put here the link to your flag you want to use.
If you use the "Civilization 4\CustomAssets\art\interface\teamcolor" folder you can use for the link: "Art/Interface/TeamColor/"
Exemple you make a new flag for Russia. You name it "Russia.dds" and put it in the "Civilization 4\CustomAssets\art\interface\teamcolor" folder. In the path field you will put: Art/Interface/TeamColor/Russia.dds
bWhiteFlag: tell the game if the flag is a white flag (valor: "1") or a black flag (valor: "0").
CIV4CivilizationInfos.xml
in this file you can precise the entries used for the flag and civilopedia button.
<ArtDefineTag>ART_DEF_CIVILIZATION_RUSSIA</ArtDefineTag>
Making a flag
You need this plug in from Nvidia for Photoshop. This permit Photoshop to load the DDS files
http://developer.nvidia.com/object/photoshop_dds_plugins.html
Plug in for gimp is here: http://nifelheim.dyndns.org/~cocidius/dds/
After go into the directory: Assets\art\interface\teamcolor
Open one and edit it. When you are satisfied save it as DXT3 or DXT5.
Be careful with the alpha channel, if you don't define them.
The white tell to the program what is not displayed in the game, the black tell to the game what is displayed.
The way to make simply a new flag is to copy one picture in the RGB channels and fill the alpha channel in black.
Finally you configure in "CIV4ArtDefines_Civilization.xml" the flag as a white flag.
And you have a new flag in your game...
Hope this will help some ;).
Hentooth Nov 10, 2005, 05:50 AM Nevermind. Now I see what you mean about secondary colors.
I changed the color of England to Red, and Barbarians to white. It worked. Now, however, the English flag thingy is a white cross on a red background instead of vice-versa. Any way to change the color of *just* the banner?
i did that too and ended up with the damned Danish flag!! And for some reason the Jap's flag reversed colours too!
I would just like to say that I have some knowledge of programming and I have so enjoyed tinkering with things like traits, colours, techs, etc.
It makes the game more personal I feel!
jkp1187 Nov 10, 2005, 06:16 AM i did that too and ended up with the damned Danish flag!! And for some reason the Jap's flag reversed colours too!
I would just like to say that I have some knowledge of programming and I have so enjoyed tinkering with things like traits, colours, techs, etc.
It makes the game more personal I feel!
You need to alter the (equivalent) boldfaced code below (stealing the code from above):
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_ENGLAND</Type>
<Button>,Art/Interface/Buttons/Civilizations/<snip></Button>
<Path>Art/Interface/TeamColor/flag_St_George.dds</Path>
<bWhiteFlag>1</bWhiteFlag>
</CivilizationArtInfo>
Make sure that the "Whiteflag" = "1", not "0". This should stop the bleed-thru on the English flag. Not sure how it'll work on the Japanese flag (I changed england to "Dark Red" and changed Japan back to "Red".) I also switched the English flag to the Union Jack from the American Revolution mod included with your game.
(You know what, I'm not sure this will work....it worked for me b/c I actually just started using the pre-drawn flags from the Am Rev mod, which were pre-drawn.)
jkp1187 Jul 27, 2006, 08:01 AM As C4W has its own ART files to modify, I thought I'd revive this thread for the good of the order....
jkp1187 Aug 03, 2007, 07:20 PM Thought I'd give this thread a bump, now that Beyond the Sword is on the scene, with its own files to modify.
icemanjsg Aug 29, 2007, 07:55 AM I am trying to change the color of a civilization in a mod I have downloaded, I have done it by changing the values. However, I am trying to find a specific color and have tried over 30 times now and can't figure out how I can get the color I want. Does anyone know what values I would have to set
<fRed>0.14</fRed>
<fGreen>0.00</fGreen>
<fBlue>0.35</fBlue>
<fAlpha>1.00</fAlpha>
For a sky blue , similar to the Greek empire, I can't find the right color combination and am getting slightly bored now!
Many thanks!
Roman Emperor Nov 01, 2007, 02:52 PM Does anyone know how to find the color value for the txt color I found the color I wanted but how do you figure out for the txt I notice that the values are higher than the color type or does it make a difference. Plz help.
Marshall Thomas Nov 06, 2007, 04:39 PM Does anyone know if there's a way to do this for a saved/current game? In my current game: Hannibal shares borders with William Orange, Ghenghis shares borders with Sitting Bull, and Alexander shares borders with Darius. When looking at the map (the main screen or the world map on the lower right), it's difficult to see where one country ends and the other begins. For example, the Carthaginians and the Dutch look like one big orange country. Can this be changes in a current game? Thanks in advance
By the way, I'm using Lt. Bob's 40 civ mod with Bhuric's unofficial patch.
jkp1187 Nov 06, 2007, 05:26 PM I don't know if there's a way to do it, other than hacking into the save file directly.) I've heard that if you create a scenario via WorldBuilder, there is a editable text file that's generated wherein you can alter the characteristics of various civs.
Kayak06460 Feb 08, 2008, 04:13 PM I did everything you recommended, but when I tried to save the file, I got a box saying that it could not save that file. Something about not finding the path. Any suggestions? I love to play the English, but I can't see my cities.
jkp1187 Feb 08, 2008, 04:26 PM I did everything you recommended, but when I tried to save the file, I got a box saying that it could not save that file. Something about not finding the path. Any suggestions? I love to play the English, but I can't see my cities.
I'm not sure what would cause that. I've changed the color of the English to Dark Red (and Russia to White) in my NextWar mod -- perhaps take a look at how it was done there.
|
|