UnitInfos.xml question

I always thought it meant if you kill it while attacking you get the top XP points, but if you kill it while defending you the bottom. Sadly that doesn't seem to be what's happening at all.
 
Suppose MyAttackUnit attacks HisDefenseUnit and kills it. Then HisDefenseUnit's iXPValueAttack is the base Experience that MyAttackUnit can gain from this combat. This base experience is modified by

Code:
Experience = ((BaseExperience * DefenderStrength) / AttackerStrength);

where DefenderStrength and AttackerStrength are the combat strengths of the units before the combat took place. Finally, this experience is restricted to the range [MIN_EXPERIENCE_PER_COMBAT, MAX_EXPERIENCE_PER_COMBAT] where these are specified in GlobalDefines.xml.

The element iXPValueDefense works dually.
 
Back
Top Bottom