How to make critical hits imply a status effect without downloading custom scripts?

I don't want enemies to deal unfair amount of damage, that "one-shot" kill my character, instead I want to make him stunned for 2 rounds and be unstunned after taking direct damage.

I'm gonna make critical hits deal unmodified damage probably, I know how to, but how to make them add scripted for everyone status effects?
You can do this using the damage formula, it doesn't need a script. For example

if b.result.critical; b.add_state[state id]; end; a.atk * 4 - b.def * 2
Thanks man, however do you know how to use "else" in that manner?

I am using my tech points as stamina and if there is enough stamina on my character he will have a chance to dodge and never if does not have enough.

If the result is evasion how to cancel evasion if my character has not enough tech points?
I'm gonna make critical hits deal unmodified damage
Go to Game_Battler > Line 384
Change 3 to 1

Although I won't recommend to change the default script works. It's better to just open a new slot on your script below material, and put this
Code:
class Game_Battler
  def apply_critical(damage)
    damage * 1
  end
end

do you know how to use "else" in that manner?
Based on Kes' formula
Code:
if b.result.critical; b.add_state[state id]; else; <do something here> end; a.atk * 4 - b.def * 2
Or if you mean else if
Code:
if b.result.critical; b.add_state[state id]; elsif <condition>; <do something here> end; a.atk * 4 - b.def * 2

If the code is too long for a damage formula, again, open up a new script slot, write something like this. The first letter MUST be capital
Code:
Formula1 = "if b.result.critical; b.add_state[state id]; elsif <condition>; <do something here> end; a.atk * 4 - b.def * 2"
Then on formula box, write
Code:
eval(Formula1)

I'm not sure why you're against using custom script.
But the feature you requested is easier to be done in custom script.
For the stamina thing, would this work? I am assuming you are using a state in inflict higher EVA on your character.

if a.tp>= x; a.add_state(evasion state id); damage formula; else; damage formula; end
As you specifically do not want a script, 'Script Requests' is not the place for this.

Moved to: RPGMaker VX Ace
Works well for me, thanks.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-critical-hits-imply-a-status-effect-without-downloading-custom-scripts.95758/