How do I print out an Actor's CRI rate?

Simple request: I modified line 490 of Game_Battler:

item.damage.critical ? user.cri * (1 - cev) + (luk / 0.25) : 0
to be able to work with LUK now, instead of it being mitigated by solely CEV and what you set as an actor's CRI% rating.

So now, to test it out, is there a way to print out an actor's CRI rating with a msgbox_p?
you can use print or p and then the line of code

print will let text add on to the end of it, p will put out the info and then start a new line in the console. There's another one as well that will show the result in a pop up box but for the life of me I can't remember it.. something like msgbox(statement).

so you'd use

p item.damage.critical ? user.cri * (1 - cev) + (luk / 0.25) : 0
Not quite what I mean. I should probably rephrase what I said.

I modified said line of code. It modifies the CRI rate of actors to be dependent on LUK. Now I want to be able to print out, say, the first actor's new CRI rating. Is there a way to do this?
I don't know if I'm just not seeing what exactly it is that you want.

If you're wanting to make changes to the crit rate you might try looking at this def in Game_BattlerBase at line 68

  def cri;  xparam(2);  end               # CRI  CRItical rate
You would like to see what the new critical rate is for each actor? The code below will show the criticalrate each time someone takes a swing in battle (actor or enemy). It will show it in a pop up window. If you don't want to use the window, then turn on the console and use the p command instead.

Code:
  #--------------------------------------------------------------------------  # * Calculate Critical Rate of Skill/Item  #--------------------------------------------------------------------------  def item_cri(user, item)    msgbox(item.damage.critical ? user.cri * (1 - cev) + (luk / 0.25) : 0)    item.damage.critical ? user.cri * (1 - cev) + (luk / 0.25) : 0  end
Ahh, thanks. I got it to work!
glad to have helped =)
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.
hehehe, you didn't lock it 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-print-out-an-actors-cri-rate.21370/