MZ Plugin that lets you change between soundtrack versions like Final Fantasy Pixel Remasters

Hey there,

Some months ago, I wrote synth music with live drums with the idea it would be used in my 2nd game. I have since converted it to 8-bit and am currently using the 8-bit versions as the music in my game. However, I would also like to have the synth with live drums music in my game, and let the player choose which soundtrack (8-bit or synth) is being used. The Final Fantasy Pixel Remasters do this, you can choose the original system's soundtracks, or the modern live instrument ones.

Is there a way to do this in RPG Maker MZ?
The basic idea is you want a switch between 8-bit soundtrack or Synth soundtrack. For most maps you could do it pretty easily with a switch or switches, but for the combat, that would require a plugin.

There are a couple other options, but you might need to get creative with them. They were designed more for jukebox options.
If you're feeling that you want it to be exactly how you want it then this is the Mozilla link on how to play audio with HTML5 + JS. You would just want to add a variable to control your soundtrack selection. There is also a post on how to make plugins here.

Maybe someone else on the forums might have an easier idea than me?
Hey, thanks for the advice. I have no problem paying for a plugin if it is the easiest way to go. So, I am looking at this one:

https://heroicjay.itch.io/soundtrack-manager-for-rpg-maker-mv.

From looking at it, I don't see anything specifically about letting the player choose which soundtrack to use. Do you have experience with this plugin? Ideally they'd be able to change the soundtrack at will, but I guess if I had to, I could do a dialogue option at the start where they choose the soundtrack, and then it just uses the specific soundtrack from there, if there's a way to configure the plugin to do it that way.
Good news: I found something.

Bad news: No idea if it works, considering this would've been made for MV based on the year of the post, as MZ didn't release until 2020.

Hopefully it'll function, but be prepared to wait on someone to make one specifically for MZ. Maybe even consider commissioning it.
Hey, thanks for the link! I loaded it up in MZ, it at least looks like it works enough to open the parameters. It looks like it might need you to set up a custom script to work as intended though, looking at the first post in that topic, I think the OP had something specific in mind and just needed help with an extra step. I looked at the plugin parameters and it isn't something I'd be able to figure out on my own. I will debate commissioning, I am trying to keep the budget for my games low since I don't really expect to ever turn a profit on them.
Hey, thanks for the link! I loaded it up in MZ, it at least looks like it works enough to open the parameters. It looks like it might need you to set up a custom script to work as intended though, looking at the first post in that topic, I think the OP had something specific in mind and just needed help with an extra step. I looked at the plugin parameters and it isn't something I'd be able to figure out on my own. I will debate commissioning, I am trying to keep the budget for my games low since I don't really expect to ever turn a profit on them.
From what I saw, you just need to name your tracks in a way that allows you to easily differentiate between them, but I don't have time to go over it right now. Maybe someone else can help advise you.
It looks like you still need to set some sort of script up to tell which OST is being used. I did take a quick look, so might've missed something, but to me it looks like it doesn't really have instructions.

I am trying that Soundtrack Manager plugin. So far I have it working to select a soundtrack at the start of the game and play the appropriate music after. But the main problem I'm having right now is it seems to block music effects from playing. ie. I have recovery statues that play a jingle when you use them. With default sound engine, the current music fades out, jingle plays, music fades back in. With the plugin, the ie. overworld will just keep playing and the jingle never happens. Battle victory music also doesn't play.

I am checking if the plugin author can help me, but it might be beyond the scope of his plugin. If so I can try posting in the forum for hiring someone, but it might be too much work for what I'd be willing to pay, and I don't want anyone to feel insulted.
It looks like you still need to set some sort of script up to tell which OST is being used. I did take a quick look, so might've missed something, but to me it looks like it doesn't really have instructions.
1757060257931.png

I tried it and thats quite literally it. you pick a switch to toggle with and you have two versions of your music files where one has the suffix in the name and the other does not. you dont need any script at all

I am trying that Soundtrack Manager plugin. So far I have it working to select a soundtrack at the start of the game and play the appropriate music after. But the main problem I'm having right now is it seems to block music effects from playing
i own and use the plugin and never had that issue. did you try it without any other plugin enabled?

EDIT: didnt realize youre using MZ. i dont think the audio code between MZ and MV differs at all, but it might be a reason. Id have to test it

EDIT2: yeah, theres a missing referenced object and function in the soundtrack swapper. its an easy fix (and FOSSIL probably takes care of it), but the issue should have been the game crashing on boot, not the plugin failing to load tracks.
Robro33: EDIT2: yeah, theres a missing referenced object and function in the soundtrack swapper. its an easy fix (and FOSSIL probably takes care of it), but the issue should have been the game crashing on boot, not the plugin failing to load tracks.
Can you elaborate on the missing referenced object and function? I've seen behaviors similar to what OP is describing in other audio plugins ported up to MZ that fail to update after performing their first BGM or BGS music/sound instruction call.
Can you elaborate on the missing referenced object and function? I've seen behaviors similar to what OP is describing in other audio plugins ported up to MZ that fail to update after performing their first BGM or BGS music/sound instruction call.
in this one, Decrypter and AudioManager.shouldUseHtml5Audio() specifically. they exist in MV but seemingly not in MZ. not sure if FOSSIL covers it, but removing all references to them from the plugin made them work as expected.
I am using FOSSIL, needed it for some other plugins I'm using.

