Parameter Bonuses

parameterBonuses1

This script allows you to define “Parameter bonuses” for your actors and enemies. A paramter bonus is simply a bonus that will be added to your parameters based on a formula. The bonus itself could be an increase, or even a decrease in stats if you provide a negative value.

For example, suppose you had custom parameters that allowed you to define stats like “strength” or “intelligence”, where str increases your atk and max HP params while int increases magic attack and magic defense stats. You can use parameter bonuses to define formulas that will allow your str and int stats to contribute to the other parameters.

Since the parameter bonus can be any formula, you can define bonuses based on anything.

Parameter bonuses can be defined in actors, classes, weapons, armors, states, and enemies. Actors will inherit any bonuses defined in their class, equips, and states. Enemies will inherit any bonuses defined in their states.

Because equips and states can be changed, you can use this to create unique effects.

Download

Script: download here

Installation

In the script editor, place this script below Materials and above Main

Usage

To define a parameter bonus, note-tag actors or enemies with

<param bonus: TYPE>
FORMULA
</param bonus>

Where the TYPE is one of

mhp - max HP
mmp - max MP
atk - attack
def - defense
mat - magic attack
mdf - magic defense
agi - agility
luk - luck

And the formula can be any valid ruby formula.
The following formula variables are available

a - the actor
p - game party
t - game troop
v - game variables
s - game switches

You can define multiple parameter bonuses for an actor, and you can define
multiple bonuses for the same stat; simply add more of the note-tag.

Do not have a bonus stat referencing the same stat. For example, if your atk
bonus relies on your atk stat, your game will crash. Similarly, if your
atk stat relies on your str stat, which relies on your atk stat, your game
will also crash. If your game crashes because your formula is wrong, it is
likely not a bug in the script.

Example

Suppose we have a custom stat called “str”. For each point in str, you gain 10 HP. For every 5 points in str, you gain 1 atk. You would use two parameter bonuses:

<param bonus: mhp>
a.str * 10
</param bonus>

<param bonus: atk>
a.str / 5
</param bonus>

You may also like...

18 Responses

  1. Dhonny says:

    cannot be downloaded, miss.

  2. Mul says:

    Hi there! Is it possible to call N.A.S.T.Y. Extra Stats to this?

    I am trying to add a.xstat.con but I get the error message “Script ‘Parameter Bonuses’ line 190: NoMethodError occurred. undefined method ‘con’ for nil:NilClass”

    I figured it would work because it works just fine with the Custom Damage script!

    Thanks in advance.

  3. Anonymous says:

    How to add extra stats to the script?

  4. Jon says:

    Hey Hime, is there a way to do the exact same thing as this script does but with ex params?

  5. Jon says:

    Hi, I’m having a problem with this script. In my game, I like to rename all my attributes (i.e. atk becomes str, def becomes dex…). Your script works great for me normally, but if my attribute name is not the original, it doesn’t seem to work. And yes, I make have tried both tagging the attributes in the formula with their original as well as their new tags, i.e. I have tried both using a.atk and a.str, neither one works if I for example change my Atk attribute to STR. If you could help me with this issue, it would be GREATLY appreciated!

    • Hime says:

      What is your note-tag?

      • Jon says:

        a.str * 3
        </param bonus>

        I have also tried using param bonus: atk since my “Str” attribute is just the atk value renamed. If I use this same notetag with atk and I don’t rename the atk value, then the script works.

      • Jon says:

        the same tag you give in your example…which works great for me when I leave the “atk” parameter as is, but when I rename it to “str” and tag it accordingly, then the script doesn’t produce any effect.

        a.str * 3
        </param bonus>

        • Hime says:

          The name of the param beside “param bonus:” is reserved. “atk” will always refer to the 2nd parameter in the database. You can rename it to “str” but you still need to use “atK for the note-tag.

  6. unfauglith says:

    This script is… Awesome!

    That's it, I just wanted to say thank you for your awesome work, Hime. Keep it up. 🙂

  7. RogueDeus says:

    For those that want to apply bonuses to actor 'sparam' and 'xparam' as well.
    (Just place this as its own script under Himes – Parameter Bonuses.)
    .
    http://www.roguedeus.com/Stuff/RDeus%20-%20Parameter%20Bonus%20Plugin.rb
    .
    Create an issue in the issue tracker if you have trouble.
    https://github.com/Hime-Works/Requests/issues

  8. Hime says:

    Added support for enemy bonus parameters.

  1. August 1, 2014

    […] Two updates have been made to the Parameter Bonuses script. […]

Leave a Reply to Hime Cancel reply

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