Changing Upgrades of a Unit

vbraun

Raytracing
Joined
Jul 7, 2003
Messages
3,530
Location
Arizona, USA
Everything you are going to need about how to change the upgrades of Units.

First open up Assests\XML\Units\CIV4UnitInfos.xml in Notepad or program of your choice.

Here is the part that says what the Warrior upgrades to: (Line 2617)
Code:
			<UnitClassUpgrades>
				<UnitClassUpgrade>
					<UnitClassUpgradeType>UNITCLASS_AXEMAN</UnitClassUpgradeType>
					<bUnitClassUpgrade>1</bUnitClassUpgrade>
				</UnitClassUpgrade>
				<UnitClassUpgrade>
					<UnitClassUpgradeType>UNITCLASS_SPEARMAN</UnitClassUpgradeType>
					<bUnitClassUpgrade>1</bUnitClassUpgrade>
				</UnitClassUpgrade>
			</UnitClassUpgrades>

If you wanted to add another upgrade just add another <UnitClassUpgrade> thing.

Example with adding an upgrade to the SAM Infantry:
Code:
			<UnitClassUpgrades>
				<UnitClassUpgrade>
					<UnitClassUpgradeType>UNITCLASS_AXEMAN</UnitClassUpgradeType>
					<bUnitClassUpgrade>1</bUnitClassUpgrade>
				</UnitClassUpgrade>
				<UnitClassUpgrade>
					<UnitClassUpgradeType>UNITCLASS_SPEARMAN</UnitClassUpgradeType>
					<bUnitClassUpgrade>1</bUnitClassUpgrade>
				</UnitClassUpgrade>
				<UnitClassUpgrade>
					<UnitClassUpgradeType>UNITCLASS_SAM_INFANTRY</UnitClassUpgradeType>
					<bUnitClassUpgrade>1</bUnitClassUpgrade>
				</UnitClassUpgrade>
                           </UnitClassUpgrades>

If you wanted to get rid of an upgrade so that there is only one upgrade left. Just delete one of the <UnitClassUpgrade> things. Ex.
Code:
			<UnitClassUpgrades>
				<UnitClassUpgrade>
					<UnitClassUpgradeType>UNITCLASS_AXEMAN</UnitClassUpgradeType>
					<bUnitClassUpgrade>1</bUnitClassUpgrade>
				</UnitClassUpgrade>
                           </UnitClassUpgrades>

Now if you want no upgrades at all change the entire <UnitClassUpgrades> to this:
Code:
			<UnitClassUpgrades/>

<bUnitClassUpgrade> Is just a little boolen thing where if you have it at 1 it says yes do this, if you have 0 the no it won't upgrade. At least thats how it should work.
 
The cost of upgrades is based on the sheild difference between the upgraded unit and the unit you are upgrading. I'm not quite sure what the factor is, but it can probably be changed somewhere.
 
Back
Top Bottom