How do I change the Unique Abilities of a Civ?

DefiledNH

Chieftain
Joined
Oct 20, 2013
Messages
11
I want to change the abilities of Genghis Khan's Mongolia. I find it doesn't do justice to just how great he was, and it's quite frankly useless unless you want to mindlessly warmonger.

How would I go about doing this?
 
I want to give horses +2 movement rather than +1, I want him to have a chance of getting barbarians to join him, I want to remove the bonus against city states, I want him to have +10% bonus against all other civs, I want to increase Khan bonus to +20% and halve unit upkeep. etc. etc.

All in all, the changes are to make him a far more formidable enemy, as well as more fun to use.
 
Well, as for +2 movement instead of +1, consider the code currently used for Genghis Khan's UA:
Code:
<GameData>
<!-- Table data -->
	<Traits>
		<Row>
			<Type>TRAIT_TERROR</Type>
			<Description>TXT_KEY_TRAIT_TERROR</Description>
			<ShortDescription>TXT_KEY_TRAIT_TERROR_SHORT</ShortDescription>
			<CityStateCombatModifier>30</CityStateCombatModifier>
		</Row>
	</Traits>-<Trait_MovesChangeUnitCombats>
		<Row>
			<TraitType>TRAIT_TERROR</TraitType>
			<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
			<MovesChange>1</MovesChange>
		</Row>
	</Trait_MovesChangeUnitCombats>
</GameData>
So you need to change the 1 in <MovesChange> to a 2. Use the <Update> method for this, like so:
Code:
<GameData>
	<Trait_MovesChangeUnitCombats>
		<Update>
			<Where TraitType="TRAIT_TERROR"/>
			<Set MovesChange="2"/>
		</Update>
	</Trait_MovesChangeUnitCombats>
</GameData>
To remove his bonus against city states, you could update it so the bonus is 0%, or your could just plain delete that row. One of the following should work:
Code:
<GameData>
	<Traits>
		<Update>
			<Where Type="TRAIT_TERROR"/>
			<Set CityStateCombatModifier="0"/>
		</Update>
	</Traits>
</GameData>
OR:
Code:
<GameData>
	<Traits>
		<Update>
			<Where Type="TRAIT_TERROR"/>
			<Delete="CityStateCombatModifier"/>
		</Update>
	</Traits>
</GameData>
Actually, that second method may possibly not work. But it's worth a shot.
 
The method for boosting the khan's bonus from +15% to 20% is a bit different, because the bonus is not directly applied to the unit; rather, the khan receives a free promotion that gives +15% combat to all nearby units.

So you'll need to remove that promotion and give the khan a new one that gives 20% instead of 15%, replace the 15% promotion with the 20% promotion, or add a promotion that gives +5%, which will stack with the existing 15%. Whichever way you choose, it will require you to make a new promotion.
But therein lies the problem: This is the coding for PROMOTION_GREAT_GENERAL, one of 2 free promotions the khan receives (don't worry about the other one; it's not relevant):
Code:
<GameData>
	<UnitPromotions>
		<Row>
			<Type>PROMOTION_GREAT_GENERAL</Type>
			<Description>TXT_KEY_PROMOTION_GREAT_GENERAL</Description>
			<Help>TXT_KEY_PROMOTION_GREAT_GENERAL_HELP</Help>
			<Sound>AS2D_IF_LEVELUP</Sound>
			[B][COLOR="Blue"]<GreatGeneral>true</GreatGeneral>[/COLOR][/B]
			<PortraitIndex>59</PortraitIndex>
			<IconAtlas>ABILITY_ATLAS</IconAtlas>
			<PediaType>PEDIA_ATTRIBUTES</PediaType>
			<PediaEntry>TXT_KEY_PEDIA_PROMOTION_GREAT_GENERAL</PediaEntry>
		</Row>
	</UnitPromotions>
</GameData>
<GreatGeneral> is something Firaxis has hard-coded to give 15%, and to make it worse, the <GreatGeneral> column is boolean, not integer - that is to say, it's true or false, not "insert your desired number here".

This part you'll probably need lua for, I'm guessing, and even that might not work. You should ask in the SDK/LUA forums.
 
You don't need Lua, you can do it in XML or SQL - in Traits table there is a column called GreatGeneralExtraBonus, it's used for China's UA.
 
Thank you so much for the help AggressiveWimp

Unfortunately, I have no idea what you're talking about. I'm assuming these's an XML file somewhere that I need to edit?

Could you link me to a guide with the basics of the procedures you've mentioned?
 
No, just put the code I gave you in a new xml file in your mod. The code is already designed to edit those existing files.

As for where the file with Mongol trait is, the default path goes something like:
C:\Program Files\Steam\steamapps\common\Sid Meier's Civilization V\Assets\DLC\DLC_01\Gameplay\XML\CIV5Traits_Mongol.xml

The guide I mostly used for my first mod was Kael's modding guide, while using Leugi's Israel mod's (the G&K version, to be technical) xml as a template for my own. You can use really any functional mod as a template if you want, or even the existing game files, or not use a template at all - but I found them to be rather useful.

And anything not covered in those, I mainly learned through trial-and-error on these forums.
 
Back
Top Bottom