Victory BGM

In search for a script that replaces the victory ME to a BGM but also has a switch

that can disable the BGM if I choose not to play it.

The problem with ME is it only plays once and I set my Fanfare to be short but I added loop tags onto

the track so it will loop. It only loops if being played in the BGM sound bank.

I tried using

http://himeworks.wordpress.com/2013/07/01/disable-victory-music/

And adding this line

Audio.bgm_play('Audio/BGM/Fanfare', 100, 100)

But no luck by that. Because the battle BGM wants to play but the Fanfare wants to play.

So what happens is the Fanfare tries to play but gets cut off then the Battle BGM fades in

again. This is not what I had in mind.

Any Help is appreciated. And if there is a way to do this without the need of a script that's fine too.
Always remember that if you're using Yanfly's Victory Aftermath to set your Victory ME to None or else you get weird issues.  Also, refer to my post here for some additional info.  Hope this helps!
Oh Im not using victory aftermath It was a simple script by Tsukihime

That had a switch to disable the victory ME.

Thanks for the Info though!
Oopsy, my bad.  I see "victory" in any script link and instinctively think it's from Yanfly's Victory Aftermath.  Yeah, your best bet is set your Victory ME to None anyway if you're disabling that.
I tried that as well in the database

and then I put RPG:ME.stop

in the script too but no luck with that either.
Can you please link or paste Tsukihime's script?  I might be able to better help you if I can see it.
If your talking about the default link that's the one I posted. haha
Right, sorry.  Derping.  I'm working on some XP music, so I'm not really 100% in here.  Will look at the script and let you know what I come up with.

EDIT:

Okay, are you testing this in an actual test play or just in a battle test play?  If in battle, it won't read that the switch is on, so it won't disable the music properly.  If in a pull play test, it seems like either the switch isn't on (be sure to check the switches you've toggled in any events and the switch ID in the script) or that the script is conflicting with something else.  Have you tried it in a fresh project?
I was using this inside the actual game. 

And yes I did this in a fresh project just to be safe.
I'm picking apart Yanfly's Victory Aftermath script to only give you what you need, so credit him for this:

Code:
## Yanfly Victory Aftermath (Music Only)# Edit by djDarkX#module YEA  module VICTORY_AFTERMATH    VICTORY_BGM  = RPG::BGM.new("Name", 100, 100)    # Victory BGM	SKIP_MUSIC_SWITCH      = 0  # If switch on, skip music. 0 to disable.  end #VICTORY_AFTERMATHend #YEA#==============================================================================# ¦ Switch#==============================================================================module Switch    #--------------------------------------------------------------------------  # self.skip_aftermath_music  #--------------------------------------------------------------------------  def self.skip_aftermath_music    return false if YEA::VICTORY_AFTERMATH::SKIP_MUSIC_SWITCH <=0    return $game_switches[YEA::VICTORY_AFTERMATH::SKIP_MUSIC_SWITCH]  end    end # Switch#==============================================================================# ¦ BattleManager#==============================================================================module BattleManager    #--------------------------------------------------------------------------  # overwrite method: Victory Processing  #--------------------------------------------------------------------------  def self.process_victory    play_battle_end_me    $game_message.add(sprintf(Vocab::Victory, $game_party.name))    display_exp    gain_gold    gain_drop_items    gain_exp	RPG::BGM.fade(1000)    SceneManager.return	replay_bgm_and_bgs    battle_end(0)    return true  end    #--------------------------------------------------------------------------  # overwrite method: self.play_battle_end_me  #--------------------------------------------------------------------------  def self.play_battle_end_me    return if Switch.skip_aftermath_music    $game_system.battle_end_me.play    YEA::VICTORY_AFTERMATH::VICTORY_BGM.play  end end
Very very close

It works perfect until you return to the map then it fades in the map BGM.

Edit: Oh Nevermind I didn't bother to scroll through the script to see there was a fade switch. haha Thank you!
You're very welcome.  Glad to be of assistance!
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/victory-bgm.18940/