Quick Modding Questions Thread

Three pretty simple quesions

1) Where is the actual flag decalred for each era? I have horizontal flags but it only works in modern eram any ideas?
2) Where can i say to have all eras have the same city style?
3)Is there a mod comp for adding color diversity to eras in techs? I know it has been done, maybe in regular bts but i cant find much on it
 
2) buildings/civ4cityLsystem.xml
that file is a pain, but you n eed to delete all parts with references to unneeded sitystyles, leave only one of each leaf size, and instead of eras put ERA_ALL

example:

<ArtRef Name="generic:an_eu.nif::1x1_01">
<Attribute Class="Era">ERA_ALL</Attribute>
<Attribute Class="ArtStyle">ARTSTYLE_EUROPEAN,ARTSTYLE_BARBARIAN</Attribute>
<Attribute Class="Scalar">iBatchGroup:0</Attribute>
</ArtRef>
 
1) ArtDefines_Misc
PHP:
		<MiscArtInfo>
			<Type>ART_UNITGROUP_FLAG_ANCIENT</Type>
			<Path>None</Path>
			<fScale>0.8</fScale>
			<NIF>Art/Units/Flags/Ancient_Flag.nif</NIF>
			<KFM>Art/Units/Flags/Ancient_Flag.kfm</KFM>
		</MiscArtInfo>
		<MiscArtInfo>
			<Type>ART_UNITGROUP_FLAG_MEDIEVAL</Type>
			<Path>None</Path>
			<fScale>0.8</fScale>
			<NIF>Art/Units/Flags/Medieval_Flag.nif</NIF>
			<KFM>Art/Units/Flags/Medieval_Flag.kfm</KFM>
		</MiscArtInfo>
		<MiscArtInfo>
			<Type>ART_UNITGROUP_FLAG_MODERN</Type>
			<Path>None</Path>
			<fScale>0.8</fScale>
			<NIF>Art/Units/Flags/Modern_Flag.nif</NIF>
			<KFM>Art/Units/Flags/Modern_Flag.kfm</KFM>
		</MiscArtInfo>


3) I thought also that I recently saw that somewhere. Did j_mie maybe do something like that :hmm:?
If not, the change of colours in the tech screen .py should not be too hard to make (means I can do it, if you request it)
 
2) buildings/civ4cityLsystem.xml
that file is a pain, but you n eed to delete all parts with references to unneeded sitystyles, leave only one of each leaf size, and instead of eras put ERA_ALL

example:

<ArtRef Name="generic:an_eu.nif::1x1_01">
<Attribute Class="Era">ERA_ALL</Attribute>
<Attribute Class="ArtStyle">ARTSTYLE_EUROPEAN,ARTSTYLE_BARBARIAN</Attribute>
<Attribute Class="Scalar">iBatchGroup:0</Attribute>
</ArtRef>
Thanks:D
1) ArtDefines_Misc
PHP:
		<MiscArtInfo>
			<Type>ART_UNITGROUP_FLAG_ANCIENT</Type>
			<Path>None</Path>
			<fScale>0.8</fScale>
			<NIF>Art/Units/Flags/Ancient_Flag.nif</NIF>
			<KFM>Art/Units/Flags/Ancient_Flag.kfm</KFM>
		</MiscArtInfo>
		<MiscArtInfo>
			<Type>ART_UNITGROUP_FLAG_MEDIEVAL</Type>
			<Path>None</Path>
			<fScale>0.8</fScale>
			<NIF>Art/Units/Flags/Medieval_Flag.nif</NIF>
			<KFM>Art/Units/Flags/Medieval_Flag.kfm</KFM>
		</MiscArtInfo>
		<MiscArtInfo>
			<Type>ART_UNITGROUP_FLAG_MODERN</Type>
			<Path>None</Path>
			<fScale>0.8</fScale>
			<NIF>Art/Units/Flags/Modern_Flag.nif</NIF>
			<KFM>Art/Units/Flags/Modern_Flag.kfm</KFM>
		</MiscArtInfo>


