Anybody know how to change the BGM and BGS on battle ?
How to change BGM and BGS ?
RPG Maker MZ Supportduring or before battle?
if before in an evented battle, simply use the commands in the event before battleprocessing.
during battle is not as simple as it requires a script command to force the battleengine to update the music.
if before in an evented battle, simply use the commands in the event before battleprocessing.
during battle is not as simple as it requires a script command to force the battleengine to update the music.
During battle, I want to each troops have different bgm i choose, if possible
I think you either misunderstood or are using the wrong terms.
During battle always means during a single troop. different troops are always different battles.
so do you want to give each enemy inside a single troop a different BGM?
Because if you want the BGM to be troop-based you could easily change it before the battle if using evented battles, and a bit less easy for random battles.
During battle always means during a single troop. different troops are always different battles.
so do you want to give each enemy inside a single troop a different BGM?
Because if you want the BGM to be troop-based you could easily change it before the battle if using evented battles, and a bit less easy for random battles.
Yeah, sorry my english are bad :b
I've tried using evented battles and it works :b
And also i want to make a different BGM for different troops at random encounter on map,
For example :
Goblin*2 : bgm battle 2
Crow*2 : bgm battle 7
Crow*2 : bgm scene 4
So each troops have their own BGM, is that possible ?
yes, but not as easy as the evented method.
using the event command to change the BGM is actually updating the map property for it, that is why it usually needs to be done before the battle.
however there is one script command that forces the battlescreen to update its music with that infor, and that is the command needed to do this for random battles.
unfortunately I don't know it for MZ because I never worked with MZ.
I know this has been asked before and the answer should be in a topic somewhere here on the forum.
you either have to search this or wait until someone from MZ puts the correct command here.
basically you use the change BGM event command in a troop event conditioned to run on turn 0, followed by that script command in the same event.
Unfortunately that really doesn't work either... no matter what I tried the page events don't run until after the battle technically starts (like after moving past the "enemy emerges" text.
I was able to get the bgm to change but only after the battle started.. so that was no good since there was always a delay.
...that being said though I did now create a plugin to handle this. 😉
Sooo fear not I created a plugin to do exactly as you need. Music starts as soon as the battle starts just like it should & returns normally back to last played bgm after battle.
Here ya go:
It's setup like this:
The very important note I must mention is that this comment does have to be placed no matter what on page 1, it won't work otherwise. I just didn't code it to work on any other pages (yet at least)
Place the following comment on page #1 of the troops you want to play a custom bgm:
JavaScript:
<bgm: {name: 'Battle7', volume: 90, pitch: 100, pan: 0}/>
Well there ya go. Should work nicely. All works well for me from my brief tests.
[RMMZ] Troop Battle Music by CT_Bolt
ct-bolt.itch.io
Let me know how it goes for ya 🙂
Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-bgm-and-bgs.151349/