Enemy Param Formulas
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.
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.
It’s quite hard to find a good site. And I think I am lucky enough to have come here. The posts are doing great and full of good insights. I would be glad to keep on coming back here to check for updates!
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
Can you reproduce this in a new project with only the script? If it still occurs send me the project.
It’s still occuring, how do I send you the project?
You can zip it up and upload it to dropbox or google drive and send me the link via the contact me form at the top of the page.
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?
Your note-tag seems to have been disappeared. 1 means 100%. 0.5 means 50%. What is the note-tag?
Are there any formulas that will modify an enemy's experience or gold value based on its level?
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?
That’s yanfly’s enemy target info script. http://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/enemy-target-info/
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.
Note that all of my enemy formula scripts can be used for enemy level scaling.