Need Help Editing Experience Gains during Combat in Mod

thaishmafia

Chieftain
Joined
Oct 24, 2010
Messages
15
To whom it may concern,

Im having trouble getting my mod to work...all I want to do is change the amount of XP units receive when they either attack or defend but changing the "XPValueAttack" and "XPValueDefense" lines do not seem to work. Is there another file where I edit those values? My Modbuddy format is below:

<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Jon Shafer (Firaxis Games) -->
<GameData>
<Units>
<!--Ancient Era-->
<Update>
<Set XPValueAttack="4"/>
<Set XPValueDefense="1"/>
<Where Type="UNIT_WARRIOR" />
</Update>
</Units>
</GameData>

Sincerely,
Thaishmafia
 

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,640
Location
Near Portsmouth, UK
Enable logging, and, assuming you have the OnModACtivated -> UpdateDatabase entry for your xml file, you will see an error in database.log

You can't have two <Set> elements within an <Update> element, use

Code:
<Set XPValueAttack="4" XPValueDefense="1"/>

That's the obvious error, there may be others, but the log files WILL help you identify them
 

PawelS

Ancient Druid
Joined
Dec 11, 2003
Messages
2,811
Location
Poland
I suppose the XP values in Units table don't work, the actual amount of XP that units gain is in Defines:

EXPERIENCE_ATTACKING_UNIT_MELEE
EXPERIENCE_DEFENDING_UNIT_MELEE

and so on.

So you can't set it individually for specific units, but you can give them a promotion that adds a (positive or negative) modifier to the XP the unit gets.
 
Top Bottom