How to get the Critical rate value in a variable / menu ?

Hi,

I'm searching to get the crit value, for showing it on a text box or in the menu, but i dont find the answer.

I'm using Visustella battlecore & main menu.

I can get the attack, def, (etc) value with a variable, but crit. chance is missing.

There is any way to get this value and put it in the status menu, or in a variable ?

Thanks
The property that stores a battler's critical chance is .cri
This is a basic function of the VisuStella Elements and Status Menu Core. Just use that if you want the simplest solution.
This is a basic function of the VisuStella Elements and Status Menu Core. Just use that if you want the simplest solution.
Ok this is for menu, ill put it in my bag and see for this later.
The property that stores a battler's critical chance is .cri

that's exactly what im looking for, but i cant get it working ?

1668429963760.png


I did something wrong to show my Crit rate in text box ? It work for my Atk rate if i put .atk instead of .cri and show the good amount, but crit stay at 0.

We're not supposed to get 0 crit rate, no ? It wont work on my buff too, it's supposed to add 50% crit rate, and the text always show me 0.
Ok this is for menu, ill put it in my bag and see for this later.


that's exactly what im looking for, but i cant get it working ?

View attachment 245139

I did something wrong to show my Crit rate in text box ?
That should work. What is actor 9's crit and what is it currently showing?
That should work. What is actor 9's crit and what is it currently showing?
It's my basic hero, so 5% if it work like this ?

1668431680434.png


It show 0, no matter what i do, i've a self buff who add 50% and it always said 0.


EDIT : Wait, i've put +50% crit. on the ex parameter of my "self buff" state, but because its RPG maker, its not 50% but 0.5%, so if i put 200%, now my variable show me "1" instead of "0".

That mean, player have 0% crit rate at start ? How its possible, when i try some combat i always hit some critical.

Isnt possible to add 50% flat crit rate as buff ?
I've visustella battle core, and i've already a spell who have <Set Critical Rate: 50%> in notetag, but it work only for the spell instance, i can't put it as a buff for 3 round.


EDIT 2 : OK OK ! I suppose RPG maker is stupid, and think the 4% (in the hero tab) try to show 0.04 so it show 0.
And if i put 100%, it show me "1", and 1000% show me "10" but 1000% add tons of damage to the crit it's stupid (multiply my damage by 4 or 5)
I supposed there is no way to modify how the value is show, and transform the decimal crit in flat value ?

EDIT 3 : After tons of research, i've found i can just multiply my script by 100 to get the real value showed in text.
For people who's interested :

($gameActors.actor(9).cri)*100

1668435157667.png



Thanks you both, the .cri was what im looking for and i wouldnt find it without you, and the Visustella plugin will work like i need for menu.
It's my basic hero, so 5% if it work like this ?

View attachment 245140

It show 0, no matter what i do, i've a self buff who add 50% and it always said 0.


EDIT : Wait, i've put +50% crit. on the ex parameter of my "self buff" state, but because its RPG maker, its not 50% but 0.5%, so if i put 200%, now my variable show me "1" instead of "0".

That mean, player have 0% crit rate at start ? How its possible, when i try some combat i always hit some critical.

Isnt possible to add 50% flat crit rate as buff ?
I've visustella battle core, and i've already a spell who have <Set Critical Rate: 50%> in notetag, but it work only for the spell instance, i can't put it as a buff for 3 round.


EDIT 2 : OK OK ! I suppose RPG maker is stupid, and think the 4% (in the hero tab) try to show 0.04 so it show 0.
And if i put 100%, it show me "1", and 1000% show me "10" but 1000% add tons of damage to the crit it's stupid (multiply my damage by 4 or 5)
I supposed there is no way to modify how the value is show, and transform the decimal crit in flat value ?

EDIT 3 : After tons of research, i've found i can just multiply my script by 100 to get the real value showed in text.
For people who's interested :

($gameActors.actor(9).cri)*100

View attachment 245142


Thanks you both, the .cri was what im looking for and i wouldnt find it without you, and the Visustella plugin will work like i need for menu.
Yeah, sorry, I thought you knew that it was represented as a floating point number. Never thought to tell you to multiply it by 100. 😛

This is a built-in function of the variable assignment via the engine; it converts numeric values to integers. If you want to store a floating-point number, you need to edit the _data array directly instead of using setValue.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-the-critical-rate-value-in-a-variable-menu.152653/