Extra Param Formulas

Last Updated: 2012.01.10
Download Link
Github Link

RPG Maker VX Ace certainly gives a lot of control to developers over many aspects of designing their RPG including custom formulas for individual items and skills. However, the program does not offer custom formulas for some of the more unique parameters such as hit rates, evasion rates, critical rates, etc. This script provides the ability to alter those extra parameters with primary stats altering them such as LUK affecting critical, DEF affecting PDR and whatnot.

Modify the formulas in the script module to your liking.

And that’s all, folks!

45 comments on “Extra Param Formulas

  1. Sweetness! I was just thinking yesterday how LUK does almost next to nothing and this will help give it some pizazz, thanks YF.

  2. Pingback: Third Script: Accuracy Overflow « crazescriptasylum

  3. I’m a bit confused about this. I’ve followed the script installation instructions, but where do I view the screen shown in the picture above?

  4. Something like magical critical hit would be cool. So you can make your physical crit rate dependent on strength, while your magical crit rate depends on intelligence.

      • All tags will affect the base value used in the formula.
        For example: lets say your PDR formula is as follows:
        :pdr_n_value => “0.01 * self.def”,
        :pdr_formula => “base_pdr + n”

        “base_pdr” (or base_insertstathere) is simply whatever the stat would normally be, including the tags you’ve set in the database. If a formula is JUST the base value, then that stat is unaffected by this script.

        So yes, the tags do still work, just make sure the base is included properly in the formula.

  5. I was just thinking… I feel like a feature similar to FFT can be implemented through this script. FFT had skills that had their own hit rate formulas. Is there anyway that this can be achieved through default methods? If not, then perhaps with a script, we can do it through creating our formulas within the script and binding them to a skill through notetags? Just an idea.

  6. I know YF doesn’t care much about random requests, but I would really like to see the Break Parameter from YEZ in VXA.

    It was a brilliant if overlooked script that added a whole lot of design space in combat.

    So… please? :D

  7. Not certain this script actually works, I changed :trg_formula => “base_trg”, to :trg_formula => “100 * trg * tcr”, but it had no effect. I used the same formula under Game_Battler and voila, it works as I wanted.

    • The result of trg_formula in this script will become trg. In other words, trying to use the variable trg in trg_formula won’t work. It’s like saying x = x+6.

      You probably mean 100 * base_trg * base_tcr.

  8. I’m really confused by these formulas, my Hit rate percentage is actually going down, base is 95% and with this script its 68%

    If someone could give me some insight on why this is happening I would appreciate it.

  9. Found out the problem, in the Hit formula at the end after base_hit it multiplies by 2 and divides by 3

    (hit_formula => “(n / (100.0 + n)) * 0.250 + 0.050 + base_hit * 2/3”)

    None of the other formulas have this, they just end with adding the Base. I’m not sure if this was intentional or a mistake but it seems to be working now.

  10. The Critical Eva shows up as a negative for me. Anyone else having this problem? I tried changing the values, but it seems to do next to nothing.

  11. So I’ve been trying to get this to work for me, but I guess I just don’t understand the formulas or something.Here’s what I’ve been aiming to do…

    Defense: Every 5 points increases HP by +1
    Magic Defense: Every 10 Points increases healing received (REC) by +1%
    Agility: Every 10 Points increases Magic Evade and Physical Evade by +1%
    Luck: Every 10 Points increases Critical Hit Chance and Critical Evade by +1%

    Anyone know what it would take to make this work? I would really appreciate any kind of help.

    • ok Depends how you want it, Im going to Assume that the total stars are in question, not the additional points you get as you level up.

      mhp= (def/5)
      eva= (agi/1000)
      mev= (agi/1000) #magic Evade
      rec= (mdf/1000)
      cri= (luk/1000) #Critical hit chance
      cev= (luk/1000) #Critical evade chance

      With your HP, Im not sure you can change your Primary Statistics (ATK, HP, MP, LUCK), as they are determined by your level, and this script has no mention of editing them. so I can’t help you with that , but the rest is easy, if you aren’t seeing any changes trying changing the 1000 to 10, because they are percentages the game may divide 100 on its own(to change it into a percentage).
      Hope it helps

  12. This is Awesome, though one question, does this script allow referencing from Enemies PARAms, e.g for PDR, the formula requires the enemies Atk.

    here what I have
    “(target.atk * (((n – 280.4)**2) / 110) + 16) / 730 * (730 – ((n * 51 – n**2) /11) / 10) / 730”

    Of course Target.atk will throw an error, but i have no idea what I should do about it
    Any Idea’s?

  13. Pingback: My Introduction to RPG Maker VX ACE | RPG Maker VX ACE Information

  14. Hi!
    Can I check the target’s parameters here too?
    I used for evasion rate: “((self.luk / target.luk) *100) – 100”, but that gives the following error…

    “Script ‘Game_Battler’ line 482: NameError occured.

    undefined local variable or method `target’ for
    #<Game_WeaponMaster: 0x800d130"
    Can anyone help me with this?

    • Short answer: no.

      Well, the thing is, extra & special parameters are stats an actor has individually, just like normal parameters. Your actors and enemies are supposed to have ‘set’ parameters for the game to compute.

      For example: if the evasion formula is “0.05 + n/1000” (n value being agi) then the engine can compute the value for every battler. Slime has an agi of 10, so the engine computes “0.05 + 10/1000 = 0.06”, thus Slime’s evasion is 6%. Ninja has an agi of 300, so the engine computes “0.05 + 300/1000 = 0.35 so the Ninja has 35% evasion.

      It doesn’t make sense for evasion to be calculated by a ‘target’s’ stats, because evasion is a stat belonging to the battler. Evasion doesn’t have a “target” anymore than mdf or luk have targets. Therefore, this script will not recognize “target.” as valid. This also renders “self.” unnecessary (except with the parameter “def”, because otherwise, the script system will think you mean “define”).

      It sounds like what you want to do is have the hit chance effected by the luk of the attacker and the target. This CAN be done. Just have luk add to both hit rate and evasion.

  15. Alright, this script is making absolutely no sense to me, how EXACTLY do I get it to make my character’s crit chance: base crit chance + 10% of their agility. This doesn’t strike me as particularly complicated but nothing will produce this result, I don’t get it.

    • For example: if you have 100 agility, then you want critical chance increased by 10%, (ex: if the base is 5%, you’d want it to become 15%). The formula you’d want is:
      :cri_n_value => “0.001 * agi”,
      :cri_formula => “base_cri + n”,

      What trips up a lot of people is that if your base_cri is for example 10%, then its value in the formula is “0.10”, not “10”. If the formula returns “10”, than that will be read as 1000%, not 10% as you might expect.

      Also of note: script changes don’t seem to take effect until you save the project, so if you change the formula and test without saving, the changes won’t show.

      • Thank you oh so much for clarifying how this works toad004! You saved the balance of my project! Much love!

  16. I had a little trouble with the hit rate as well so I’d fiddle around with and
    I found a formula that works for me.
    :hit_formula => “(n / (100.0 + n)) * 0.250 + 0.050 + base_hit * 2/2.5”,
    I’d just changed the 3 to 2.5 and got my desired hit ratio.

  17. There doesn’t seem to be any way to modify these stats with states, say with notetags, which I’d find really useful. Example: I want a state that simply doubles the inflicted’s Evasion rate.

  18. Okay, I have used multiple RPG maker programs and I am quite familiar with anything but the scripting part. I’ve spend the entire day today watching tutorials, trying out scripts from the internet and trying to do modifications and find out how it works. I have a long way to go.

    For the project I’ve started I want to use the same game mechanics I have for a pen&paper RPG I’ve created. It’s quite similar to Dungeons and Dragons, for those who know it.

    My question is, would it be possible through scripting to roll a random number between 1-20, add up the attacker’s ‘to hit’ and check it up with the defenders ‘defense’ to see if it is a hit or a miss and then calculate the actual damage done (or show a ‘miss’)?

    It also has to automatically cause it to crit when a 20 occurs on the random number and fumble (I was thinking attacking yourself or an ally) when a 1 occurs on the random number.

    And am I looking in the right direction for such settings with this script or should I be looking further into it to create something myself later on?

  19. Is it possible to use variables in this? I have 0 script Xp but generally figure things
    out myself. This one Im having trouble. Example, I have a variable that I call Mdef
    and want the parameter formula to add that variable along with the base MDR.
    Im using multiple variables for a lot of things but that’s the easiest example. So would
    something like this actually work?
    :mdr_n_value => “$game_variables[1]”,
    :mdr_formula => “base_mdr – (n / (256.0 + n)) * 0.500 – 0.000”

  20. I get odd numbers here

    :pdr_n_value => “self.def”,
    :pdr_formula => “(1 – (100 / ( 100 + n ))) * 100 + base_pdr”,

    Lets say def = 7
    (1- (100 / ( 100 + 7))) * 100 + base_pdr
    (1- (100 / ( 107))) * 100 + base_pdr
    (1-(0,9345794392523364485981308411215)) * 100 + base_pdr
    (0,0654205607476635514018691588785) * 100 + base_pdr
    6,54205607476635514018691588785 + base_pdr
    101.00%

    Well… Whats up with that?

    Even when i divide by 10 instead of 100 (wich gives just bigger numbers)
    This happens with everything when i want to divide into the 1~0 bracket.

    It just gives me a better balancing, i could have over 1.000 or 2.000 def and i still wont get over 100% PDR

    I guess its because of the long decimals… but… somewhere i saw that it rounds up by default, im just too lazy to look it up

    • nvm i got the solution

      100 is an integer
      100.0 is an decimal

      thus 100 / 100 + n will always be 0 or 1

      100.0 / 100.0 + n will now be between 0.0 and 1.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s