MV is there a way to mass override autoplay map bgm?

hi!

i've made use of autoplay BGM on my maps like most have. but toward the end of my game, in the epilogue, i'd really like for an epilogue track to play across all maps, a la earthbound's "because i love you".

is there a plugin for this? a script i can use to play a track and have it ignore all autoplay bgms?

thanks! i can elaborate more if need be!
Yeah put as plugin (copy paste to notepad, save as .js and add as plugin). Then you can use a switch (change X to id) to control when you want to override the autoplay functionality:

Game_Map.prototype.autoplay = function() {
if ($dataMap.autoplayBgm && !$gameSwitches.value(X)) {
if ($gamePlayer.isInVehicle()) {
$gameSystem.saveWalkingBgm2();
} else {
AudioManager.playBgm($dataMap.bgm);
}
}
if ($dataMap.autoplayBgs) {
AudioManager.playBgs($dataMap.bgs);
}
};
amazing, thank you! works perfectly!!

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-mass-override-autoplay-map-bgm.183163/