MV Help with formula please

I'm using Yanfly's YEP_HITACCURACY plugin and I'm trying to write a formula that would just calculate the chance a target would have to evade an attack. I've tried multiple formulas and either the enemy and actor always miss/hit or only one of the two actor or enemy hits and the other misses. In the picture attached is the default formula, I went under the other tabs and made them blank, because I'm only looking to calculate the evasion formula. For all the skills in my game, I just wanted to set them to 100%, so I didn't want to involve that in the formula. The formulas I tried were:

((abs(userHitRate) - abs(targetEvadeRate))

abs(userHitRate - targetEvadeRate) /100 * 100

abs(userHitRate - targetEvadeRate)

(userHitRate - targetEvadeRate)

I set the ex-parameter for the actor to have a hit rate +0% and evasion rate +50% so the hit rate and evasion would be 100 and 50 respectively. I set the enemy to have a hit rate of -20% and evasion of -50% so it would have a hit rate of 80 and evasion of 50. My understanding with the formulas above and the ex-parameters set for the actor and the enemy is that when the actor attacks, the enemy should have a 50% chance to evade. When the enemy attacks, the actor should have a 70% chance to evade. That is how I'm trying to write the formula to calculate the evasion formula in my game, but there's something I'm not doing correctly and I can't figure it out. Any suggestions would be very helpful, I don't have much experience with this stuff. I also tested a brand new project to make sure no other plugins were conflicting and I think the plugin is in the correct order. Thanks in advance.
Moved to: Plugin Support
You'd probably find it easier to give the actor a to hit of 100%, as you said you set it to 0% so barring another change to the internal system you will never hit, ever. RPGMaker rolls once for hit and once for evade by default so 0% to hit is never met so you will just miss.

However using a plugin most use the players to hit - enemies evasion. That means with 100% to hit and 0% enemy evasion you will always hit. And instead of -20% you use 80% to hit on the enemy then to get the effect.

Remember there is no default to hit. If you don't set it at all its 0%. So -20% means it is now 0 - 20% or -20% to hit as well.
The formulas I tried were:
((abs(userHitRate) - abs(targetEvadeRate))
abs(userHitRate - targetEvadeRate) /100 * 100
abs(userHitRate - targetEvadeRate)
(userHitRate - targetEvadeRate)
First: there's no such thing as abs(). The function in JavaScript is Math.abs(), so every time you type that it's producing a reference error and the equation is zeroing out.

I'm also curious as to why you're using absolute value in the first place...it produces some weird scenarios.
I have a hit rate of 50% and the enemy has an evasion of 50% - that makes 0, I'll never hit him.

I have a hit rate of 50% and the enemy has an evasion of 70% which is a better value - absolute value produces a 20% chance to hit him. I'm more likely to hit than the enemy with the worse number.

I set the ex-parameter for the actor to have a hit rate +0% and evasion rate +50% so the hit rate and evasion would be 100 and 50 respectively.
As bgillisp said, if you set it to 0% how is that the same as 100%?

I set the enemy to have a hit rate of -20% and evasion of -50% so it would have a hit rate of 80 and evasion of 50.
Again, how? You seem to be starting from a value of 100% but I don't know where you're seeing that in the engine (and then what you said for actors would be incorrect because their evasion would be 150%).

My understanding with the formulas above and the ex-parameters set for the actor and the enemy is that when the actor attacks, the enemy should have a 50% chance to evade. When the enemy attacks, the actor should have a 70% chance to evade.
I'm going to offer the unasked-for opinion that those are annoying numbers. If I'm only hitting an enemy every other attack, that's going to make me feel like my character is basically incompetent (and, unless a battle consists of one enemy that dies in one hit, it'll make battles painfully long). I've never heard of a game with such a low success rate.

You can produce the numbers you want without this plugin entirely - forget evasion, delete that stat from everyone. Then give actors a hit rate of 50% and enemies a hit rate of 30%.

If you really want to stick with the plugin, do whatever combination of numbers and math functions will actually result in the values you want. For example, give everything a hit rate of 100%, give enemies an evade of 50% and actors an evade of 70%. Then userHitRate - targetEvadeRate

Original thread: https://forums.rpgmakerweb.com/threads/help-with-formula-please.156969/