Troop Battle BGM

This script allows you to assign a custom battle BGM to troop objects. When a troop battle BGM is specified, that sound file will be played instead of the default battle BGM.

It also allows you to assign a custom victory theme (known as Battle End ME), allowing you to play that theme instead of the default one.



Script: download here


Battle BGM

Add a comment on first page of the troop events:

<battle bgm>

Followed by a “Change Battle BGM” or a “Play BGM” command.


The comment may appear anywhere on the first page, but the BGM command must appear after the comment.

For older users of this script, it still supports specifying the filename in the comment directly

<battle bgm: filename>

Where filename is a valid sound file in your Audio/BGM folder.


Victory ME

Note-tags and commands are similar to battle BGM, except you are using Battle End ME this time:

<battle end me>

Followed by a “Change Battle End ME” command or a “Play ME” command.

Or specifying a filename directly:

<battle end me: filename>

Where the `filename` is a file in the Audio/ME folder.

You may also like...

28 Responses

  1. Nick says:

    This is an awesome script, but is there a way to have it play a BGM instead of an ME on battle end, since ME can’t loop? I can’t find any scripts with that function and this one comes the closest.

  2. someone says:

    Am I the only one getting a line 131 error?

    “Undefined method ‘play_battle_bgm’ for class ‘Module’

  3. FishStickMystic says:

    HimeWorks, love the script, but it’s not working for me at all. I’m using the script on the first page of the troop and I use “Change Battle BGM”. When I test it out in-game, “Script, ‘Game_Interpreter’ line 1411: SyntaxError occured. unexpected ‘<‘ ” shows up.

    Also, how is the troop page supposed to look? The images aren’t appearing.

    Thank you!

    • Hime says:

      I have updated the images.
      You have likely used a script call instead of a comment. See the updated image for further guidance.

      • FishStickMystic says:

        Oh my goodness, I’m such a derp!! I’m so sorry!

        Thanks again, Hime!! It works like a charm. 🙂

  4. Gabenslair says:

    Wow Himeworks! Great moves! Keep it up, proud of you.
    I wonder if if there’s a way to have a troop system like mother 3.
    I would love a troop system where only 4 are present, but if you kill on, one of the other 4 come to replace that position! I know I can replicate that using the conditions tab, but the switches would take alot of time just for 1 out of 999 troops and about 8 out of 5000 switches that in the end have the 5 all turned off! Would you like to script this in MV/RPGMAKERVXACE (If you still script that game)?

  5. BlakeAvery says:

    Could you remake this for MV? That would be awesome.

  6. Amyrakunejo says:

    I have a question.

    Is it possible to change the Victory ME as well?

    Like, for a normal battle, I’d just want a typical Victory ME, but for a hard-fought win, or a hard-core boss battle, I’d like to use a more epic Victory ME (something along the lines of the finish song sequence from Guitar Hero III onward would be a great example of an epic Victory ME).

    • Hime says:

      I’m assuming the Change Battle End ME event command is not a feasible option?

      • Amyrakunejo says:

        It is, but then it has to be changed back every event that it occurs (tedious).

        Plus, the change battle end ME doesn’t work for Troop Battle Test (and changing the System Data part back and forth is incredibly tedious).

        My only thoughts were that if one half could be changed, why not both halves?

        If I knew how to script, I’d try it myself.

  7. KaelRhain says:

    Thank you for the scrip, it works like a charm. 😀

  8. Demos Kerrigan says:

    I didn’t do any save game, but you’re right that I should check if it has to do with any compatibility issues. So I’ll put it to another project and see if it works.

    However, when I type the name of the song file, should I use the capital letters, or it doesn’t matter? ^^”

    Also, thanks you very much for taking your time to answer to my help. ^^

  9. Demos Kerrigan says:

    I’ve seen and tested tone of your scripts. Your works are outstanding! However, for unknown reason, your wonderful script for the Troop Battle BGM doesn’t seem to work at all, sadly :/

    • Hime says:

      Did you save your game before trying it? Did you set the comment properly? Have you tried it in a new project to check if it’s an incompatibility issue?

      • Demos Kerrigan says:

        Sorry for the double posting and sorry for forgetting to click upon reply to your comment. I appologize in advance. I tested it out to a new project and it works like a charm.

        I don’t know why my other project has compatibility issues. Though I tested it with your (Enemy Level), (Disable Victory Music), (Gender Requirement) and (Feature Manager), which all those 4 worked like a charm without issues at all.

        I wonder if it’s not due to Victor Saint and Yanfly scripts that are giving troubles with compatibility, since I didn’t get any error at all, but simply the BGM doesn’t change at all.

        • Hime says:

          In your new project add a new script one by one until you find the script that’s causing the problem. I don’t know what their scripts could be doing. You can try re-arranging the order of the scripts hoping that it will work as well. Battle systems scripts usually should come first since they usually replace a lot of default code.

      • Demos Kerrigan says:

        Understood, I’ll test it out. But when you say first, do you above (close to Scene scripts) or below (close to Main)? ^^”

    • Demos Kerrigan says:

      do you*
      Sorry for double posting, I wanted to correct my spelling mistake ^^”

    • Demos Kerrigan says:

      Thanks for the answer. I’ll make sure they are in the suggested order. ^^

    • Demos Kerrigan says:

      I’ve done placing them in the right order. Tested it out one by one and I think to know the mistake I did. Instead of using battle bgm, I took troop bgm by mistake I think, which explained the issue I got.

      Everything works like a charm, thank you very much, I’m deeply grateful for your help. And as always, stay awesome as you are, Hime ^^

Leave a Reply

Your email address will not be published. Required fields are marked *