MV Help getting a formula for evasion in a plugin to work properly? [Solved]

So, I'm not the most knowledgeable in coding. I know a little bit, but not a whole lot. I downloaded a plugin off of an old forum because it looked like just what I needed to incorporate a system I've been building into my RPG Maker MV games. Since the author said it was free to be used and modified, I thought it would be as simple as modifying it, replacing the formula with my own, and going on... But I'm having some serious trouble.

My formula is the highlighted bit in the image.

Screenshot (2145).png

I'm using smaller numbers in this game, so the player Agility I currently have set to 18, and the enemies all have 10 Agility. I thought that by doing the math, the player should always hit the foes in the test battle, and the player should have a 20% chance to dodge the enemy attacks... The problem is the player is always dodging. Which shouldn't be the case if it's 20% which makes me think I'm doing something wrong, or messed something up... I've been at a loss for hours and don't know what to do.

I apologize if the answer is incredibly simple...
I could be wrong, but if I'm reading that code correctly, I get -20 for the solution, and I'm not sure how the engine would interpret that.
you might be supposed to be using a rate, not an integer. did you try dividing everything by 100 in the end? the 20 might end up being equivalent to 2000% evasion
you might be supposed to be using a rate, not an integer. did you try dividing everything by 100 in the end? the 20 might end up being equivalent to 2000% evasion
Looks like you're right. I didn't even think that it may be off due to evasion being a percentage! I ran it through a calculator and tested it in game and the problem seems to be fixed. Thank you so much!
I get -20 for the solution, and I'm not sure how the engine would interpret that.
Harold dives face-first into the oncoming sword!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/help-getting-a-formula-for-evasion-in-a-plugin-to-work-properly-solved.162365/