MV Hit Accuracy (YEP) and custom formulas

I'm very new to MV, as I have been using Ace since forever, and how the plugins are laid out is different from how scripts are for Ace. I'm trying to change the hit and evade formulas for this, and there's these terms like skillHitRate, userHitRate, targetEvadeRate in the formula. Do I have to use these terms?

I'm trying to make the formula Player Luck ≥ 1d10 + Enemy Agility in it and idk what I'm doing because in Ace I could just type in what I wanted. I also have the Extra Parameter Formula (YEP) plugin and am not sure if I have to change anything in there either.

All of those terms are defined for you right in the plugin instructions:
1708140783656.png


Additionally, if you read through the plugin parameters, you can redefine them to be whatever parameters/formulae you like there.

But the answer is no - you don't need to use any of those provided variables, in the Hit Formula plugin parameter you have access to all of Yanfly's standard eval variables:
a/b/user/target
item/skill
s (for switches)
v (for variables)
Thanks, but I'm still having trouble with the formulas. I'm trying to recreate a version of THAC0 where the Player Luck (used for to hit) ≥ 1d10 + Enemy Agility. IDK why but I can't seem to get it to work. (ignore the 20 in the formula, I forgot to change that. I changed it to a 10 and it's still is a whiff fest)
Screenshot (477).png
user.luk will never miss. By default, the engine can't provide any value for a parameter (e.g. luck) lower than 1, which is already a 100% hit rate.

That's why the default formula has multipliers and subtraction in it, so there's a possibility of it not being 100% (i.e. 1).

This plugin does not change the default way an attack is "rolled" - the result of the hit formula is compared to a Math.random() (i.e. a d100). So if you want to make the percentages work differently than that, you need to make sure this ends up with either a 1 to indicate a hit or a 0 for a miss.

Similarly, if the attack hits, a Math.random() (d100) is compared to the result of the evade formula.

So you're trying to break up your hit formula into two separate places, and that won't do what you want.

I would suggest your Hit Formula is:
Code:
(user.luk >= Math.randomInt(10) + 1 + target.agi) ? 1 : 0

and you leave the Evade Formula at 0.

Original thread: https://forums.rpgmakerweb.com/threads/hit-accuracy-yep-and-custom-formulas.165851/