Unit Settings in the XML

vingrjoe

Landlocked Shipwright
Joined
Feb 25, 2002
Messages
1,211
Location
Midwest, USA
Hey there people. I've been looking through the XML files for Warlords and BTS and had questions for some of the lines.

This one is in the Civ4UnitInfos xml.

<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>

Does anyone know the functions for each of the above four lines ?


Also, there seems to be a new line in the Civ4UnitClassInfo xml for BTS.

<UnitClassInfo>
<Type>UNITCLASS_BATTLESHIP</Type>
<Description>TXT_KEY_UNIT_BATTLESHIP</Description>
<iMaxGlobalInstances>-1</iMaxGlobalInstances>
<iMaxTeamInstances>-1</iMaxTeamInstances>
<iMaxPlayerInstances>-1</iMaxPlayerInstances>
<iInstanceCostModifier></iInstanceCostModifier>
<DefaultUnit>UNIT_BATTLESHIP</DefaultUnit>
</UnitClassInfo>

The bold face print denotes the new line. Does anyone know what this does ?

Thanks in advance for any help.
 
<UnitClassTargets/>
<UnitCombatTargets/>
<UnitClassDefenders/>
<UnitCombatDefenders/>

UnitClassTargets specifies what unit classes this unit targets and what bonus.
UnitCombatTargets specifies what unit combats this unit targets and what bonus.
Same for the other two, but what defense bonus.
 
Thanks for the info Dale.
 
Just a follow up question for Dale or whomever may reply.

UnitClassTargets specifies what unit classes this unit targets and what bonus.

Does this mean filling in this line, will give the unit a preferred target it will go after, possibly similar to a target priority ?
 
not 100% but I think the unitclasstargets should either say for example an axe gets a bonus against melee units, the bonus would be 50%. It could also mean for a mission such as a bombing mission, what it can target, not completely sure.

this <iInstanceCostModifier></iInstanceCostModifier> should almost definetely mean that for every unit of that type you own, the cost increases. so for example if a warrior cost 10 and you put a 1 in the instancecostmodifier for it, the 2nd one would cost 11, and so on. but again not sure if that refers to the production cost (hammers) or the maintenance cost (gold per turn). you could figure it all out easily by just changing a few values and see exactly what it does.
 
not 100% but I think the unitclasstargets should either say for example an axe gets a bonus against melee units, the bonus would be 50%.

To get attack or defense bonuses against specific combat units or classes, the following lines are edited:

<UnitClassAttackMods/>
<UnitClassDefenseMods/>
<UnitCombatMods/>


I've tested it and it works.

I'm just really trying to understand everything. I am a CIV convert in progress so to speak.

I figured that instance cost modifier out after some testing.

Thanks for your replies Shiggs and Dale.
 
Back
Top Bottom