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.

enemyparamformulas1.jpg


Download

Get it at Hime Works!

Installation

Place this script below Materials and above Main

Usage

There are 8 formulas available, one for each parameter

Use the notetag

<param formula: mhp FORMULA><param formula: mmp FORMULA><param formula: atk FORMULA><param formula: def FORMULA><param formula: mat FORMULA><param formula: mdf FORMULA><param formula: agi FORMULA><param formula: luk FORMULA>Where 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 databaseself - the RPG::Enemy object a - the subject (this Game_Enemy object) p - game party t - game troop v - game variables s - game switchesIf 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:

Code:
<param formula: mhp>   if s[1]     v[2] * 4   else     v[3] + 200   end</param formula>
This is only if you need more flexibility.
So, as an example, you could have an enemy whose Max HP increase with say...each step you take?? Because stuff like that would be really, really awesome...

Now I wonder...something like this for characters...or equipment...ohmygosh. I hope that doesn't sound like a request...

Anyway, is there any chance this would work with a script that adds more stats? So, a new stat could also use a formula...
This script was only designed for the 8 basic parameters since someone wanted that specific functionality.


I have not released a script that basically adds formulas to almost everything.

Original thread: https://forums.rpgmakerweb.com/threads/enemy-param-formulas.15840/