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,724
Reaction score
8,508
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,852
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,852
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


1,Randomly generate events with planted spawner events(great flexibility for customization and auto-match player's level)
2,Randomly enter roguelike dungeon
3,Player can exit dungeon or back to town or choose to challenge BOSS at the end of each dungeon
4,Dungeon maps can be randomly generated by a third-party tool
Got locked out of the house yesterday... best friends who had the spare ghosted me. Locksmith had to literally drill thru the lock bc they couldn't pick it. Whole process took 4 hours and far too much money. And they have to come back next week bc they don't have the right cylinder, cause it's an old interlocking lock. I'm livid lol
 I’m probably going to regret this, but I need kobolds for my project and I’ve decided to sprite them myself. This is Attempt #1, front view only.

KoboldFront.gif
It's a shame that Selection Control will not be ported to MZ. I found a neat way of using it to enable ways for tanks to protect squishies. lol
Lately I have been taking a break from game and resource making so I won't get burnt out. But I am also interested in the Game Jams this site periodically holds. It'd be great if I knew when the next one, if any, is planned.

Forum statistics

Threads
115,354
Messages
1,089,222
Members
150,029
Latest member
Cwiras
Top