View Full Version : UnitInfos.xml question


Belizan
Mar 16, 2006, 12:00 AM
The wiki says one thing and then immediately says that what it says is wrong... Which is not helpful :(.


<iXPValueAttack>1</iXPValueAttack>
<iXPValueDefense>2</iXPValueDefense>


What does this do exactly?

ArbitraryGuy
Mar 16, 2006, 01:18 AM
I'm pretty sure it does nothing. (At least that I can tell).

woodelf
Mar 16, 2006, 05:38 AM
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.

Belizan
Mar 16, 2006, 05:58 AM
I'm pretty sure it does nothing. (At least that I can tell).

Well, that would explain my confusion 8).

Good to know!

PeteT
Mar 16, 2006, 07:40 AM
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


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.

woodelf
Mar 16, 2006, 07:48 AM
Thanks Pete!

ArbitraryGuy
Mar 16, 2006, 10:35 AM
Wow... did not know that. Thanks PeteT!

Belizan
Mar 16, 2006, 06:19 PM
Ahhh... Naruhodo ne. 8). Thanks PeteT!