View Full Version : need help..with unit .xml files


boneys26
May 29, 2006, 02:35 AM
Hi guys I know .xml but i'm trying to change a few units
units like helicopters have this code

<UnitCombatMods>
<UnitCombatMod>
<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
<iUnitCombatMod>100</iUnitCombatMod>
</UnitCombatMod>
</UnitCombatMods>



and the sam infantry have



<UnitCombatMods>
<UnitCombatMod>
<UnitCombatType>UNITCOMBAT_HELICOPTER</UnitCombatType>
<iUnitCombatMod>60</iUnitCombatMod>
</UnitCombatMod>
</UnitCombatMods>



what other codes are there? I cant fine anything about it and could you have multiple codes? like

<UnitCombatMods>
<UnitCombatMod>
<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
<iUnitCombatMod>100</iUnitCombatMod>
</UnitCombatMods>
<UnitCombatMod>

<UnitCombatType>UNITCOMBAT_helicopter</UnitCombatType>
<iUnitCombatMod>60</iUnitCombatMod>
</UnitCombatMod>
</UnitCombatMods>

Note spacing all wrong in here

woodelf
May 29, 2006, 07:43 AM
To combine them you'd simply add them like this:

<UnitCombatMods>
<UnitCombatMod>
<UnitCombatType>UNITCOMBAT_HELICOPTER</UnitCombatType>
<iUnitCombatMod>50</iUnitCombatMod>
</UnitCombatMod>
<UnitCombatMod>
<UnitCombatType>UNITCOMBAT_ARMOR</UnitCombatType>
<iUnitCombatMod>50</iUnitCombatMod>
</UnitCombatMod>
</UnitCombatMods>

Damn spacing sucks, but you could add all of them I imagine.

The entire list is in Civ4BasicInfos.xml in the BasicInfos folder.

Is that what you wanted to know?

boneys26
May 29, 2006, 10:39 AM
thats great thanks

woodelf
May 29, 2006, 10:44 AM
No problem. Have fun. :)

boneys26
May 29, 2006, 01:58 PM
would it work if i add a domain like

<DomainInfo>
<Type>DOMAIN_MISSILE</Type>
<Description>TXT_KEY_DOMAIN_MISSILE</Description>
</DomainInfo>

then just add that domain to the unit .xml would it work like that? or do i need to add it elsewhere too? (not that i have a working code for the missile yet....but i am working on it)

You any good with python? lol i got a code that keeps crashing when it runs by running i mean when i use the missile after it hits and kills the AI's unit the game crashes