3) I thought also that I recently saw that somewhere. Did j_mie maybe do something like that :hmm:?
If not, the change of colours in the tech screen .py should not be too hard to make (means I can do it, if you request it)
Thanks for the flags, artdefinesinterface makes more sence to mee...:crazyeye:
For the colors, i heard somewere that its been done and im almost confident ive seen it before. I'm sure a mod has them somewere. Checked big mods like realism inictus and its not in there, so no idea where
 
more questions :

1.
Spaceship graphics and spaceship parts graphics: where are they? Where are the references to them in xml? Where are the graphics themselves?


2.
I have some civ-specific non-researchable technologies (some civs start with them). However, if I put them in an ancient era, when starting a game in later era they will be available to everybody...
If I put them in a late era, the civs which have them will be in that era and that will scew their artstyles (their cities will look modern).
any solution? :confused: perhaps it's possible to exclude some specific techs from advanced start?

3. I didn't realize a fort needs to be inside your cultural borders for ships to enter. Is there a way around it? I want a fort to be passable by any civ.
 
2) you can deactivate the advanced start, so that it doesn't happen.

3) ...er...that's doable, but ugly.
You'd have to make some land units all terrain units, but restrict their movement to only certain water plots (like for the trireme).
 
Not that I can think of.

Anyway, have you seen this?

In your case it's faster to do it manually in the xml, but if you plan some other major changes to the tech tree, it's a really good tool

I can't seem to get this to work. downloaded and extracted into BTS mobs folder
loading as a mod from BTS mod menu - the game crashes :eek:
 
well i will play with it later.
another question for now :)

I want to give a building _+%gold bonuses based on resources avilable, like gold and silver.
I did it like this:

Code:
			<BonusYieldModifiers>

				<BonusYieldModifier>
					<BonusType>BONUS_GOLD</BonusType>

						<YieldModifiers>
							<iYield>0</iYield>
							<iYield>0</iYield>
							<iYield>10</iYield>
						</YieldModifiers>
				</BonusYieldModifier>

				<BonusYieldModifier>
					<BonusType>BONUS_SILVER</BonusType>
					
						<YieldModifiers>
							<iYield>0</iYield>
							<iYield>0</iYield>
							<iYield>10</iYield>
						</YieldModifiers>
				</BonusYieldModifier>

			</BonusYieldModifiers>

problem is: it works but it gives wrong +%gold
it gives +YEILD gold rather than +commerce gold, but building info file doesn't appear to have a section to give comerce modifier based of bonuses....

unless I am missing it. any siggestions?
 
What governs the disappearance of forests\jungles when you build a city on top of them?
I want to python something: when a specific race builds a city in a jungle, the jungle stays (I can add a jungle on top of a city in worldbuilder, it's not displayed but exists, which is presisly what I need)
apparently onCityBuilt is called after features have been deleted, so is it dll then?

- plan B is to add a loop to onCityBuilt that counts jungles around the city, and adds a jungle if there are many.


---
If anyone is curious for why do I need such a curiousity - a race of lizards gets huge benefits on jungle warfare, and shouldn't lose them when defending their jungle cities.
 
That's done via Python.
In CvGameUtils.py there is:
PHP:
	def citiesDestroyFeatures(self,argsList):
		iX, iY= argsList
		return True

I'm not sure if this is triggered before or after the city is build.
If it's after, then a small modification of the code should do it:

PHP:
	def citiesDestroyFeatures(self,argsList):
		iX, iY= argsList
###feature not destroyed if civ X start		
		pPlot = CyMap().plot(iX,iY)
		pCity = pPlot.getPlotCity ()
		pPlayer = gc.getPlayer(pCity.getOwner())
		if (pPlayer.getCivilizationType () == gc.getInfoTypeForString("CIVILIZATION_WHATEVER")) and pPlot.getFeatureType()==gc.getInfoTypeForString("FEATURE_JUNGLE"):
                        return False
                else:
                        return True
###feature not destroyed if civ X end		
		return True


Else, if it's before: Replace True with False, and don't care about the other civs. You can still chop whatever feature is there in the city.
 
Back
Top Bottom