How to do this mod?? (tundra gain +2 faith from tile)

yas1k

Chieftain
Joined
Aug 26, 2018
Messages
18
I wanna make the mod (tundra gain +2 faith from tile) But dont know how.
If i add this trait:

</Traits>
<Terrain_Yields>
<Row>
<TerrainType>TERRAIN_TUNDRA</TerrainType>
<YieldType>YIELD_FAITH</YieldType>
<Yield>2</Yield>
</Row>
</Terrain_Yields>


Bonus will be add for all civilizations.
How to do this bonus works only for 1 civilizaion??
 
Last edited:
<Terrain_Yields> defines the inherent yields of a tile. And as you've discovered this has no relation to anything in the Traits tables.

The simplest method is to create a free building no one can normally get, and add it to the trait as for example
Code:
<GameData>
	<Traits>
		<Row>
			<Type>TRAIT_X</Type>
			..other stuff like the description..
			<FreeBuilding>BUILDING_X</FreeBuilding>
		</Row>
	</Traits>
	<Language_en_US>
		<Row Tag="TXT_KEY_BUILDING_X">
			<Text>Tundra Faith</Text>
		</Row>
	</Language_en_US>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_X</Type>
			<DefaultBuilding>BUILDING_X</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_X</Description>
		</Row>
	</BuildingClasses>
	<Buildings>
		<Row>
			<Type>BUILDING_X</Type>
			<BuildingClass>BUILDINGCLASS_X</BuildingClass>
			<Cost>-1</Cost>
			<FaithCost>-1</FaithCost>
			<PrereqTech>NULL</PrereqTech>
			<ArtDefineTag>NONE</ArtDefineTag>
			<MinAreaSize>-1</MinAreaSize>
			<NeverCapture>true</NeverCapture>
			<HurryCostModifier>-1</HurryCostModifier>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<PortraitIndex>19</PortraitIndex>
			<NukeImmune>true</NukeImmune>
			<Description>TXT_KEY_BUILDING_X</Description>
		</Row>
	</Buildings>
	<Building_TerrainYieldChanges>
		<Row>
			<BuildingType>BUILDING_X</BuildingType>
			<TerrainType>TERRAIN_TUNDRA</TerrainType>
			<YieldType>YIELD_FAITH</YieldType>
			<Yield>2</Yield>
		</Row>
	</Building_TerrainYieldChanges>
</GameData>
Just replace "_X" everywhere in your code with something more unique so that there is no possibility that two or more mods are adding something to the game called "BUILDING_X".
 
<Terrain_Yields> defines the inherent yields of a tile. And as you've discovered this has no relation to anything in the Traits tables.

The simplest method is to create a free building no one can normally get, and add it to the trait as for example

.
Thank U for this!
 
Back
Top Bottom