Changing Interface Colour?

j_mie6

Deity
Joined
Dec 20, 2009
Messages
2,963
Location
Bristol (uni)/Swindon (home)
I want to change the Blue Inferface into a Red Interface (or purple) how would I go about doing this?:rolleyes::king:

thanks,
Jamie
 
The colors of the UI are controlled by the theme file (*.thm) in the Resource/Theme folder (not in Assets). These are text files, so you can edit them the same as you can edit XML or Python files.

The color definitions are mostly in Civ4Theme_Common.thm. A few are defined in other files, but mostly the other files use the definitions from the Common file.
 
so do I need a resourse folder along side my assets?
 
Yes. Maintain the correct folder structure, and copy everything you change into the right place (more on this at the end).

There is also a couple dependencies in the other files that will make your changes do nothing if you don't also change them. You have to make it point to your theme in your mod's folder instead of the default.

In CIV4ArtDefines_Misc.xml find the DEFAULT_THEME_NAME type MiscArtInfo entry and point it to your mod. (So you need this file in your mod too.)

For example, Final Frontier Plus uses this:
Code:
		<MiscArtInfo>
			<Type>DEFAULT_THEME_NAME</Type>
			<Path>Mods/Final Frontier Plus/Resource/Civ4.thm</Path>
			<fScale>0.0</fScale>
			<NIF>None</NIF>
			<KFM>None</KFM>
		</MiscArtInfo>

In the main Resource folder there should be a Civ4.thm file that the above change points to (so, again, you need one of these in your mod too). Edit that. It has only 2 non-comment lines in it and they should both be changed to point to your mod.

Final Frontier Plus uses this:
Code:
// Set the resource 
resource_path	"Mods/Final Frontier Plus/Resource";

// Setup common properties
include			"Mods/Final Frontier Plus/Resource/Themes/Civ4/Civ4Theme.thm";

That should cover the theme related path changes, allowing it to find your files.

Since the theme files have a path specified, I expect you need to copy all of them into your specified include path - not just the ones you change. Not only that but you probably have to copy the entire Resources folder due to the resource_path definition since it might not default to using the BtS versions of these files if you don't have them. You could try it without copying everything, just what you change, and let us know if it works... (I would guess that the odds are, at best, a good 2:1 against it working.)

There is some slim change that leaving the resource_path alone but changing the include line will allow you to copy only the theme files into your mod instead of needing the entire Resource folder (assuming the above mentioned test shows that you need the whole thing). I've never tried any of this - I just know about this because we needed to get Final Frontier Plus to work if Final Frontier was not present, so FFP includes the entire Resource folder from regular FF with just the changes mentioned above.

Edit: By the way - in addition to the colors defined in the Theme files, there are a bunch of graphics files in the two subfolders of the Resource/Civ4 folder that could be involved in changing the look of the UI. Like I said, I haven't actually messed with changing any of this stuff. Perhaps someone who has will come give more information.
 
If you don't want to mess around with RGB values, then i suggest using CivScale for the colour adjustment.
Just change the values for the main game, load it, and if you like it then just copy the theme folder over and revert the changes.
That's how i did it for my mod :D.
 
ok what am I editing in the common file?

(I have edited the misc and the Civ4.thm in the main resources folder, anything else?)

EDIT - Thanks The J I will look into it!
 
In the Common file are a bunch of color definitions, like this:
Code:
		with .Color	//All default color types are set for dynamic color change.
		{		
...
			with SF_CtrlTheme_Civ4_Control_Color
			{
				// Text used for stone components.
				GColor	.AltText					=	GColor( 26, 26, 33,255);
				GColor	.AltTextShadow				=	GColor(141,150,219,128);
				GColor	.AltTextDisable				=	GColor( 26, 26, 33,255);
				GColor	.AltTextShadowDisable			=	GColor(141,150,219,128);
				// Another text used for stone components (lighter brown).
				GColor	.StoneText					=	GColor( 79, 52, 41,255);
				GColor	.StoneTextShadow				=	GColor(255,235,216,255);
				GColor	.StoneTextDisable				=	GColor( 79, 52, 41,128);
				GColor	.StoneTextShadowDisable			=	GColor(255,235,216,128);
There are a bunch in between where the "..." is and a bunch later too. The 4 numbers should be red, green, blue, and alpha.

Based on the labels, these are apparently font, background, and border colors (like the border that appears around selected buttons and such). Based on that, they probably don't affect the bulk of the user interface's color.

I think the actual graphics - the scroll things and various panels with a stone-like texture and whatnot - are in the .tga files in the Resource/Civ4 folder, and in the subfolders (given the name of the folder, I would expect the ones in the HUD folder to be relevant to this). I expect you need to go in and change the color of the graphics in there. Perhaps pick a couple and change the color and see what effect they have to verify that this is how it works. There are some called bg.tga, bg_header.tga, and bg_off.tga that could be good choices for the first to try since they are relatively large images of the basic blue background (with the color variation and cracks) that appears all over the place, with the 3 files having 3 different brightnesses (aside from the brightness, they appear to be pretty much identical).

Although these are .tga files, they should not be nearly as troublesome as the gamefont files since these don't have bunches of little icons in one file with invisible borders and dots that you have to deal with.

You might want to grab one of the UI mods that changes the color and see what is actually changed. There are several in the Civ4 - Graphics Modpacks > Civ4 - Interface Graphics part of the downloads, like the UI Coal mod (I have never looked at any of these sorts of mods).
 
I edited just the Resource/Civ4.thm and the Commons file line 204... it was completly invisble...

The J do you think you could give me the edited files from mars now?

Btw: Civscale failed, My civ4 is too advanced... :lol: (thats a point you could use it to get the right values (a bit darker than Mars but not too dark) and send them to me?)
 
just did before you posted and it's fixed! It look amazing! I'm just gonna play around for the perfect colour... Thanks so much!
 
So you used the modcomp? I hadn't heard much feedback on it and was kind of worried that the instructions were a bit "wordy" and not enough "picturey" and that was keeping some people away.

Anyway, the link in the docs takes to a website that can give good previews of what the colors look like (though you'll still want to test in game of course)
 
yep it wasn't too hard I just edited the civ.thm and the common and copied the rest of the files over... Does anybody know anyhthing about the screen that appears behind the civ options/Religious advisor/ game loading screen? because I would like to change them!
 
For the RGB colours, you can also take a look here. How good that they've chosen red :D.


For the screen...in the .pys you'll get redirected to MAINMENU_SLIDESHOW_LOAD in ArtDefines_Interface, which points to Art/Interface/Screens/Loading/LoadingScreenBGslideshow.dds.
But some screens are sharing this .dds, so take care what you do.
 
Spoiler :
attachment.php


thats the loading screen sorted! what about the one behind the religious advisor/Civics etc
 
nope the one I edited only controlled loading the others are slightly different as they do not have text...
 
But it is definitely the screen, the CvCivicsScreen.py has it in line 98:
PHP:
screen.addDDSGFC(self.BACKGROUND_ID, ArtFileMgr.getInterfaceArtInfo("MAINMENU_SLIDESHOW_LOAD").getPath(), 0, 0, self.W_SCREEN, self.H_SCREEN, WidgetTypes.WIDGET_GENERAL, -1, -1 )
 
Back
Top Bottom