# Level Difference Exp

This script allows you to specify a “level difference” exp modifier. It introduces a “level difference” exp formula which takes the level difference

between an actor and an enemy and determines how the exp will be adjusted. This means that the amount of exp that an actor gains from an enemy is dependent on the difference between the actor’s level and the enemy’s level.

For example, if the actor’s level is higher than the enemy level, then the actor may receive less exp than if the levels were about the same. On the other hand, if the actor’s level is lower than the enemy level, then the actor may receive more exp than usual.

## Download

Script: download here

Required: Core – Enemy Levels, Actor Victory Exp

## Installation

Place this script below Core – Enemy Levels and Actor Victory Exp,

and above Main

## Usage

Each enemy will have their own level difference exp formula, which you define

using the notetag

<level diff exp> FORMULA </level diff exp>

The formula takes two variables and returns a new number:

exp - the amount of exp that the actor could obtain from this enemy diff - the level difference between the actor and the enemy

The level difference is from the perspective of the actor. For example, if

your actor is level 1 and it defeats a level 10 enemy, then the difference

is +9 (that is, the enemy is 9 levels higher than the actor)

If no formula is defined for the enemy, then this modifier does nothing.

## Examples

Suppose a level 10 slime gives 100 EXP

If your actor’s level is lower, then you want to give a bonus 10 EXP for each

level that you’re lower. However, if your actor’s level is higher, then you

want to give a 10 EXP penalty for each level. Your formula would look like this

exp + (diff * 10)

This works because if your actor is level 1, then the difference between the

actor and the slime is 9, so you will receive a total of (exp + 90). However,

if your actor was level 20, then the difference is -10, and so you will receive

a total of (exp – 100)

Suppose instead that we wanted to reward players for taking on challenges,

but didn’t want to penalize them for killing easy enemies. We can use

conditional branches in our formula like this

if diff > 0 exp + (diff * 10) else exp end

This means that if the level difference is greater than 0, that is, the actor’s

level is lower than the enemy, then the actor receives bonus EXP for each

level of difference. However, if the actor’s level isn’t lower, then the

exp rewarded is just the usual exp.

Is there an MV plugin version of this?

Hey Hime,

Would there be any way to set a “default” formula, to avoid having to set the same formula to all enemies noteboxes in the database?

Thanks

Easiest way is to go to line 125 in the script and change the formula there. It says “exp” by default, which means the base exp the enemy provides, but you can change that as needed.

Thanks, Hime. 🙂

Hi, I don’t know if you’re still active, but I thought I’d ask just in case:

I’m using Soulpour777’s Singular Experience script. Can this script work with it? Will it still require your Actor Victory Exp script, and if so will

thatwork with it? If not, do you expect it would take much modification to get them to work together?Yes, Actor Victory Exp makes it so that each actor will evaluate how much EXP they get separately.

I don’t think there should be an issue between these scripts, since only the leader would get EXP.

I was wondering if ever did the patch to make this compatible with yanfly’s victory aftermath script?

No, I don’t know if I will do one.

I was wondering if you had made any progress on a patch to make this compatiable with yanfly victory aftermath.

Hiya, your scripts have helped me massively, but I’m really having no luck getting this one to work. Well, it works if I put in something simple like :

exp – diff

The logic I’m trying to use is:

if diff > 0

exp*diff+exp

else

exp*(1/(1-diff))

end

and when it’s tested, you gain 0 exp, and ‘___ gained _ exp’ isn’t displayed.

If you have any idea why this might be, it’d be a great help. Thanks

Do you have the required scripts placed above?

I do. Then after a long time being frustrated and trying various different formulas, I realised that I also had a script from someone else and it must have been incompatible with yours and that was the problem.

I like the idea of your script but I already have Yanfly ennemy level and Victory aftermath… I fear some incompability if I take the required scripts >_<"

Yes, actor victory exp is not compatible with yanfly’s victory aftermath. However, I have found that yanfly’s script provides similar functionality so maybe I can write a patch. You can use yanfly’s enemy levels script.