I am trying to figure out Sakuya's since if it works it might be way less clicking. I figured out how to delete those lines from the plugin, I am not a coder, but it would give me errors and I'd delete more stuff based on the errors... then it was at least not giving me errors about the plugin loading. But now, it is failing to load the sound effects. Here is the error I get now:

Failed to load
audio/se/James%20Cu.ogg

The actual filename of what it's trying to load is probably James Cursor.ogg.

And, before we go any further, do either of these plugins (Sakuya's or Soundtrack Manager) also let you change music effects based on the switch? Or is it purely BGM? If it is purely BGM, I think I would still have to try and get a commission then.
Failed to load
audio/se/James%20Cu.ogg
Try changing the file's name so that it doesnt have a space. Its possible for the game to be unable to find files if the name contains characters that arent HTML compliant.

change music effects based on the switch? Or is it purely BGM?
Neither Sakuya's plugin description nor help file says it, but it affects BGM, SEs and MEs. not just BGM


I figured out how to delete those lines from the plugin, I am not a coder, but it would give me errors and I'd delete more stuff based on the errors... then it was at least not giving me errors about the plugin loading
Just to be sure, did the game start before you made any changes to the plugin file? your original issue sounded like the plugin wasnt doing anything. mine was itd crash on start because i didnt use FOSSIL and assumed you didnt either
To the 3rd one, the game wasn't starting, it would give me an error about the HTML audio. That was with FOSSIL on. I didn't try with it off.

After removing spaces, I have the switch working for choosing what soundtrack to use.

New problem: When I do a regular attack command, it gives me this error:

GET chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/audio/se/custom%20animation%20sounds%2FJames%20Physical%20Attack.ogg net::ERR_FILE_NOT_FOUND

I don't have that file anymore, as I renamed all the animation sound effects to not have spaces, then went and redid all the animations to point at the appropriate new sound file. However, it seems the regular attack command is still trying to look at one in spaces. In the System 1 tab, I don't have it pointing at anything with spaces for sound effects. Is there some other way to change what sound file the normal attack command looks for?

After figuring this out, I should be pretty much set!
In the System 1 tab, I don't have it pointing at anything with spaces for sound effects
double check your plugins and see if any have a parameter for a sound effect. outside of the animations tab and the system tab i dont think anything else set sound effects
So I literally *just* figured it out. I think that "custom animation sounds" folder is one I made manually. I realized I still had spaces in that, but removing them didn't fix it. It seems it doesn't like looking in non-standard folders, like if it isn't one RPG Maker MZ made, it will have an error. So I moved the sound to the base sound effects folder, renamed them to make them obvious to me that they're animation sounds, repointed everything, and now it seems to be working fine.

EDIT: Oh, so what I did to have the switch turn on, was I have an option at the start of the game where you choose 8-bit or synth. And choosing synth for me turns on the switch. I might do something to let players change it during the game, but I don't think I can add it to the options, since I'm using VisuStella options. Maybe my recovery statues will get some kind of event for choosing recovery or changing OST. Thanks for the help! Will post back if I run into more problems lol
I don't think I can add it to the options, since I'm using VisuStella options
Visustella's option plugin has parameters to set up new options. Ive never used the plugin, but its in the documentation for it
K, I'll try to remember to take a look at that when I get more time. Right now I am trying to squeeze in even working on this lol.

So, I am getting a new error. It is playing the overworld music fine, but after combat, it looks like it is looking for the .ogg file to have the suffix (I have it as _synth) twice for some reason:

chrome-extension://njgcanhfjdabfmnlmpmdedalocpafnhl/audio/bgm/TotheSummit(Overworld)8-bit_synth_synth.ogg net::ERR_FILE_NOT_FOUND

If I make a new file with _synth_synth at the end, next time at the end of the battle, it is looking for the same file with for suffixes - so _synth_synth_synth_synth.
are you doing anything that regularly sets the map theme?
it would make sense for the plugin look for the name + another suffix on each call if the map theme was being set to the old one each time, but that shouldnt happen normally
The map theme is set to the 8bit version through the map properties accessed from the menu in the lower-left of the screen, with the switch changing it to the synth version if turned on. So maybe every time it loads the map after battle, it is trying to go back to 8bit initially, then seeing the switch is on and throwing another _synth on the expected file? The thing is, the way the music normally works without the plugin, I think it picks up the map theme from where it was before the battle started, so I don't know if it is trying to revert to the map music setting after battle... but could be. I am not sure what a fix might be though.
Hmmm, isn't the problem that it plays the battle music 2 times, second time it tries to play bgm+suffix+suffix. Not 100% sure, because I only skimmed this, but I had a similar problem when I tried to do something months ago.

Scene_Map.prototype.updateEncounterEffect
Scene_Battle.prototype.start

EDIT: Oh whoops, I read it wrong, you got the error when returning from battle, LOL

Original thread: https://forums.rpgmakerweb.com/threads/plugin-that-lets-you-change-between-soundtrack-versions-like-final-fantasy-pixel-remasters.179933/