Quick Modding Questions Thread

@Civciv5, it's disheartening. I'm in the middle of the same exercise. Good hunting.
 
Can someone tell me which file (.dds or .tga) is responsible for this blue frame in city building screen?

I checkeg all resource files in civilization 4 main directory but cannot find right file :(
 

Attachments

  • frames2.jpg
    frames2.jpg
    7.6 KB · Views: 41
Can someone tell me which file (.dds or .tga) is responsible for this blue frame in city building screen?

I checkeg all resource files in civilization 4 main directory but cannot find right file :(

if you are referring to the blue around the buttons, i think this is handled in the theme files and is linked to GUI/HUD colour choices, and I think it overwrites (as in lays over top of) any border you put in to the specific button pic. My hud is green and those borders are no longer blue, they are (sort of) green.

But what specifically handles it within the .thm files I do not know, and i do not know if it can be changed to any other kind of border...
 
I checkek CIV4ArtDefines_Interface.xml and im pretty sure its not there
I dont see any python file which can be responsbible for this frame.

I think this must be Civ4Theme_Button.thm or Civ4Theme_Border.thm or other similar thm file.
 
The specific color for that might be controlled by the "HUDBorder" color defined in Civ4Theme_Common.thm. This is in the file Resource\Themes\Civ4\Civ4Theme_Common.thm it is on line 245, and along with the previous line looks like this:
Code:
				// HUD icon border color
				GColor	.HUDBorder					=	GColor( 78, 97,130,255)		: GFC_Control_Color;	//Set for dynamic color change

The actual shapes are defined in the files Resource\Civ4\Custom\multiListItem.tga and multiListItem_big.tga. The shapes in those files are apparently mixed in via the theme definitions relating to the MultiList control in Civ4Theme_Custom.thm; this one, for example:
Code:
skin SF_CtrlTheme_Civ4_Control_MultiList_ItemBorder_Skin
{
	layer {
		LayerFlags		= 	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
		DestCombine		= 	GColorCombine(BlendSource,Disable);
		FactorCombine	= 	GColorCombine(Modulate,Modulate);
		FactorColor		= 	SF_CtrlTheme_Civ4_Control_Color_HUDBorder;
		Image			= 	GBitmap("Civ4/Custom/MultiListItem.tga", HVGrid, 8, 1, 0, 0);
		Margin			= 	GRectMargin(11,11,11,11);
	}
}
This, as far as I can tell (which involves a little guessing), applies the MultiListItem.tga file as an extra layer popssibly with some blending into the underlying image. The image in the tga file is itself "modulated" with the color defined as "SF_CtrlTheme_Civ4_Control_Color_HUDBorder", which is the color defined above (the theme file syntax kinda stinks: it uses ".x" in places and "_x" in other places, so in the SF_CtrlTheme_Civ4_Control_Color section the color is defined as ".HUDBorder" which then becomes tacked onto the end as "_HUDBorder" giving the SF_CtrlTheme_Civ4_Control_Color_HUDBorder which is then used here). This makes the border the color specified since it is white in the tga file which when modulated with another color ends up as whatever the other color is.

So to change the color, try changing that one color definition. To change the shape try changing the tga files.

Or something along those lines. Probably.
 
Ok I tested these files with various settings/
MultiListItem_big.tga and MultiListItem.tga with diffrent graphicsa and alpha channels and thm Civ4Theme_Custom.thm with different colours

and still nothing

Ok nevermind its a side project for me and can wait.
 
Hi, im a beginner modder. Have a question to modders with xp on adding new values to buildings. Is it possible that modifying only CIV4BuildingInfos and CIV4BuildingsSchema may not work without seeting exposure in source code? I am 100% sure BuildingInfos is valid against Schema. I am simply addding BonusProductionChanges value inbetween BonusHealthChanges 'n' BonusHappinessChanges.
So i simply clone declarations of those tags with its name changed. First error i get is failed to Load XML: CIV4SpecialBuildingInfos. Any advice would be welcomed :).
 
So, this tutorial isnt valid anymore? Than you for help.
What would be the dependency tree for adding new values to buildings? Schema->dependant infos xml->CvInfos.cpp->...?
 
So, this tutorial isnt valid anymore? Than you for help.
What would be the dependency tree for adding new values to buildings? Schema->dependant infos xml->CvInfos.cpp->...?

Step 2 of the tutorial you linked.

Step 2: Allowing the SDK to read the new attributes

The next step is to expose our new XML attributes to the SDK. For that we will need to define some functions that will read in the new attributes. This is done in 2 modules. In the CvInfo.cpp we will need to make the following changes:
 
Yes, i edited CvInfos.cpp, .h .I wonder where should i look further? Lets suppose i will set eveything as it should in source, is it enough i ll put edited c++ files to my mod directory, or i need to manualy compile from scratch?
 
I'll post this here also, click on the link in my signature if you want to check out the python file.

I have some problem with the scoreboard, while it scrolls, it is not nearly large enough to display all the names of the civs. (and I haven't met all civs yet!)
Spoiler :

Any idea how to fix this?
 
Random thought - you seem to be listing them with a blank line between each. Is the displayed list being defined as a number of lines in some way? and the number of nations being used to define it? if so that display list would be half the size you need.
 
I used the scrolling scoreboard thingy, I know nothing about python so I can't answer your question properly.
 
Top Bottom