Battle Music will not play.

In my current project when you exit the first town back into an area where enemies are present upon encountering enemies the battle music will not play. Instead it uses the BGM I set for the area, and after I win the battle the victory fanfare replaces the BGM. This only happens after I exit a town, If I transfer between areas that have enemies the music works correctly.

I'm using these scripts:

Yanfly Message System

Yanfly Skill Restrictions

Khas Awesome Lights

Neon Black's Battle System

Neon Black's Battle Aftermath Screen

Neon Black's Battle popups

Neon Black's Scan Enemy

MOG Weather Effects

Tsukihime Multiple Elements

Since I've disabled all the scripts and tried, with the problem persisting I may have done something wrong in the editor. Here are the map screens for each area.

SC4.PNG

SC3.PNG

I've never had the issue before, all help is appreciated! Thanks.
Actually, I have this issue, but for boss battles, otherwise using random battle music. It is a similar issue, but not exactly the same. I can likely solve yours though.


On the aftermath script, there is a bit of the script that says 'play victory fanfare at end of battle?' - turn this to false.


I didn't notice this at first 😛
That solved the problem with the fanfare playing after I exit but the battle music still doesn't play.
And that is the issue I have, except it won't play boss music. Because I set the boss music to be the basic song (and the random music still works) I suspect it is the same script being the issue. Maybe contact the developer?
Cannot reproduce. This occurs in a new project?
Not a new project I've been working on it for a few months now, it just started happening yesterday.
Well, the idea is that if this occurs in a new project, then it's either an issue with how you set it up (because you wouldn't have touched any scripts then), or it's a bug in the default scripts. However, since I am unable to reproduce it with a "similar" setup (having BGM/BGS defined for each map), it is probably not a bug in the default scripts.


If the same setup doesn't have the issue in a new project, then you likely modified something and don't remember.
I think I've isolated where the problem occurs. I started a new playthrough and everything worked fine up until I triggered this event chain:

SC5.PNG

SC6.PNG

I don't know what would cause it in this event though.
So if you delete that event (or prevent it from running), everything works?


If you turn on that switch, things still work?


If you only transfer to the other map, things still work?


It's not clear which part of the event is executing.
So, I executed the event in all four possible ways, but without the switch turning on and everything worked. So it was something with that switch.
Guess you'll be in for a lot of debugging.


I don't understand the problem since it doesn't make sense to me for the victory music to be playing AFTER the battle is over and you're on the map, cause that would only happen if you explicitly changed the BGM yourself.


You might as well just create a new project and copy some maps over and see if that causes it. Common events could be the problem, auto-run/parallel events relying on that switch, etc.
The only event relying on the switch was the next story event, which triggers when you exit the building. I changed the switch to the next open one and everything is running smoothly. I have no common events at the moment, so those are not the problem. And by victory music playing after the battle I meant that it played during the EXP/Items awarded screen and continued after I exited, but that part was fixed.
Actually, I can also verify it is a switch issue. Yes, it also occurs after switch 5 is turned on.


EDIT: Found the problem!!


# This is the switch used to skip all change in music during a battle. The #


# victory screen will still show, but the music will not change when starting #


# or ending the battle while this switch is on. #


SKIP_SWITCH = 5 # Default = 5
So it was a script issue. That fixes that issue.
Updated post above yours with the fix 🙂

Original thread: https://forums.rpgmakerweb.com/threads/battle-music-will-not-play.21877/