YEP_X_CriticalControl question

I'm having a weird interaction when trying to put in the parameters for this plugin.  I'm attempting to edit the critical rate modifier and the critical multiplier modifier however neither are working quite right.  I was wondering if anyone could help me.

For the rate you get a critical hit at, I'm trying to make the modifier...

% of critical hit = (X*.75)+1

Where X is the character's CRI.  Then it could round up.  For examples of how this would work...

1 CRI = 2%

10 CRI = 9%

31 CRI = 25%

I have it down as...

rate = (user.cri*.75) + 1;

The problem is, this is making every attack a critical hit, which I don't want at all.

The second problem is the parameter that dictates the critical hit modifier.  I want the formula to be...

[SIZE=14.6667px]Critical multiplier = (.2*X)+1[/SIZE]

[SIZE=14.6667px]Where X is the character's Luck. Not rounded. For example...[/SIZE]

[SIZE=14.6667px]1 LUK = 1.2 times the damage.[/SIZE]

10 LUK = 3 times the damage.

31 LUK = 7.2 times the damage.

I have this down as...

value = (.2 * user.luk) + 1;

The problem here is that it's making critical hits do way too little damage no matter what.

I think this is just me not reading how to input these numbers right.  Can anyone help?
I haven't looked into the script yet, but I know why your crit multiplier doesn't work as it should.

value contains the damage your skill would do, but you're overwriting it with a new value.

You have to use this for it to work as you want:

value *= (.2 * user.luk) + 1;Don't forget the * - sign after value. It is a multiplier after all 😉

For your crit rate problem, I have a guess.

Let's take a look at your example with the 10CRI.

(10 * 0.75) + 1 = 8.5

That would be 850% (1 equals 100%)

For your ~9% you'll need something like:

rate = (user.cri * 0.75 + 1)/100;Then it would be:

(10 * .75 + 1) / 100 = 0.085 = 8,5%
I haven't looked into the script yet, but I know why your crit multiplier doesn't work as it should.


value contains the damage your skill would do, but you're overwriting it with a new value.


You have to use this for it to work as you want:



value *= (.2 * user.luk) + 1;


Don't forget the * - sign after value. It is a multiplier after all 😉


For your crit rate problem, I have a guess.


Let's take a look at your example with the 10CRI.


(10 * 0.75) + 1 = 8.5


That would be 850% (1 equals 100%)


For your ~9% you'll need something like:



rate = (user.cri * 0.75 + 1)/100;


Then it would be:


(10 * .75 + 1) / 100 = 0.085 = 8,5%



I'm going to bump this if possible because it took me the longest time to realize that this formula actually isn't working.  It's making it so critical hits never happen.
The problem with the original formula and the formula you were given is that CRI (and other ex-paramters) is based on a percentage value of 1; putting in 5% CRI in the editor doesn't equal a CRI of 5 but of 0.05. By adding a flat 1, that's adding 100% to the result, making every attack a critical.


For critical rate, the formula would need to be ([user's CRI]*0.75 + 0.01).
The problem with the original formula and the formula you were given is that CRI (and other ex-paramters) is based on a percentage value of 1; putting in 5% CRI in the editor doesn't equal a CRI of 5 but of 0.05. By adding a flat 1, that's adding 100% to the result, making every attack a critical.


For critical rate, the formula would need to be ([user's CRI]*0.75 + 0.01).

I was just going to say the exact same thing. lol beat me too it.

Original thread: https://forums.rpgmakerweb.com/threads/yep_x_criticalcontrol-question.54027/