Enemy Exp Formulas

enemyExpFormulas1

This script allows you to use a formula to calculate how much exp is obtained from an enemy.

Download

Script: download here

Installation

Place this script below Materials and above Main

Usage

Note-tag enemies with

<exp formula: FORMULA>

Where the FORMULA is any valid ruby formula that returns a number.
You can use the following variables in your formula:

exp - the default exp value set in the database for that enemy
  a - this enemy
  p - game party
  t - game troop
  v - game variables
  s - game switches

If no exp formula is specified, then the default exp is given.

If you would like to use ruby statements that extend across multiple lines,
you can use the extended note-tag:

<exp formula>
  if v[1]
    exp + 200
  else
    exp - 200
  end
</exp formula>

This may be useful if you have complex logic and you don’t want to write it as
a one-liner.

Examples

Divide exp by the number of battle members

<exp formula: exp / p.battle_members.size >

Increase exp by some multiplier based on variable 1

<exp formula: exp + (v[1] * 100) >

Give a nice bonus based on whether switch 1 is ON

<exp formula: s[1] ? exp * 10000 : exp >

You may also like...

8 Responses

  1. Selina says:

    Wow, thanks a ton! This should helps a lot to get a NG+ Exp bonus. :3

    I do have a question though: Is there a formula that lets you calculate the Exp different depending on whether or not one of two switches is active?
    (For example, if Switch 1 is active, the party gains double exp, but if switch 2 is active instead, they will only gain half the exp)

    Either way, thanks :3

  2. AlliedG says:

    Handy script 🙂 Nice to see some customisation for enemy exp.

  3. Hime says:

    Updated to support “this enemy” formula variable.

  4. RogueDeus says:

    I just found a reason to need this script. 🙂

    Once again, the proliferation of your work often precedes need!

  5. Rodjie says:

    its is possible to give different xp for each member of the party?
    ex. actr1 is level 20. so the actr will gain 90% of the given xp.
    actr2 is level 30. so the actr2 will gain 80% of the given xp.

Leave a Reply

Your email address will not be published. Required fields are marked *