Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
Hello!
I'm looking for a script that calls a common event just befor every battle starts (Not only random encounters).
I'm gonna explain it better, the chain of events that I would like is that one:

1. The common event starts
2. The common event finishes
3. Battle transition and...
4. Battle!!


I wonder if someone could help me with that.
Thanks in advance!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,722
Reaction score
8,505
First Language
German
Primarily Uses
RMMV
you only need a script for random battles (tsukihime has one) because for evented battles you can just add a direct call to the common event before you place the battle processing command.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,318
Reaction score
7,851
First Language
Indonesian
Primarily Uses
RMVXA
This will call a common event for every battle processing via event
Code:
class Game_Interpreter
  alias cmd_301 command_301
  def command_301
    param_0 = @params[0]
    @params[0] = 10 # <--- Common event ID
    command_117
    @params[0] = param_0
    cmd_301
  end
end
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
Yeah! I know about Tsukihime 's script alredy (Sorry for not mentioning that in the first post). But I'ma actually looking for a script thant makes what Tsukihime 's script do but in every battle. What I do not want is be forced to add a direct call to the common event every time that I add a battle in the game.
In other words I want a way to automatize that.
 

Argami

Veteran
Veteran
Joined
Jun 22, 2012
Messages
130
Reaction score
10
First Language
Spanish
Primarily Uses
This will call a common event for every battle processing via event
Code:
class Game_Interpreter
  alias cmd_301 command_301
  def command_301
    param_0 = @params[0]
    @params[0] = 10 # <--- Common event ID
    command_117
    @params[0] = param_0
    cmd_301
  end
end

Thank you @TheoAllen ! It is just what I was looking for! I will used for sure :)

(Sorry for double posting)
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,318
Reaction score
7,851
First Language
Indonesian
Primarily Uses
RMVXA
No prob. I use a lot of little snippet myself for QoL purpose in developing :)
 

Latest Threads

Latest Posts

Latest Profile Posts

Anyone going to talk about Chris Pratt Mario?
My friend just gave me chocolate milk at lunch today! My day is now 1000x better. Yay, choco milky!! :kaojoy:
RivalRamen_Games wrote on jacobv1014's profile.
I really like your profile picture! Who is that in it? is she an OC?
Making his first game

Forum statistics

Threads
115,331
Messages
1,089,069
Members
149,999
Latest member
Nasciturus
Top