RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
How to make battle BGM start before the actual battle does.

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 86
Okay...  I'm making a risk by posting this, since I don't know if it's in the right place or not...  it's not a request or anything, and it BARELY qualifies as scripting.  But after searching the site for a while I've never been able to find an answer, and after tentatively poking around with the scripting, I may have found my own.  However, in advance, sorry if this is already done or if I'm indeed posting this in the wrong place... >_<

I've seen asked a few times how to make it so that the battle music and the field music is and stays the same when you enter the battle, without that music starting over from the beginning and sounding bad.  So, for example, the bad guy says "It's time for you to die," and the battle music starts playing.  Then the player presses "Enter" and whatever events trigger up to Enemy Encounter, THEN the scene transitions into the battle mode, with the battle music still playing.  A lot of professionally developed games do this, a lot of people have asked how to do this, I've never seen an answer, and think I've found.  Or another example, the party is fighting one large battle against several enemies and the battle music keeps playing after each battle so events can have another wave of enemies approach the party before entering the next battle.

However, it might not qualify as a "script" since I didn't actually add anything.  All I did was remove one line, and it seems to work perfectly, with only a few limitations.

All I've done to make it work is, in the Script Editor, go to Scene_Map and scroll down to line 168.  Written there should be:

Code: [Select]
$game_system.bgm_stop

Deleting this line should be all it takes.  Then, if the Map BGM is the same as the Battle BGM, the music will not be interrupted and restarted.  Plus, if the Map BGM is different from the Battle BGM, the map music will still stop and the battle music will still start.  Much like in changing between maps, it's not limited by volume.  It won't fade louder or quieter attractively, but it still won't start over.

Limitations:

If the music is meant to change to the battle music like a normal encounter with this system, the Map music will stop playing very slightly later than it previously would.  Specifically, the last note of .mid file plays at the same time that the transition music starts.  Overall it's only barely noticable and shouldn't be a real problem.

However, the big limitation is that there's no easy way to change the field music back to what it should be when you win the battle.  If you use Play BGM in an event right after the Enemy Encounter button, whatever music will play when you exit the battle, but if you doddle after the ME victory tune plays and don't exit the battle, the battle music will fade back in.  I can only think of one workaround, and that's to keep the battle music going and fade it out with events after the battle, perhaps with the enemy going "Ugh no way" or whatever.  You should probably before the battle turn the victory ME effect, too.  However, some scenarios lose its artistic and/or dramatic strength if you have the music fade out after the battle is over, even if you the bad guy just disappaers without doing any action anyway.



Other than that, though, I don't see anything wrong with it.  Hopefully (repeats most of the first paragraph).
-- Ashtoro

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
This isn't really a script, but I'll throw it in the database because it's useful.

********
Shadow Knight
Rep:
Level 91
Ruin that brick wall!
Project of the Month winner for October 2008
Be kind, everyone you meet is fighting a hard battle.