Battle processing event music doesn't end?

This just started happening, and I have no idea why. I have a battle processing events and now for some reason the battle bgm won't end when the event ends. I don't have anything in the troops tab to change the bgm btw. I just use the system default "Battle 1" right now. Below is the event. I have it set to erase event so that it Disappears when you defeat it, but will "respawn" if you leave the area and come back. View attachment 92196

Edit: I started a new game and it was still screwed up. But then I exited the entire RPG maker software, re-opened it and the problem was gone when i created a second new game. So, idk I guess it was just some sort of bug.

Edit 2: Ok so I figured out what is causing it, but not how to fix it. When I interact with an event, which starts a quest. (pictures below) It happens, but if I don't start the quest it's fine. I don't know if it's Colos himself that causes the bug, or maybe the switch, "Colos Quest Started" that causes it." The 5th tab was empty with the condition if self switch C is on, not sure why it was there, since there was nothing to turn the switch on. So I deleted it so there is only the 4 event pages below.
colos1.PNG
colos 2.PNG
colos3.PNG
colos4.PNG

The "No color" switch is turned on at the start of the game, and is turned off after a certain point, in which I don't want the quest to be available anymore, which is why the first page is blank.

Edit 3: I copied the event and edited a portion, tested it, rinse and repeat, and I found that added Colos to your party is what triggers it. Not anything to do with the "Colos Quest Switch."

Edit 4: I GOT IT, ok so when I added colos to the party he wasn't initialized. Although I'm not sure as to why this would affect the battle bgm. And it raises another question: What happens if I want a character to leave the party and them come back with all of his levels in tact? Will the same thing happen with the bgm?

Edit 5: Wow this has become a huge wall of text, but once I added the colos quest switch back into the event, it happened again. After going through another testing process I'm sure that adding the actor is the problem, ( I know this because I created an event that just adds colos to the party) but there isn't anything abnormal about him so I don't know why it would have this strange effect.

Edit 6: Ok, so I decided to see if colos was the problem by creating an event that adds a different actor the party, I used the default "Brenda" and it happened. I tried it again this time adding "Natalie" also, with identical results. So for some reason the glitch occurs when there are two or more people in the party.
I don't know if it is just me but I am not able to see your page 3 and I cannot find your last page anywhere. I am missing the whole part related to the quest itself.
Also, while not related to the issue (I think), there is 0 point to your page 3 existing, as you can put all of that logic on page 2 just fine. I'd consider putting it all on page 2, as breaking events up like that tend to cause weird issues as you then don't know exactly in what order things will occur in.

But yes, we do need also need to see your page 5, as that might be relevant.
Where is the actual battle processing event?

You said this isn't in the right forum, but you didn't state what forum it should be in. You haven't indicated anywhere in your post which engine you're using, and you don't have it set as the Primarily Uses in your profile either. Where does this belong?

I'm guessing you have a script/plugin that uses the same switch you turn on when he joins the party.
I think the issue related to page 3 was actually something caused by my connection since I can properly see it now.

Anyway you could just turn a switch on when you don't want the quest to be available and have a last page with no commands nor graphics.

If you put everything you have in your page 3 in your page 2 (you can change an event graphic by using event commands) and you use the same switch to decide if the quest is no longer available AND as a substitute for your self switch B you can have 2 event pages instead of 4.

While it makes no real difference when you run it you can always have a much easier life when you have to check what's wrong and what's not.
Also, while not related to the issue (I think), there is 0 point to your page 3 existing, as you can put all of that logic on page 2 just fine. I'd consider putting it all on page 2, as breaking events up like that tend to cause weird issues as you then don't know exactly in what order things will occur in.

But yes, we do need also need to see your page 5, as that might be relevant.

I completely removed the 5th page after taking the first 4 screenshots because I realized it didn't do anything. And you're right I don't know why I had page 2 and three separated, I just combined the two.

Where is the actual battle processing event?

Battle processing.PNG


You said this isn't in the right forum, but you didn't state what forum it should be in. You haven't indicated anywhere in your post which engine you're using, and you don't have it set as the Primarily Uses in your profile either. Where does this belong?

It is currently in the correct forum, as a mod already moved it, Ill edit the original post to avoid further confusion.

I'm guessing you have a script/plugin that uses the same switch you turn on when he joins the party.

