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

Rudostan

Descent Game Programmer/ Terrible Artist
Veteran
Joined
May 21, 2018
Messages
62
Reaction score
4
First Language
English
Primarily Uses
N/A
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?
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
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
 

Rudostan

Descent Game Programmer/ Terrible Artist
Veteran
Joined
May 21, 2018
Messages
62
Reaction score
4
First Language
English
Primarily Uses
N/A
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?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
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.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
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
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
As you specifically do not want a script, 'Script Requests' is not the place for this.

[move]RPGMaker VX Ace[/move]
 

Rudostan

Descent Game Programmer/ Terrible Artist
Veteran
Joined
May 21, 2018
Messages
62
Reaction score
4
First Language
English
Primarily Uses
N/A
Works well for me, thanks.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,047
Messages
1,018,540
Members
137,834
Latest member
EverNoir
Top