Enemy Param Formulas

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

This script allows you to use a formula to calculate an enemy’s parameters. You can use literal values or a set of variables provided for the formulas.

enemyParamFormulas1

Download

Script: download here

Installation

Place this script below Materials and above Main

Usage

There are formulas available for every built-in parameter.
Use the notetag

<param formula: PARAM_CODE FORMULA>

Where the PARAM_CODE is one of the following (descriptions can be found in
the help file under “Reference Material –> Parameters and Formulas”

mhp - Max HP
mmp - Max MP
atk - Attack
def - Defense
mat - Magic Attack
mdf - Magic Defense
agi - Agility
luk - Luck
hit - Hit Rate
eva - Evasion
cri - Critical Hit Rate
cev - Critical Evasion Rate
mev - Magic Evasion Rate
mrf - Magic Reflection Rate
cnt - Counter attack rate
hrg - HP Regen Rate
mrg - MP Regen Rate
trg - TP Regen Rate
tgr - Target rate
grd - Defense Effectiveness
rec - Recovery Effectiveness
pha - Medicine Lore
mcr - MP Consumption Rate
tcr - TP Consumption Rate
pdr - Physical Damage Rate
mdr - Magic Damage Rate
fdr - Floor Damage Rate
exr - Exp Acquisition Rate

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

val - original parameter value specified in the database
  a - the Game_Enemy object (not the RPG::Enemy)
  p - game party
  t - game troop
  v - game variables
  s - game switches

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

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

<param formula: mhp>
   if s[1]
     v[2] * 4
   else
     v[3] + 200
   end
</param formula>

This is only if you need more flexibility.

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...

11 Responses

  1. Tevak says:

    I’m getting an error, I put the formulas in like this:
    “param formula: mhp (((1 + a.agi + a.mdf + a.luk) * 2) * 0.01) – ((p.leader.level – 1) * 0.15)
    param formula: mmp ((a.agi + a.mat + a.def – (35 + (p.leader.level – 1))) * 0.009) – ((p.leader.level – 1) * 0.07)”
    (with brackets, they dont show up in comments for some reason)
    And it worked initially and then I started getting a nomethod error for level and afterwards it’s not referencing the formulas and showing up with HP as 1 and MP as 0 and I can’t get it to work again

  2. Jon says:

    Hey, this doesn’t seem to be working for me…I’m putting this notetag in a status: and I have also tried using

    in both cases, a char with 50% eva doesn’t gain 100% eva. What is the correct way to notetag this?

  3. Dugald says:

    Are there any formulas that will modify an enemy's experience or gold value based on its level?

  4. Erik says:

    Do you by any chance have a script that shows the enemy parameters in battle as you have it in the pic at the top?

  5. RogueDeus says:

    As with the XP script, I just realized I needed this and here it is!!

    With this script I can always be sure that a BOSS fight will be at least semi-challenging even if the player out levels the lead-in content substantially. 🙂

    Not to mention, it helps with the use of *.txt files for note tag management.

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