Help with experience

clearbeard

King
Joined
Dec 17, 2004
Messages
691
Location
Delaware, USA
Can anyone point me to where experience gain is controlled in BtS? Particularly I am interested in modifying the XP limit for fighting barbarian units, and the XP losses on unit upgrade, but I've had little luck finding references to these quantities in the game files. I know it's possible as I have seen other mods with different behavior, I'm just hoping it's somewhere easy (i.e. not in the DLL) that I haven't found yet.

Thanks!
 
in the unit infos file on each unit there is a tag called
<iXPValueAttack>4</iXPValueAttack> and <iXPValueDefense>2</iXPValueDefense>
These control the amount of experience you recieve when defeating them.
 
This is the limit for exp from barbarians and animals. It is GlobalDefines in XML folder. Look for these:
Code:
	<Define>
		<DefineName>ANIMAL_MAX_XP_VALUE</DefineName>
		<iDefineIntVal>5</iDefineIntVal>
	</Define>
	<Define>
		<DefineName>BARBARIAN_MAX_XP_VALUE</DefineName>
		<iDefineIntVal>10</iDefineIntVal>
	</Define>
Hope that helps.
 
[Edit:] Exactly what I was looking for, NotSoGood, thanks! Anyone know about the loss of XP on unit upgrade?

[Edit2:] Found it, later in that same XML file. Thanks!
 
Actually I haven't noticed that ever. Does it happen in a spesific mod or is it in original BTS too?

It's in original BtS, maybe even base Civ4, though I've only ever played BtS. It's something that annoyed me from my very first game, but never thought to look in GlobalDefines.

If you have a unit with more than 10 XP (say, a warrior) and you upgrade it (to, say, a maceman) all the XP above 10 is lost. Level and promotions remain, so in the case of very experienced units you could end up with a level 10 maceman with 10/101 XP.

The controlling lines in the GlobalDefines file are:
Code:
<DefineName>MAX_EXPERIENCE_AFTER_UPGRADE</DefineName>
<iDefineIntVal>10</iDefineIntVal>

Kael has that value set to 999 in FFH2, so for all intents and purposes units do not lose XP on upgrade like they do in vanilla BtS.
 
Top Bottom