How calculate state formular?

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?
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.
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.

Original thread: https://forums.rpgmakerweb.com/threads/how-calculate-state-formular.121407/