Hey, I'm trying to get Experience that changes based on the difference in level between either the average of the party level or an actor and the enemy. I'm using Yanfly's EnemyLevels and Yanfly's EnemyBaseParamaters.
From what I've tried so far I've got this written out so far:
<Custom Base Param Formula>
if (this.level()-3 = '$gameActors.actor(1).level')
{exp = Base * 1.5;}
else if (this.level-2() = '$gameActors.actor(1).level')
{exp = Base * 1.25;}
else if (this.level-1() = '$gameActors.actor(1).level')
{exp = Base * 1.125;}
else if (this.level() = '$gameActors.actor(1).level')
{exp = Base;}
else if (this.level() +1 = '$gameActors.actor(1).level')
{exp = Base * 0.5;}
else if (this.level() +2 = '$gameActors.actor(1).level')
{exp = Base * 0.3;}
else if (this.level() +3 = '$gameActors.actor(1).level')
{exp = Base * 0.15;}
else if (this.level() +4 = '$gameActors.actor(1).level')
{exp = Base * 0.075;}
else if (this.level() +5 = '$gameActors.actor(1).level')
{exp = Base * 0.015;}
else {exp = Base * 0.005;}
</Custom Base Param Formula>
Basically how i want this to work is like this
if the Enemy Level is greater than the Character's Level by 3 i get +50% XP
else
if the Enemy Level is greater than the Character's Level by 2 i get +25% XP
else
if the Enemy Level is greater than the Character's Level by 1 i get +12.5% XP
else
if the Enemy Level is equal to the Character's Level i get Base XP
else
if the Enemy Level is less than the Character's Level by 1 i get 50% less XP
else
if the Enemy Level is less than the Character's Level by 2 i get 70% less XP
else
if the Enemy Level is less than the Character's Level by 3 i get 85% less XP
else
if the Enemy Level is less than the Character's Level by 4 i get 92.5% less XP
else
if the Enemy Level is less than the Character's Level by 5 i get 98.5% less XP
else i get 99.5% less xp
I'm quite new to using rpg maker mv and also javascript, so any help with this would be appreciated.
From what I've tried so far I've got this written out so far:
<Custom Base Param Formula>
if (this.level()-3 = '$gameActors.actor(1).level')
{exp = Base * 1.5;}
else if (this.level-2() = '$gameActors.actor(1).level')
{exp = Base * 1.25;}
else if (this.level-1() = '$gameActors.actor(1).level')
{exp = Base * 1.125;}
else if (this.level() = '$gameActors.actor(1).level')
{exp = Base;}
else if (this.level() +1 = '$gameActors.actor(1).level')
{exp = Base * 0.5;}
else if (this.level() +2 = '$gameActors.actor(1).level')
{exp = Base * 0.3;}
else if (this.level() +3 = '$gameActors.actor(1).level')
{exp = Base * 0.15;}
else if (this.level() +4 = '$gameActors.actor(1).level')
{exp = Base * 0.075;}
else if (this.level() +5 = '$gameActors.actor(1).level')
{exp = Base * 0.015;}
else {exp = Base * 0.005;}
</Custom Base Param Formula>
Basically how i want this to work is like this
if the Enemy Level is greater than the Character's Level by 3 i get +50% XP
else
if the Enemy Level is greater than the Character's Level by 2 i get +25% XP
else
if the Enemy Level is greater than the Character's Level by 1 i get +12.5% XP
else
if the Enemy Level is equal to the Character's Level i get Base XP
else
if the Enemy Level is less than the Character's Level by 1 i get 50% less XP
else
if the Enemy Level is less than the Character's Level by 2 i get 70% less XP
else
if the Enemy Level is less than the Character's Level by 3 i get 85% less XP
else
if the Enemy Level is less than the Character's Level by 4 i get 92.5% less XP
else
if the Enemy Level is less than the Character's Level by 5 i get 98.5% less XP
else i get 99.5% less xp
I'm quite new to using rpg maker mv and also javascript, so any help with this would be appreciated.