Trouble with the LUK Effect field in Yanfly Base Parameters

I’m trying to adjust this formula, but I’m having a hard time seeing any effect from it, no matter what adjustments I make.

I referred to a reddit thread titled "[MV] How do the default stats work?" (the link doesn't work in this post) to figure out the formula the system is using.

So, if I’m not completely missing something, the AddState % is multiplied by whatever is in this field in the plugin. Am I wrong there?

So if I set AddState to 100%, then the actual resulting percent should be whatever the LUK field returns. So if it returned 0.5, then the State should be applied 50% of the time.

Assuming I’m not wrong yet, I’m at a loss as to why my adjustments seem to do nothing. No matter what I put into the LUK Effect field in the plugin, it appears to have no effect on the chance of the state being applied—it is solely based on the percentage assigned in AddState.

I’ve even made the LUK Effect formula just be “0” and it still didn’t change the chance of success.

The project has been saved. The project has been reloaded. The plugin is turned on. My computer is plugged in. I'm likely missing something obvious, but I don’t know what’s going on here. I have messed around with formulas in these plugins a lot already, and never had any problem like this.
Can you show a screenshot of how the plugin parameters refering to Luk are set in your game?

Also as far as reading Yanfly's explanations is concerned, Luk doesnt seem to work as directly as that
"LUK – Luck
– This is the luck value of the battler. By default, this stat is used to affect the success rate of states, buffs, and debuffs applied by the battler and received by the battler. If the user has a higher LUK value, the state, buff, or debuff is more likely to succeed. If the target has a higher LUK value, then the state, buff, or debuff is less likely to succeed."

At the very least, it begins with checking who has higher luk, the user or the target
Whenever my game forgets to use one of my own plugins, it's usually a stupid typo. Is there a chance that a syntax error is causing the whole plugin to be ignored?
Whenever my game forgets to use one of my own plugins, it's usually a stupid typo. Is there a chance that a syntax error is causing the whole plugin to be ignored?

Based on my experience, that does happen when a plugin has an error that is catched right on when the game is still loading them in which case the game just decides to ignore the plugin completely..

For his case though, assuming the custom parameter formula's are working, with just the effect of Luk on AddState % being non existent, then its not really a case of the plugin being ignored at all.

@Sword of Spirit

Edit: Make sure you are editing Luk Effect, and please show the screenshot so that we can check if there is anything wrong.

Also, do you have any other plugin that might be handling luk and/or effect rates?

I have rechecked the whole plugin and if your luk effect formula is correct, then it should be doing what you want.
(Unfortunately it's nothing as simple as a typo that I can find. I verified that other parts of the plugin are working. I know how that is though--it's the parentheses that get me!)

Here are a few screenshots.

This is how the formula box for determining the LUK Effect is set in the plugin by default:



On Reddit, user snchzantonio gave a thorough explanation of how the program uses luck. I apparently can't figure out how to use links on this site, because every time I input the URL to the discussion I'm talking about, it brings up an image of the first bit of it, which when clicked doesn't work. So if you Google "[MV] How do the default stats work?" you should get the post I'm talking about as the first answer.

This screenshot from that post seems to show that the plugin's default setting is accurately representing the default way the program handles it:



I've tried a few different simple formulas, because I want to make sure it works before I worry about getting my long formula working.






Even this (in case for some reason it needed Math() to do math):



I get nothing from any of them. As far as I can tell that LUK Effect field in the plugin isn't doing anything.
So even putting plain 0 doesnt stop the state from being added? That should have stopped the state because as checked, the game is multiplying the lukEffect to the state's rate

This could be a plugin setup problem or incompatibility.. Can you post a screenshot of your plugin manager so that people can check what plugins you have and if they are in the right order?

PS: Just to be sure, any other part of the plugin works correctly?

For adding links, you could try using the link button (the one that looks like a chain/infinity) in case you're adding them directly
What is the "Hit Type" of the skill you're applying the state with? Is it set to Certain Hit? Or physical/magical hit?
@Palin - Im curious as to why you'd ask it. Hit type is only used (be default) for evasion/magicevasion and pdr/mdr calculations and not used in anyway for State Apply. As long as the skill/item hits, the state will be processed and hit type doesnt matter in that time anymore. Can you enlighten me? 🙂
Hit type is also used when deciding if a state is applied. "Certain Hit" will bypass the luck effect rate the OP is having problems with.
@Palin - oh I see. I must have missed that one. Thanks for the explanation 🙂
Hit type is also used when deciding if a state is applied. "Certain Hit" will bypass the luck effect rate the OP is having problems with.

Well, that's it. 😕 I am using Certain Hit. Looks like it works on Physical Attack. But the whole point of it is for my formula to be the only determinant as to whether or not the State takes effect. So I was going to set it to Certain Hit, AddState 100%, and then create my own formula in the LUK effect that creates the percentage I want based on various values.

So that won't work.

None of the other things that would make it immediately simple (such as allowing raising the Success on a Physical Attack or Magical Attack above 100% to just raise the chance to so high it always hits, or raising the HIT parameter for the usage of that skill for the same result) are doable, so I'll have to do something completely different to get what I need.

How about this. Assuming I use Certain Hit but then use the damage formula to determine everything (and just go with 0 damage), if I apply the State through the damage formula, will it take account of the LUK effect I set in the plugin, or is going to always work also?
If youre going to add the state using addState directly in the damage formula, it wont check for any kind of resistance or chances anymore.

Going by that, you'd need to use the Luk formula in the damage formula itself to determine if you're gonna add the state or not.
Yeah, that looks like what I'll have to do.

The funny thing is that applying states directly in the damage formula is what I was going to eventually do, on my second game in the series after I've gotten more of the basics worked out. It had decided it was the more flexible (I could vary the formula more by skill) but more difficult route, so I settled on using the LUK effect for now as giving me sufficiently good results for what I needed.

But now that we've determined that the easier route won't actually work, I guess I'll have to lead with the more difficult one. So I guess there is some upside to it not working in that I'm forced to use a higher quality solution. Although, that "0" that insists on popping up when you do no damage with a skill that isn't supposed to do any damage is a rather irritating side effect.

Thanks a lot for bearing with me. I don't know if it ever would have occurred to me to turn off Certain Hit.

Well, back to work.
There's probably a plugin out there that will prevent the 0 from popping out

Original thread: https://forums.rpgmakerweb.com/threads/trouble-with-the-luk-effect-field-in-yanfly-base-parameters.106192/