Play BGM instead of ME at a battle victory

Hello


I am looking for a script that would play a looping BGM when your party finishes a battle, rather than an ME.  It have to override the setting in the database and instead play a BGM specified in the script.  I have some knowledge of scripting, so I would be able to go into the script to specify the BGM.  Thanks in advance!
Well, BattleManager line 71 is what you want to look at.  However, the call to play_battle_end_me is followed immediately by the call to replay_bgm_and_bgs, so as soon as your battle end bgm started playing, it'd be stopped again so the map bgm can take over.


You might need to alter the process_victory method beginning on line 202, and move the replay_bgm_and_bgs call to just before SceneManager.return, to give the battle end bgm a bit of a chance to be heard.


The replacement you need for $game_system.battle_end_me.play would be something like Audio.bgm_play(filename) - I'm not sure if the path to Audio/BGM needs to be included - I'd try it without first.  There are also optional parameters for volume, pitch and pos, in that order.  Check Audio in the help file.
Thank you, that worked perfectly!  And FYI, the path to Audio/BGM does need to be included.

Original thread: https://forums.rpgmakerweb.com/threads/play-bgm-instead-of-me-at-a-battle-victory.61572/