Enemy Exp Formulas

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

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 >
Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

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.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax