[MOD] +1 Happiness per city Leader trait

Proto_Noob

Chieftain
Joined
Jan 11, 2016
Messages
42
Hey, I have a custom civ (that I made) that I have been playing for a while, but would like to change up the flavor a little bit. Used to do a bit of modding but now I am a little rusty and need some help.

The civ is for vox populi and I would like the leader trait to grant +1 happiness per city. If there is not a way to do this directly, I am open to hacks and workarounds.

As a side question, how powerful/unbalancing would a trait like that be? I know that one of the pantheons grants +1 happiness per city on river, and a reformation belief grant +1 per city following the religion. I am pairing it with an ability that makes workers work fast (I love agricultural/industrious civs).

Edit: spelling
 
Easiest way I can think of is to create a dummy building that give +1 Happiness and then use the Traits table's FreeBuilding column to grant that dummy building in every city.

As long as the extra Happiness is not GlobalHappiness I would not think it would be crazy imbalancing since with the "local" Happiness column in table Buildings, the sum total of happiness granted by all buildings within a city cannot exceed the population of that city.
Code:
<GameData>
	<Buildings>
		<Row>
			<Type>BUILDING_HAPPINESS_TRAIT</Type>
			<BuildingClass>BUILDINGCLASS_HAPPINESS_TRAIT</BuildingClass>
			<Cost>-1</Cost>
			<FaithCost>-1</FaithCost>
			<PrereqTech>NULL</PrereqTech>
			<GreatWorkCount>-1</GreatWorkCount>
			<ArtDefineTag>NONE</ArtDefineTag>
			<MinAreaSize>-1</MinAreaSize>
			<NeverCapture>true</NeverCapture>
			<HurryCostModifier>-1</HurryCostModifier>
			<Happiness>1</Happiness>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<PortraitIndex>19</PortraitIndex>
			<Description>TXT_KEY_HAPPINESS_TRAIT</Description>
			<NukeImmune>true</NukeImmune>
		</Row>
	</Buildings>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_HAPPINESS_TRAIT</Type>
			<DefaultBuilding>BUILDING_HAPPINESS_TRAIT</DefaultBuilding>
			<Description>TXT_KEY_HAPPINESS_TRAIT</Description>
		</Row>
	</BuildingClasses>
	<Language_en_US>
		<Row Tag="TXT_KEY_HAPPINESS_TRAIT">
			<Text>Secret Happiness</Text>
		</Row>
	</Language_en_US>
	<Traits>
		<Row>
			<Type>TRAIT_SOMETHING</Type>
			<Description>TXT_KEY_TRAIT_SOMETHING</Description>
			<ShortDescription>TXT_KEY_TRAIT_SOMETHING_SHORT</ShortDescription>
			<FreeBuilding>BUILDING_HAPPINESS_TRAIT</FreeBuilding>
		</Row>
	</Traits>
</GameData>
 
Top Bottom