Quick Modding Questions Thread

Didn't work :/ Is it possible that clearing cache could help?
The indentation is clearly out-of-whack. Try this:
Code:
        if pCity.isHolyCity () and gc.getPlayer(iRazingPlayer).isBarbarian():
            return False
 
What exactly does this do:

Civ4BonusClassInfos.xml:
Code:
        <BonusClassInfo>
            <Type>BONUSCLASS_GENERAL</Type>
            <iUnique>0</iUnique> <!-- What function does this have? A global limit on occurences of this type of resource? or? -->
        </BonusClassInfo>
 
BonusClass, not just Bonus... All the bonuses have a bonusclass, and the bonusclasses are:

Spoiler :

<BonusClassInfo>
<Type>BONUSCLASS_GENERAL</Type>
<iUnique>0</iUnique>
</BonusClassInfo>
<BonusClassInfo>
<Type>BONUSCLASS_GRAIN</Type>
<iUnique>5</iUnique>
</BonusClassInfo>
<BonusClassInfo>
<Type>BONUSCLASS_LIVESTOCK</Type>
<iUnique>5</iUnique>
</BonusClassInfo>
<BonusClassInfo>
<Type>BONUSCLASS_RUSH</Type>
<iUnique>4</iUnique>
</BonusClassInfo>
<BonusClassInfo>
<Type>BONUSCLASS_MODERN</Type>
<iUnique>4</iUnique>
</BonusClassInfo>
<BonusClassInfo>
<Type>BONUSCLASS_WONDER</Type>
<iUnique>8</iUnique>
</BonusClassInfo>


Another question: In the Civ4ArtDefines_Bonus, what does this entry do:
Code:
<FontButtonIndex>37</FontButtonIndex>
 
Is there any reference or guide for tags (what they does) in some xml files like buildinginfos, unitinfos and such other ?
 
The indentation is clearly out-of-whack. Try this:

I edited it directly in Idle :dunno:.

Ah, yes, and at this point: Please activate the python exceptions in the civilizationIV.ini file in the BtS folder.

Another question: In the Civ4ArtDefines_Bonus, what does this entry do:
Code:
<FontButtonIndex>37</FontButtonIndex>

If you look e.g. in the city screen, at the right these small symbols when you have a resource, that's the link to these images in the res\fonts\GameFont.tga and _75.tga.

Is there any reference or guide for tags (what they does) in some xml files like buildinginfos, unitinfos and such other ?

Look at the top bar here, where it says "Modiki" ;).
 
In the ArtDefines files, is there any significant consequence of not specifying a path to a KFM file? (ie. having a path to the .nif, but leaving the xml tag for the kfm at <KFM/>)
 
In the ArtDefines files, is there any significant consequence of not specifying a path to a KFM file? (ie. having a path to the .nif, but leaving the xml tag for the kfm at <KFM/>)

It probably won't be animated... KFM is the animation for the model (NIF)

EDIT: Remember though, I'm not an art-monkey, I've enough trouble making my own buttons
 
Thats good news, do you know how to go about combining them?

Easy answer: Look at the mods which you want to use, take everything in it, and put it at the same place in the BUG folder.
Don't overwrite anything, but create new folders if necessary.

Doubled files have to be merged, but in case of BUG + earth 35 civs there should be no need for that.
RFC...well, i think you can't really merge RFC with anything, that's just too big.

In the ArtDefines files, is there any significant consequence of not specifying a path to a KFM file? (ie. having a path to the .nif, but leaving the xml tag for the kfm at <KFM/>)

Like TheLadiesOgre said, it's then not animated, but it will work.
I use in fact some trees as unit in my mod, they don't have a .kfm (what a supprise :D), and there are no problems with them.
 
I seem to have a problem with my modified tga file... As far as I can tell, there's nothing wrong with it (it doesn't mess up in-game text, all icons are displaying properly) except for one thing: my single new icon won't show up in-game. I tried to point to the icon before it (FontButtonIndex 34), and it showed up fine. Setting the entry to FontButtonIndex 35 shows no icon (but I'm fairly sure it should!)... Now, I suppose my problem is with the tga file somehow, but what exactly is wrong? I've attached a zip with the two tga's I use...

Edit: It seems that the Espionage icon is broken, though, but nothing else is broken...
View attachment GameFont.zip

Edit: Found the problem - bad folder structure. So the tga was good after all. ^^
 
How to set the panel colors in the Techtree, for every era a diffrent color, like in ROM ?

Self fishing in Techchooser.py dosen't work.
 
Thanks, but it doesn' work for me. In Mainscreen all buttoms are lost, and Techscreen is totaly empty.
I try it this way;
Code:
			if ( gc.getTeam(gc.getPlayer(self.iCivSelected).getTeam()).isHasTech(i) ):
				screen.setPanelColor(szTechRecord, 85, 150, 87)
				self.aiCurrentState.append(CIV_HAS_TECH)
			elif ( gc.getPlayer(self.iCivSelected).getCurrentResearch() == i ):
				screen.setPanelColor(szTechRecord, 104, 158, 165)
				self.aiCurrentState.append(CIV_IS_RESEARCHING)
			elif ( gc.getPlayer(self.iCivSelected).isResearchingTech(i) ):
				screen.setPanelColor(szTechRecord, 104, 158, 165)
				self.aiCurrentState.append(CIV_IS_RESEARCHING)
			elif ( gc.getPlayer(self.iCivSelected).canEverResearch(i) ):
				screen.setPanelColor(szTechRecord, 100, 104, 160)
				self.aiCurrentState.append(CIV_NO_RESEARCH)
                   elif  gc.getTechInfo(i).getEra () == gc.getInfTypeForTech("ERA_MODERN"):
                         screen.setPanelColor(szTechRecord, 206, 65, 69)
			else:
                          screen.setPanelColor(szTechRecord, 150, 75, 12)
				self.aiCurrentState.append(CIV_TECH_AVAILABLE)
 
