Check probabilities of States in battle?

This is hard to explain... So I'm curious as to what the final chance is of inflicting a state when a skill is used. Yes, I can figure it out mathematically, but when you factor in states that change rates, it becomes a headache. Is there any way to confirm what calculations are being done that leads to the final result? Even something that shows the chance that the state had of being inflicted in battle?
Game_Action.prototype.itemEffectAddNormalState = function(target, effect) {var chance = effect.value1;if (!this.isCertainHit()) {chance *= target.stateRate(effect.dataId);chance *= this.lukEffectRate(target);}if (Math.random() < chance) {target.addState(effect.dataId);this.makeSuccess(target);}};
That is the code done to calculate chance right before applying a state in battle, or through items, etc. Not sure what you were entirely asking for really though, if you want something to output the process to console I can make that real quick.
Yeah. I spotted that code and I'm actually looking to tweak it for a plugin. But I'm looking for the end result to be displayed, well... Somehow. I just want to know what the actual % chance is whenever a state is attempted to be applied to a battler.

Edit: And how do I access the console? This is all new to me. Sorry.
If you are using YEP_CoreEngine there is a parameter you can use to always have it shown, otherwise you could press F8 when in play test.

You could do something like this:

Game_Action.prototype.itemEffectAddNormalState = function(target, effect) {var chance = effect.value1;if (!this.isCertainHit()) {chance *= target.stateRate(effect.dataId);chance *= this.lukEffectRate(target);}console.info("Chance of Applying State " + effect.dataId + "  Is: " + chance);if (Math.random() < chance) {target.addState(effect.dataId);this.makeSuccess(target);}};
It will output the chance a state will be applied to console, every time a state is to be applied.
Thank you very much! I'll give it a shot as soon as I get home from work. I'm just always concerned about probabilities when it comes to balancing my game. I need to see what's going on behind the scenes. I really wanted this for testing purposes.

Original thread: https://forums.rpgmakerweb.com/threads/check-probabilities-of-states-in-battle.51811/