How many XP points do different units gain in different circumstances?

Joined
Feb 13, 2017
Messages
465
Location
Ukraine
If somebody has learnt the mechanics of experience gaining: How many XP points do different units gain when attacking, defending and defeating the enemy unit (without any additional bonuses, e.g. from Barracks)? All I know is that melee combat yields more XP than ranged one, that winning a battle yields more XP than just fighting and that capturing a city gives a lot of XP points. And that Scouts gain XP discovering natural wonders and entering tribal villages besides conventionally engaging in combat.
 
From the GlobalParameters.xml file:

Code:
<Replace Name="EXPERIENCE_ACTIVATE_GOODY_HUT" Value="5" />
<Replace Name="EXPERIENCE_BARB_SOFT_CAP" Value="1" />
<Replace Name="EXPERIENCE_CITY_CAPTURED" Value="10" />
<Replace Name="EXPERIENCE_COMBAT_ATTACKER_BONUS" Value="1" />
<Replace Name="EXPERIENCE_COMBAT_RANGED" Value="1" />
<Replace Name="EXPERIENCE_DISTRICT_VS_UNIT" Value="2" />
<Replace Name="EXPERIENCE_KILL_BONUS" Value="2" />
<Replace Name="EXPERIENCE_MAX_BARB_LEVEL" Value="2" />
<Replace Name="EXPERIENCE_MAX_LEVEL" Value="6" />
<Replace Name="EXPERIENCE_MAXIMUM_ONE_COMBAT" Value="8" />
<Replace Name="EXPERIENCE_NEEDED_FOR_NEXT_LEVEL_MULTIPLIER" Value="5" />
<Replace Name="EXPERIENCE_NOT_COMBAT_RANGED" Value="2" />
<Replace Name="EXPERIENCE_PROMOTE_HEALED" Value="50" />
<Replace Name="EXPERIENCE_RETRAIN_HEALED" Value="100" />
<Replace Name="EXPERIENCE_REVEAL_NATURAL_WONDER" Value="10" />
<Replace Name="EXPERIENCE_UNIT_VS_DISTRICT_NOT_CITY_CAPTURED" Value="3" />

Hope this helps without further explanation :)
 
From the GlobalParameters.xml file:

Code:
<Replace Name="EXPERIENCE_ACTIVATE_GOODY_HUT" Value="5" />
<Replace Name="EXPERIENCE_BARB_SOFT_CAP" Value="1" />
<Replace Name="EXPERIENCE_CITY_CAPTURED" Value="10" />
<Replace Name="EXPERIENCE_COMBAT_ATTACKER_BONUS" Value="1" />
<Replace Name="EXPERIENCE_COMBAT_RANGED" Value="1" />
<Replace Name="EXPERIENCE_DISTRICT_VS_UNIT" Value="2" />
<Replace Name="EXPERIENCE_KILL_BONUS" Value="2" />
<Replace Name="EXPERIENCE_MAX_BARB_LEVEL" Value="2" />
<Replace Name="EXPERIENCE_MAX_LEVEL" Value="6" />
<Replace Name="EXPERIENCE_MAXIMUM_ONE_COMBAT" Value="8" />
<Replace Name="EXPERIENCE_NEEDED_FOR_NEXT_LEVEL_MULTIPLIER" Value="5" />
<Replace Name="EXPERIENCE_NOT_COMBAT_RANGED" Value="2" />
<Replace Name="EXPERIENCE_PROMOTE_HEALED" Value="50" />
<Replace Name="EXPERIENCE_RETRAIN_HEALED" Value="100" />
<Replace Name="EXPERIENCE_REVEAL_NATURAL_WONDER" Value="10" />
<Replace Name="EXPERIENCE_UNIT_VS_DISTRICT_NOT_CITY_CAPTURED" Value="3" />

Hope this helps without further explanation :)
Thanks a lot for finding this.
So, if I understand correctly, the yields are:
1) for a melee unit:
- when attacking: 3
- when defending: 2
- when defending from city/encampment ranged attack: 4
- when killing an enemy unit: 4
- when attacking a city: 5
- when capturing a city: 12
2) for a ranged unit:
- when attacking: 2
- when defending: 1
- when defending from city/encampment ranged attack: 3
- when killing an enemy unit: 3
- when attacking a city: 4
3) for a recon unit:
- when activating a goody hut: 5
- when revealing a natural wonder: 10

Good to know :thumbsup:

But how the line "<Replace Name="EXPERIENCE_MAXIMUM_ONE_COMBAT" Value="8" />" works is unclear to me.
 
You can't get more than 8 XP, unless you capture a city, from a single battle. If you were suzerain of Kabul and had just adopted Oligarchy (so we can ignore legacy bonus) then you should get 12 XP per city attack (melee). Oligarchy would increase the XP given from 5 to 6 (20%) and then Kabul would double it. Without putting a limit on it you could have level 4 units by capturing just a few cities if you got the full bonus.
 
You can't get more than 8 XP, unless you capture a city, from a single battle. If you were suzerain of Kabul and had just adopted Oligarchy (so we can ignore legacy bonus) then you should get 12 XP per city attack (melee). Oligarchy would increase the XP given from 5 to 6 (20%) and then Kabul would double it. Without putting a limit on it you could have level 4 units by capturing just a few cities if you got the full bonus.


This ^ :)
 
Does anyone know how the ability to gain xp from goodie huts and discovering natural wonders is attached to recon units. I'm trying to make a custom promotion class with this ability.
 
Back
Top Bottom