- Apr 12, 2012
- Reaction score
- First Language
- Primarily Uses
skillHitRate is the listed success rate of the skill (represented as a decimal, so it takes the percentage and multiplies it by 0.01). So yeah, 100% means skillHitRate = 1.I'm using YEP_HitAccuracy to have a nicer formula to calculate the sucess of an attack but i'm kinda
confused by what exactly those variables mean
skillHitRate * (userHitRate - targetEvadeRate)
1) SkillHitRate = 'Sucess' parameter on the skill? Success =100% means skillHitRate = 1?
View attachment 182210
2) userHitRate refers to the trait of actors class+extra hit rates from equip, states?
3) A character with no HitRate traits whatsoever would always miss?
4) targetEvadeRate refers to the trait of actors class+extra hit rates from equip, states
5) A character with no Evade Ratetraits whatsoever would always be hit if the attacker were not hadicaped iin hit rate?
I feel like these are basic questions that doesnt deserve they own thread
userHitRate and targetEvadeRate are both determined by formulae in the plugin parameters. By default userHitRate is user.hit for physical and 1.0 for magical and certain hit, with targetEvadeRate defaulting to target.eva for physical, target.mev for magical and 0.00 for certain hit. user.hit and target.eva will be the combined value from the battlers's traits and whatever equipment/states etc they have. You are correct: if the battler had no hit rate traits whatsoever the value would be 0 and you'd always miss. A battler with no evade chance would not subtract anything from the user's hit rate.
Let's say your actor has a 80% hit rate from traits and they use a physical skill with 100% success. The enemy has no evade traits. The formula ends up being 1.0 * (0.8 - 0) = 0.8.
Now let's say the actor has 93% hit, the skill has a success rate of 87% and the enemy has 4% evasion. It becomes 0.87 * (0.93 - 0.04) which comes out to 0.7743 rounded to 0.77, so you'll end up with a 77% chance of hitting.
Obviously this is just the default formula used by the plugin; you can change that completely if you wish.