Increase XP Cost for upgrading just high tier units

Users who are viewing this thread

Dabos37

Sergeant Knight at Arms
Hi, I am trying to know if it is possible to increase XP cost for upgrading high tier units, because currently they are too easy to get. I have found two ways to do it but I do not like none of them. One is changing the XP gain per hit in combat but I do not like this because I want also apply this speed down for the AI. The second way I have found is this:


*** Changing from this:

public int UpgradeXpCost
{
get
{
if (this.UpgradeTargets != null && this.UpgradeTargets.Length != 0)
{
CharacterObject characterObject = this.UpgradeTargets[0];
if (characterObject != null)
{
int num = characterObject.Level + 6;
return num * num - 10;
}
}
return 100000000;



*** To this:

public int UpgradeXpCost
{
get
{
if (this.UpgradeTargets != null && this.UpgradeTargets.Length != 0)
{
CharacterObject characterObject = this.UpgradeTargets[0];
if (characterObject != null)
{
int num = characterObject.Level + 10;
return num * num - 10;
}
}
return 100000000;




Vanilla XPCost to Upgrade

T1 to T2 - 279
T2 to T3 - 474
T3 to T4 - 719
T4 to T5 - 1014


Modded (value from 6 to 10) XPCost to Upgrade

T1 to T2 - 431
T2 to T3 - 666
T3 to T4 - 951
T4 to T5 - 1286




It affecs all tiers though and I do not like the result because it adds a fix XP number to upgrade to every tier. Does someone know how to increase XPCost just for Tier4, Tier5, and Tier6 units, without affecting lower tiers?

Thanks
 
Back
Top Bottom