Hello, this is the method that call the title music:
Code:
Scene_Title.prototype.playTitleMusic = function() {
AudioManager.playBgm($dataSystem.titleBgm);
AudioManager.stopBgs();
AudioManager.stopMe();
};
You could edit the method and copy it in any plugin you have (or make it a plugin on its own):
Code:
Scene_Title.prototype.playTitleMusic = function() {
const baseMusic = $dataSystem.titleBgm // title music from data base
const secondMusic = {name: 'music name', volume: 100, pitch: 100, pan: 0}
const currentMusic = $gameSwitches.value(x) ? secondMusic : baseMusic;
AudioManager.playBgm(currentMusic);
AudioManager.stopBgs();
AudioManager.stopMe();
};
Once switch X is ON, the tilte music will be secondMusic (replace 'music name' by the actual name of the bgm and set the volume, pitch, pan as you like)
This is to change the music once in the game, but the same process could be use with a variable to select from several different musics...
*EDIT: hum... come to think of it. That probably wouldn't work cause it use a game switch in the Title Scene. I'll come back with something else later, unless someone else suggest something.
**EDIT: I made a plugin:
TSR_TitleMusic
Regards