Disable Battle Start SE?

You know how in the system for when the project is first created it has a default SE for when a random encounter occurs?

For certain boss fights and special encounters I need that SE to be disabled so that it doesn't disrupt another SE that plays. Now it could be possible that a script is totally unnecessary but if one is needed, it would be greatly appreciated
Set the "Battle Start" sound to "(None)". That "(None)" is the very first option.
That would affect ALL encounters though, wouldn't it? I don't recall a command to turn that SE on and off within the list of event commands. You could probably change it with a script call
That would affect ALL encounters though, wouldn't it? I don't recall a command to turn that SE on and off within the list of event commands. You could probably change it with a script call
Ah, it would. I didn't see this part...
For certain boss fights and special encounters
:blush:

EDIT: maybe look through this.
https://forums.rpgmakerweb.com/index.php?threads/script-call-collection-for-vxace.25759/
Or here maybe?
https://forums.rpgmakerweb.com/index.php?threads/script-call-equivalent-of-events.6248/
The first link would be more helpful.
Battle start would be
Code:
$data_system.battle.bgm.name = "Battle1"
and battle end should be
Code:
$data_system.battle_end.me.name = "Victory2"
You can try this snippet:
Spoiler
Code:
class << Sound

  alias change_bgm_start8826 play_battle_start
  def play_battle_start
    if $game_variables[222].is_a?(Array)
      RPG::SE.new(*$game_variables[222]).play
    else
      change_bgm_start8826
    end
  end

end
With this, you can change the played sound effect when a battle start during the game.
You can set Variable 222 to an array to change the battle start SE.
You can do that with a script call before the battle processing event command:
Code:
$game_variables[222] = ["My epic battle start SE",80,100]
The elements in the array must be the filename, volume and pitch settings.
If you set that variable to anything else than an array, you will reset the change and start to use the default battle start SE again (from the engine's database settings).
You can also set the filename to an empty string to disable the SE if that's what you need, or you can even set the volume to 0 for the same effect.

Obviously, you can use another variable, just change the 222 to the ID of the variable you want to use.
Ah, it would. I didn't see this part...

:blush:

EDIT: maybe look through this.
https://forums.rpgmakerweb.com/index.php?threads/script-call-collection-for-vxace.25759/
Or here maybe?
https://forums.rpgmakerweb.com/index.php?threads/script-call-equivalent-of-events.6248/
The first link would be more helpful.
That just might also help in lots of other things
Thank you everyone who commented
Battle start would be
Code:
$data_system.battle.bgm.name = "Battle1"
and battle end should be
Code:
$data_system.battle_end.me.name = "Victory2"
by any chance is there a way so that I can declare it so that no SE plays? You have Battle1 in between the quotes so what should I put between them to have no SE?
Ohh, I missed @Roninator2's post.
You made some errors in those variable names, they should be:
Code:
$data_system.battle_bgm.name
$data_system.battle_end_me.name
But these variables (including all $data_object variables) should not be changed during runtime at all.
They are variables, that's true, but they act more like constants, because they are loaded only once on game startup and never again, and they are not saved in the savefiles either.

You can change them if you really want, but you will have to be extra careful with that, since if you forget to change it back or forget that the player can do something that skips your variable change triggers, than these variables will stay how they are until the player closes the game and reopens it again, or until he bumps into another variable changing event after he start a new game or loads a savefile.

And... probably the most important thing for the topic at hand... Those are the battle BGM and battle end ME sound settings, not the battle start SE setting, so it's not exactly what has been asked for. 😀

You can still try my snippet. Just put it below the default scripts, and use that script call to change that SE during the game anytime you want.
To play no SE, simply set the filename to an empty string which would look like this: "" , so 2 quotation marks right next to each other.
Code:
$data_system.battle_bgm.name
$data_system.battle_end_me.name
This is true, but the code I used is for the airship
Code:
$data_system.airship.bgm.name = "Theme2"
and this works. So I thought is would be the same for the battle music.
But now I see in Game_System the lines you mention. @Sixth
Ohh, I missed @Roninator2's post.
You made some errors in those variable names, they should be:
Code:
$data_system.battle_bgm.name
$data_system.battle_end_me.name
But these variables (including all $data_object variables) should not be changed during runtime at all.
They are variables, that's true, but they act more like constants, because they are loaded only once on game startup and never again, and they are not saved in the savefiles either.

You can change them if you really want, but you will have to be extra careful with that, since if you forget to change it back or forget that the player can do something that skips your variable change triggers, than these variables will stay how they are until the player closes the game and reopens it again, or until he bumps into another variable changing event after he start a new game or loads a savefile.

And... probably the most important thing for the topic at hand... Those are the battle BGM and battle end ME sound settings, not the battle start SE setting, so it's not exactly what has been asked for. 😀

You can still try my snippet. Just put it below the default scripts, and use that script call to change that SE during the game anytime you want.
To play no SE, simply set the filename to an empty string which would look like this: "" , so 2 quotation marks right next to each other.

So I've tried your snippit but when I set it to have no SE play, the battle BGM doesn't play as well. I can't seem to figure it out
If you mean that you tried my snippet from my first post here, I made a mistake in it and made it play a BGM instead of the SE, but I corrected that when I noticed it.
Check if it writes RPG::BGM or RPG::SE in the one you got, the RPG::SE is the correct one.

If you mean those one liners I wrote in that post you quoted, than that is no surprise, because those will set the battle BGM and the ME played at the end of the battle, not the battle start SE.
If you mean that you tried my snippet from my first post here, I made a mistake in it and made it play a BGM instead of the SE, but I corrected that when I noticed it.
Check if it writes RPG::BGM or RPG::SE in the one you got, the RPG::SE is the correct one.

If you mean those one liners I wrote in that post you quoted, than that is no surprise, because those will set the battle BGM and the ME played at the end of the battle, not the battle start SE.
Thanks for that. It works perfectly now.

Original thread: https://forums.rpgmakerweb.com/threads/disable-battle-start-se.92669/