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,281
Reaction score
8,362
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,244
Reaction score
7,628
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,244
Reaction score
7,628
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

I had one goal when I set out to make my Game Jam game. It didn't have to be super good and the game didn't have to have the best writing - it just had to NOT CRASH.

So yeah, someone was streaming it and it crashed.
Add Special Effects on Map with Tilesets | RPG Maker News #105

Come, join Move That Box! DISCORD!
Excited to see all the entries for the 2021 Touch the Stars Gamejam.
just finished playing one shot. im kinda disappointed with return the sun ending ngl. i was hoping there would be some after credits scene that would play with my emotions

Forum statistics

Threads
113,560
Messages
1,075,832
Members
147,556
Latest member
rozmirp
Top