Possibly, I'm using two battle scripts right now, one which shows enemy hp bars, and the second is Reedo's simple side battle system.
Try a switch besides 1 then. 1 is used by many plug-ins, and I always recommend that you leave that one alone in your game.

In fact, for that reason I actually don't use many switches before 100, just to be safe. Though I also use a variable to track where in my plot I am instead of switches, saves a lot of switches in the end.
Look through all your scripts and see which one uses that switch. Yami's Overlay does, I'm sure, and that's one that's used fairly often. I doubt that'd be the cause of your issue though - I'd be looking for a script that does something with BGMs or battles.

When you add a script, it's up to you to look at what switches and variables it uses, and do something to make sure you don't use the same ones. This means, if you're already using those switches/variables, find ones you aren't using, and change the script to use those instead. Then, whether the original ones were not used, or you've changed them to ones that are not used, go in and create a dummy event and use Control Switches/Variables to pull up the window and give them names to make it clear they're being used by the script. Hit Apply to close the window, then cancel so you don't actually create the event. All you need to do is name them, so you don't accidentally use them for something else later.
Look through all your scripts and see which one uses that switch. Yami's Overlay does, I'm sure, and that's one that's used fairly often. I doubt that'd be the cause of your issue though - I'd be looking for a script that does something with BGMs or battles.

When you add a script, it's up to you to look at what switches and variables it uses, and do something to make sure you don't use the same ones. This means, if you're already using those switches/variables, find ones you aren't using, and change the script to use those instead. Then, whether the original ones were not used, or you've changed them to ones that are not used, go in and create a dummy event and use Control Switches/Variables to pull up the window and give them names to make it clear they're being used by the script. Hit Apply to close the window, then cancel so you don't actually create the event. All you need to do is name them, so you don't accidentally use them for something else later.

How do I see what switches it uses, like, is it written out the same as they are in events: Switch 0001 = _________. Or is it an abbreviation? Sorry if this is a dumb question.

Edit: Nevermind I found it, it's Yanfly's Menu Options, it has the option to add custom switches which are defaulted at 1 and 2, along with variable 1 and 2. I changed them to 100, and 101. And the bug no longer occurs. Thanks guys.
You will always found them set out in the header (instruction part) of the script. So, for example, Yami's overlay script has this:
Code:
module YSA
  module OVERLAY
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Overlay Switches -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # These are switches which are enable overlay layers. Turn them on to show
    # them in your maps.
    #--------------------------------------------------------------------------
    # Default: ON
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    LIGHT_SWITCH = 1        # Turn on/off light layer
    SHADOW_SWITCH = 2       # Turn on/off shadow layer
    PARALLAX_SWITCH = 3     # Turn on/off parallax layer
    GROUND_SWITCH = 4       # Turn on/off ground layer

This tells you that the script is using switches 1, 2, 3, 4.
The chances are high that you, or another script, are already using those, so you change those numbers to new switches (which you name) so that you don't have one switch trying to do two things.

I suggest you go through the headers of all your custom scripts looking to see what switches are shown, and make sure that you don't have two scripts trying to use the same switch, or a script using a switch which you have already set to something else.
Nevermind I found it, it's Yanfly's Menu Options, it has the option to add custom switches which are defaulted at 1 and 2, along with variable 1 and 2. I changed them to 100, and 101. And the bug no longer occurs.

Now make sure you give switches 100 and 101 names, because if you haven't, under the assumption that you'll never use that many switches, I can pretty much guarantee that by the time you get to them, you'll have forgotten.


That still doesn't explain why this issue occurred. You must have an event somewhere that sets the regular BGM to that particular battle BGM, and the event must be conditioned by one of those switches or variables. I suggest you keep looking for that event (it could be a common event, or an event on any map that you visit), and make sure you actually want it to do what it's doing.
Now make sure you give switches 100 and 101 names, because if you haven't, under the assumption that you'll never use that many switches, I can pretty much guarantee that by the time you get to them, you'll have forgotten.


That still doesn't explain why this issue occurred. You must have an event somewhere that sets the regular BGM to that particular battle BGM, and the event must be conditioned by one of those switches or variables. I suggest you keep looking for that event (it could be a common event, or an event on any map that you visit), and make sure you actually want it to do what it's doing.
Yeah I was confused as to why it happened too, but that was the only script I had that actually used switches. I'll definitely keep an eye out for any variables that I might have used to change the bgm though.

Original thread: https://forums.rpgmakerweb.com/threads/battle-processing-event-music-doesnt-end.96538/