MV Question about yanfly's accuracy plugin

I want hit chance to be based on the user's attack and evasion to be based on the target's defense. Am I correct in assuming that I can ignore the accuracy formula and just alter the user hit rate and target evade rate? If not, what should I use for my formula?
I'm making a combat system similar to Dragon Age in which the probability of a hit is (54 + (Attack - Defense)) / 100, or that you have a base 54% chance to hit and every point of the user's attack increases it by 1% and every point of the target's defense decreases the chance by 1%
have you tried using user.atk and target.def with your formula in the Accuracy Formula section?
(54 + (Attack - Defense)) / 100 to this (54 + (user.atk - target.def)) / 100

you could also try replacing the user.hit and target.eva but i think they may refer to the parameters in the database aka extra modifiers so idk,see how it goes.
have you tried using user.atk and target.def with your formula in the Accuracy Formula section?
(54 + (Attack - Defense)) / 100 to this (54 + (user.atk - target.def)) / 100

you could also try replacing the user.hit and target.eva but i think they may refer to the parameters in the database aka extra modifiers so idk,see how it goes.
Yeah that was my initial plan but the ability to modify the magic hit and evasion was pretty enticing
I'm just not sure about the relationship between the hit formula, user hit rate, and target evade rate and if changing one would throw off the other. I think I get it now, I was having a brain fart lol
Time for some good old fashioned trial and error
Well in case you can always save your trials in a notepad or something and see the overall result.
If you are messing around with hit rates it would be good to attack a few times to make sure things are right.
If you have something like the skill core plugin you could put the hit chance in a variable to see what the odds are before/after the hit, and display the variable in a message that is in a common event, at least for debugging purposes.


JavaScript:
<Before Eval>
$gameVariables.setValue(1, (54 + (user.atk - target.def)) / 100); // Set value of variable 1
$gameTemp.reserveCommonEvent(1); // Calls Common Event 1
</Before Eval>

<After Eval>
$gameVariables.setValue(1, (54 + (user.atk - target.def)) / 100); // Set value of variable 1
$gameTemp.reserveCommonEvent(1); // Calls Common Event 1
</After Eval>
Yeah that was my initial plan but the ability to modify the magic hit and evasion was pretty enticing
I'm just not sure about the relationship between the hit formula, user hit rate, and target evade rate and if changing one would throw off the other. I think I get it now, I was having a brain fart lol
Time for some good old fashioned trial and error
I'm just not sure about the relationship between the hit formula, user hit rate, and target evade rate and if changing one would throw off the other.
Just looking at the screenshot, it looks like the hit formula checks what you put into the user hit rate and target evade rates to determine accuracy. So you might be able to just change them to user.atk and target.def (and the magic versions for magic), then change the hit formula to include the additional 0.54 (or 54/100).

Another thought is that if attack and defense do additional things, you could instead find a way to change user hit to attack + 54 and evade to defense so that you can still modify hit/evade without modifying atk/def. You'd need a different plugin for that, though (I think Yanfly has one for it).
Just looking at the screenshot, it looks like the hit formula checks what you put into the user hit rate and target evade rates to determine accuracy. So you might be able to just change them to user.atk and target.def (and the magic versions for magic), then change the hit formula to include the additional 0.54 (or 54/100).

Another thought is that if attack and defense do additional things, you could instead find a way to change user hit to attack + 54 and evade to defense so that you can still modify hit/evade without modifying atk/def. You'd need a different plugin for that, though (I think Yanfly has one for it).
Thanks for the help. Yeah I ended up doing something similar. I changed hit rate to (userHitRate - targetEvadeRate) and changed user hit rate (user.aod + 54) / 100 and target evade rate to target.dod / 100

aod and dod are custom params I'm using with ICF-Soft's plugin that are actually the attack and defense scores. Attack and Defense have been changed to Strength and Dexterity respectively, and those scores affect your aod and dod score which affect your hit accuracy.
It's all overly complicated lol

Original thread: https://forums.rpgmakerweb.com/threads/question-about-yanflys-accuracy-plugin.138652/