End-Turn Button Color Changes HOWTO

Rayanth

Prince
Joined
Sep 16, 2005
Messages
303
End-Turn Button Color-Change!
-----------------------------
I discovered the settings for the End Turn Button's colors while perusing the theme files for my HUD mod. A tutorial on how to change it follows.

The colors for the End Turn button are defined in the following file:
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Resource\Themes\Civ4\Civ4Theme_Common.thm
Lines 247-250 are the relevant lines.

An easy, quick but sort of dirty way to change the colors of the End turn button follows:

Please note that this change cannot be made mod-specific. There is no CustomResource folder, so changing something in the Resource folder changes it for the core game, and affects all mods as well.

Meaning of the Line parts:
GColor .EndTurnDot_Green = GColor( 0,192, 0,255);

The first part, GColor .EndTurnDot_Green is defining a property and its type. in this case, the property is EndTurnDot_Green, and it is of type GColor (a color).
This is a subproperty of another set of properties, etc... but in this case it is only used for the end-turn button.
(this property's full path is SF_CtrlTheme_Civ4_Control_Color_EndTurnDot_Green)

The second part, the = sign, is an assignment operator, as you probably guessed. We are assigning the right half to the property.

The final part, GColor( 0,192, 0,255);, is the actual color definition. This is in RGBO format - Red, Green, Blue, Opacity.
This is the part we are interested in.

EndTurnDot_Green: Color of button when there are still things that can be done this turn
EndTurnDot_Red: "bright" color of button when there is nothing else to do
EndTurnDot_DarkRed: "dark" color of button when there is nothing else to do
EndTurnDot_Disabled: Not quite sure, but the RGB value is gray, so i'd say just leave it alone. (maybe used in MP when it is not your turn? I don't play MP, so....)

Basically just change the RGB Values appropriately. the Opacity value (the 4th value) should be left alone -- 255 is 100% Opaque, which is ideal for this button.

For example, to have the button stay a bright blue during your turn, and flash between Yellow at the end of the turn, use the following lines:

Code:
GColor	.EndTurnDot_Green = GColor(  0,  0,192,255);	
GColor	.EndTurnDot_Red = GColor(255,242,  0,255);
GColor	.EndTurnDot_DarkRed = GColor(171,160,  0,255);
GColor	.EndTurnDot_Disable = GColor(128,128,128,255);

Making Red and DarkRed the same color will erase the illusion of the button "flashing"

Also understand that you are NOT changing the NAME of the color (IE, EndTurnDot_Red) -- you are only changing the RGB values. Changign the name WILL cause it to break. (It will still run the game, just look very funny) The reason for this is because the EndTurn button is actually *drawn* in another file, this is just the definition for the reference. the other file references the NAME of the color, so if you change the name it will not be able to find it. ONLY CHANGE THE RGB VALUES

Addendum:
This file is used to define lots of portions of the HUD. changing anything other than the values noted above could result in drastic changes to the look of your HUD. Edit with caution, and ALWAYS make a backup.
 
Rayanth said:
Please note that this change cannot be made mod-specific. There is no CustomResource folder, so changing something in the Resource folder changes it for the core game, and affects all mods as well.

One could always try to make such a folder ;)
 
Paasky said:
One could always try to make such a folder ;)

Well, I tried to no avail... if you figure out how, lemme know =) it'll make things MUCH easier for the HUD mods.
 
Hmm... If several search folders can be given (like in C3C) you could make a new mod, named HUDmod, and add everything there. If you can add only one search folder, you can put it into the folder of whatever mod you're using ;)
 
I'm not sure I understand. The folder that contains all of the HUD information is in /Resource. This is not in the same tree as /Assets, so /CustomAssets wouldn't affect it, nor would /MODS... to the best of my understanding there is no way to create alternate themes... as far as I can currently tell the actual theme file (/Resource/Themes/Civ4.thm) is hardcoded into the game. I have sent a PM to a dev for input on this, to see if they can confirm it for me, or tell me how to bypass the issue.
 
I created a Mod named HudMod, per yoru suggestion, and copied my original backup of the original theme to it (leaving my heavily-modded hud in the default Themes directory)

so I have :

C:\Documents and Settings\Rayanth\My Documents\My Games\Sid Meier's Civilization 4\MODS\HudMod\Resource\

And all of its subdirectories and themes and stuff intact.

In theory then, when I load this Mod and start a game, I should get the Mod's HUD, which currently is the original HUD. If it loads anything but the original HUD, then it's loading the *Default* HUD, which in my comp is heavily modified.

So I tested it - loaded Mod, started new game and got my heavily modded HUD, meaning it's still loading the Default HUD, NOT the one from the Mod directory.
 
You had me thinking you'd succeeded in doing it, and were just making me figure it out on my own.... :cry:
 
Look at what I found!
"... I found a post that said to delete your cache, i went into the cache folder and deleted all the files (there probably is a more elegant way to do that but i'm no techie) and the next time i loaded the game, the custom files were in"

Maybe you could try that?
 
it's not caching the Resources folder, it loads it freshe very time (I know this because i never have to clear cache when i make changes in Resources)

the cache trick is for mods that alter more game-centric stuff, particularly XML
 
Trip is suggesting it might still be possible... I'm asking for more details at the moment.
 
as it turns out, I have discovered a method of making this Mod-specific. However, it will require its own accompanying comprehensive tutorial on the Theme files, so it will be some time before I am able to post this.
 
Have you tried investigating changes to CIV4ArtDefines_Interface.xml? You see entries like this:
Code:
<InterfaceArtInfo>
		<Type>INTERFACE_GENERAL_ENDTURN_GREENON</Type>
		<Path>Art/Interface/Buttons/General/EndTurn_GreenON.dds</Path>
		</InterfaceArtInfo>
		<InterfaceArtInfo>
This would tend to suggest that you could include a modified .xml pointing at your new .dds files and thus achieve the changed button that way. Just a thought.
 
Back
Top Bottom