Quick XML Question - Assinging a stength penalty for a unit

Crighton

Emperor
Joined
Jan 3, 2006
Messages
1,136
Hi all,

Quick question:

I've successfully added a helicopter unit and I think I need to balance it by adding a penalty to it. Specifically I want to give it a -25% penalty vs. Sam Infantry and a -50% penalty vs. Mobil Sams.

Is it possible to do this in XML by editing the helicopter unit or am I going to be forced to do this by simply boosting the bonus' for the Sams? Which I would prefer not to do (the mod I'm working on is a simple mod for adding Gunships and I'd like to keep any modifications I make limited to the additional units since each part of the Gunship Mod will be modular and I don't want the module to potentially alter the acepted value of the Sams should anyone use my modules).

Any help would be appreciated. Many thanks in advance.

~Crighton
 
Yes, you should be able to do this by simply adding the appropriate UnitClassAttackMods to your helo (negative values are allowed). :)

Code:
<UnitClassAttackMods>
    <UnitClassAttackMod>
        <UnitClassType>UNITCLASS_SAM_INFANTRY</UnitClassType>
	<iUnitClassMod>-25</iUnitClassMod>
    </UnitClassAttackMod>
    <UnitClassAttackMod>
        <UnitClassType>UNITCLASS_MOBILE_SAM</UnitClassType>
	<iUnitClassMod>-50</iUnitClassMod>
    </UnitClassAttackMod>				
</UnitClassAttackMods>

edit: Since the above only modifies attack and there doesn't seem to be a general modifier, you would also need to add UnitClassDefenseMods in similar fashion.
 
Back
Top Bottom