How calculate state formular?

Dehsalp

Veteran
Veteran
Joined
Oct 9, 2019
Messages
249
Reaction score
27
First Language
korean
Primarily Uses
RMMV
I understand that the lucky stat affects the state condition.

but, how is it calculated? or state formula?

if actor A luck is 200 and enemy luck is 100
and actor A use 30% stun skill to enemy.

What is the actual value applied?

Plus one more thing

In Yanfly's Buff state core.
has buff formula is " this._buffs[paramId] * 0.25 + 1.0 "
what is this actually?
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,531
Reaction score
1,424
First Language
English
Primarily Uses
RMMV
In Yanfly's Buff state core.
has buff formula is " this._buffs[paramId] * 0.25 + 1.0 "
what is this actually?
If memory serves, it's a multiplier applied to the stat being buffed/debuffed:

  • this: The actor or enemy in question
  • _buffs: The array of buffs and debuffs in sequence. Positive numbers indicate x number of stacks of buff, negative numbers indicate x number of stacks of debuff. [-2, 1, 0, 0, 0, 0, 0, 0] indicates 2 stacks of debuff on HP and 1 stack of buff on MP.
  • paramId: The parameter id: 0 hp, 1 mp, 2 atk, 3 def, 4 mat, 5 mdf, 6 agi, 7 luk
  • 0.25: This is the percentage by which each stack increases (or decreases) the stat
  • 1.0: 1 is the default multiplier, since 1 * n = n. Basically you need it to make sure a positive increase for a given buff is actually an increase (ie, 1.25 for one stack, not 0.25) and to make sure a negative is a proper decrease (ie, 0.75 for 1 stack)
Currently buffs/debuffs cap off at 2 stacks, but in theory you could (using that formula) stack debuffs all the way to 4 (for a complete reduction of the given stat) before things got weird with negative numbers.

Edit: As for luck and states, I don't quite recall. One of the first things I did was change luck into a different stat with completely different functionality. The stat itself was completely taken out of the state application equation. Looking it up in the code:

Code:
return Math.max(1.0 + (this.subject().luk - target.luk) * 0.001, 0.0);
Using your example: 1 + (200 - 100) * 0.001 = 1.1

Your 30% stun becomes a 33% stun, so it's a minor advantage at best.

If I got any of this wrong, someone feel free to correct me.
 
Last edited:

Dehsalp

Veteran
Veteran
Joined
Oct 9, 2019
Messages
249
Reaction score
27
First Language
korean
Primarily Uses
RMMV
If memory serves, it's a multiplier applied to the stat being buffed/debuffed:

  • this: The actor or enemy in question
  • _buffs: The array of buffs and debuffs in sequence. Positive numbers indicate x number of stacks of buff, negative numbers indicate x number of stacks of debuff. [-2, 1, 0, 0, 0, 0, 0, 0] indicates 2 stacks of debuff on HP and 1 stack of buff on MP.
  • paramId: The parameter id: 0 hp, 1 mp, 2 atk, 3 def, 4 mat, 5 mdf, 6 agi, 7 luk
  • 0.25: This is the percentage by which each stack increases (or decreases) the stat
  • 1.0: 1 is the default multiplier, since 1 * n = n. Basically you need it to make sure a positive increase for a given buff is actually an increase (ie, 1.25 for one stack, not 0.25) and to make sure a negative is a proper decrease (ie, 0.75 for 1 stack)
Currently buffs/debuffs cap off at 2 stacks, but in theory you could (using that formula) stack debuffs all the way to 4 (for a complete reduction of the given stat) before things got weird with negative numbers.

Edit: As for luck and states, I don't quite recall. One of the first things I did was change luck into a different stat with completely different functionality. The stat itself was completely taken out of the state application equation. Looking it up in the code:

Code:
return Math.max(1.0 + (this.subject().luk - target.luk) * 0.001, 0.0);
Using your example: 1 + (200 - 100) * 0.001 = 1.1

Your 30% stun becomes a 33% stun, so it's a minor advantage at best.

If I got any of this wrong, someone feel free to correct me.

Thank you for your answer.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top