Using Luck in Buffs and Debuffs

Hi everyone.
I thought about repurposing Luck as a stat to be used in buff/debuff calculation, and maybe just put it in Yanfly's BuffStatesCore Buff Formula. From what I've read, Luck as a stat doesn't really affect anything, so I decided to repurpose it into something á la Dexterity and what not. Let's say, if the formula for buff is <this._buffs[paramId] * 0.1 + 1.0> then maybe it is possible to sandwich a fraction of caster's Luck into it? Like 0.1


I was wondering if that could work, and if it could, then how.
And if it wouldn't, then resort to good old notetags and states? The problem is that I'm completely lost at JS, so any help would be appreciated.
maybe it is possible to sandwich a fraction of caster's Luck into it? Like 0.1
it is. but you would need to take some precautions to avoid recursion since you'd make stats dependent on other stats and themselves if not careful

if you use this as your formula, itll add 0.1% of the battler's luk directly into the stacking bonus/penalty for buffs and debuffs
Code:
this._buffs[paramId] * (0.1 + paramId < 7 ? this.luk/1000 : 0) + 1.0
necessarily, luck is exempt from this bonus

EDIT: thats what i get for not testing it🤣. slight adjustment
Code:
this._buffs[paramId] * (0.1 + (paramId < 7 ? this.luk/1000 : 0)) + 1.0
From what I've read, Luck as a stat doesn't really affect anything
Luck is actually one of the stats that does do something. Attack and Defense only do whatever you put into the damage formula, but Luck has an effect on giving someone a state (I think it's 1/10th the luck difference as a % modifier?). If you have Yanfly's Base Parameter Control plugin, it'll show you the formula Luck has in your game on state gain.
but Luck has an effect on giving someone a state (I think it's 1/10th the luck difference as a % modifier?)
its actually 1/1000th of the difference between the two and has a minimum of 0%. the skill in question also cant be certain hit
its actually 1/1000th of the difference between the two and has a minimum of 0%
This is a far more sane way of saying what I said.

the skill in question also cant be certain hit
This I did not know, wow that is important to remember.
Hi everyone.
I thought about repurposing Luck as a stat to be used in buff/debuff calculation, and maybe just put it in Yanfly's BuffStatesCore Buff Formula. From what I've read, Luck as a stat doesn't really affect anything, so I decided to repurpose it into something á la Dexterity and what not. Let's say, if the formula for buff is <this._buffs[paramId] * 0.1 + 1.0> then maybe it is possible to sandwich a fraction of caster's Luck into it? Like 0.1


I was wondering if that could work, and if it could, then how.
And if it wouldn't, then resort to good old notetags and states? The problem is that I'm completely lost at JS, so any help would be appreciated.
In my game, I use the foloowing:

Attack - Damage component of almost all skills.
Defense - Damage reducer of almost all skills. Also determines counter attack chance.
Spirit - Magic Attack/Defense modifier. MP/Tech/HP regeneration modifier.
Skill - Accuracy%, Evasion%, Critical Hit%, Critical Resistance%.
Speed - Actions per turn with slight exponential reduction. Some AoE resistance.
Advantage - standard luck plus affects Initial first turn order. Determines Charge/Boost gain.
This is a far more sane way of saying what I said.
having been slightly up longer than before, i can now understand what you meant 🤣
i completely misinterpreted that one.

This I did not know, wow that is important to remember.
yeah, certain hits are pretty much as "what you see is what you get" as you can get. theyre written to ignore a few mechanics entirely.
although i feel the luck portion would generally be inconsequential. most games ive played that had luck wouldnt allow a luck difference anywhere near 200. And even then, in this case thatll turn a 50% to a 60 or a 40% depending on whos favor its in

Original thread: https://forums.rpgmakerweb.com/threads/using-luck-in-buffs-and-debuffs.173618/