Map to Ship Music

Hi everyone,

I have a small problem with a ship in my project. I have a BGM music piece playing on the main map, and when I enter a ship, the ship music does not start, the BGM map music piece just stops for a moment, and then starts again.

I was looking around for a plugin that would let me have some more options when boarding a boat or ship, like manually shutting off the map music and starting the boat music, but I could not find any...

Any help would be greatly appreciated!

Fasold
Spoiler: javascript
PHP:
/*:
 *
 *
 * @plugindesc Continue music from map to map by one switch.
 * @author Jake Jilg "Mogwai"
 *
 * @param GameSwitch
 * @desc The switch to disable music stop by being on.
 * Default: 1
 * @default 1
 *
 */
var continualParam = PluginManager.parameters('ContinualMusic') || {};
continualParam.isGameContinue = false;
continualParam.isMusicToPlay = false;
continualParam.ifContinueMusic = function(){
   var gameSwitch = $gameSwitches.value(continualParam.GameSwitch);
   return !gameSwitch;
}
// aliased managars v
BattleManager.playBattleOrig = BattleManager.playBattle;
BattleManager.playBattle = function() {
   if(continualParam.ifContinueMusic())
      return this.playBattleOrig.apply(this, arguments);
};
AudioManager.replayBgmOrig = AudioManager.replayBgm;
AudioManager.replayBgm = function() {
   if(continualParam.ifContinueMusic())
       return this.replayBgmOrig.apply(this,arguments);
};
AudioManager.stopBgmOrig = AudioManager.stopBgm
AudioManager.stopBgm = function() {
   if(continualParam.ifContinueMusic())
       return this.stopBgmOrig.apply(this,arguments);
};
AudioManager.fadeOutBgmOrig = AudioManager.fadeOutBgm;
AudioManager.fadeOutBgm = function() {
   if(continualParam.ifContinueMusic())
       return this.fadeOutBgmOrig.apply(this,arguments);
};
AudioManager.playBgmOrig = AudioManager.playBgm;
AudioManager.playBgm = function() {
   if(continualParam.ifContinueMusic())
       return this.playBgmOrig.apply(this, arguments);
};
Here is a plugin. Set the parameter to any switch number. When that switch is on, all music spill over from the previous map, battles, etc. It will override any autoplay music. When the switch you designate is off, music will resume.

At first I thought this script was pointless, but music only continues when it's the same music which probably isn't the case with your boat...

EDIT: Forgot to mention name the plugin ContinualMusic.js or the parameter won't work. I'm not good with plugins...
Thanks very much! I'll try it at once!

Original thread: https://forums.rpgmakerweb.com/threads/map-to-ship-music.75483/