Alright, so I've started modding a bit. All I've done with this mod is take away stuff. I've taken away almost all units, every technology except 1, every religion except 1, all buildings, and most civilizations.

So, I play a few turns and I get a crash to desktop. I instead play a hotseat game and I get no such problems, so my guess is that the AI is causing the crash.

I've attached the XML I've been using (if needed). Any help in helping me understand and correct this myself would be appreciated!
 
Did you change anything?
Please activate the python exceptions in the .ini file and post then the error.
Okay, now I got a way:
This is the way to work:
Code:
			if ( gc.getTeam(gc.getPlayer(self.iCivSelected).getTeam()).isHasTech(i) ):
				screen.setPanelColor(szTechRecord, 85, 150, 87)
				self.aiCurrentState.append(CIV_HAS_TECH)
			elif ( gc.getPlayer(self.iCivSelected).getCurrentResearch() == i ):
				screen.setPanelColor(szTechRecord, 104, 158, 165)
				self.aiCurrentState.append(CIV_IS_RESEARCHING)
			elif ( gc.getPlayer(self.iCivSelected).isResearchingTech(i) ):
				screen.setPanelColor(szTechRecord, 104, 158, 165)
				self.aiCurrentState.append(CIV_IS_RESEARCHING)
			elif ( gc.getPlayer(self.iCivSelected).canEverResearch(i) ):
#				screen.setPanelColor(szTechRecord, 100, 104, 160)
				# Ancient Era
				if ( gc.getTechInfo(i).getEra() == 0 ):
					screen.setPanelColor(szTechRecord, 50, 25, 100)
				# Classical Era
				elif ( gc.getTechInfo(i).getEra() == 1 ):
					screen.setPanelColor(szTechRecord, 100, 50, 90)
				# Medieval Era
				elif ( gc.getTechInfo(i).getEra() == 2 ):
					screen.setPanelColor(szTechRecord, 125, 100, 80)
				# Renaissance Era
				elif ( gc.getTechInfo(i).getEra() == 3 ):
					screen.setPanelColor(szTechRecord, 175, 125, 70)
				# Industrial Era
				elif ( gc.getTechInfo(i).getEra() == 4 ):
					screen.setPanelColor(szTechRecord, 200, 175, 60)
				# Modern Era
				elif ( gc.getTechInfo(i).getEra() == 5 ):
					screen.setPanelColor(szTechRecord, 225, 225, 50)
				# Future Era
				else:
					screen.setPanelColor(szTechRecord, 225, 225, 150)
				self.aiCurrentState.append(CIV_NO_RESEARCH)
			else:
				screen.setPanelColor(szTechRecord, 206, 65, 69)
				self.aiCurrentState.append(CIV_TECH_AVAILABLE)

and to a second block in techchooser:
Code:
				if ( gc.getTeam(gc.getPlayer(self.iCivSelected).getTeam()).isHasTech(i) ):
					screen.setPanelColor(szTechRecord, 85, 150, 87)
				elif ( gc.getPlayer(self.iCivSelected).getCurrentResearch() == i ):
					screen.setPanelColor(szTechRecord, 104, 158, 165)
				elif ( gc.getPlayer(self.iCivSelected).isResearchingTech(i) ):
					screen.setPanelColor(szTechRecord, 104, 158, 165)
				elif ( gc.getPlayer(self.iCivSelected).canEverResearch(i) ):
#					screen.setPanelColor(szTechRecord, 100, 104, 160)
					# Ancient Era
					if ( gc.getTechInfo(i).getEra() == 0 ):
						screen.setPanelColor(szTechRecord, 50, 25, 100)
					# Classical Era
					elif ( gc.getTechInfo(i).getEra() == 1 ):
						screen.setPanelColor(szTechRecord, 100, 50, 90)
					# Medieval Era
					elif ( gc.getTechInfo(i).getEra() == 2 ):
						screen.setPanelColor(szTechRecord, 125, 100, 80)
					# Renaissance Era
					elif ( gc.getTechInfo(i).getEra() == 3 ):
						screen.setPanelColor(szTechRecord, 175, 125, 70)
					# Industrial Era
					elif ( gc.getTechInfo(i).getEra() == 4 ):
						screen.setPanelColor(szTechRecord, 200, 175, 60)
					# Modern Era
					elif ( gc.getTechInfo(i).getEra() == 5 ):
						screen.setPanelColor(szTechRecord, 225, 225, 50)
					# Future Era
					else:
						screen.setPanelColor(szTechRecord, 225, 225, 150)
					self.aiCurrentState.append(CIV_NO_RESEARCH)
				else:
					screen.setPanelColor(szTechRecord, 206, 65, 69)
 
Back
Top Bottom