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.
Download
Script: download here
Usage
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.
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.
Yes. The instructions above the ME section shows how to use a BGM.
Am I the only one getting a line 131 error?
“Undefined method ‘play_battle_bgm’ for class ‘Module’
Is the script installed below Materials?
This is only for Ace
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!
I have updated the images.
You have likely used a script call instead of a comment. See the updated image for further guidance.
Oh my goodness, I’m such a derp!! I’m so sorry!
Thanks again, Hime!! It works like a charm. 🙂
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)?
Could you remake this for MV? That would be awesome.
Hmm, so just playing different music depending on which troop you encounter. That can be done.
https://github.com/Hime-Works/Requests/issues/323
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).
I’m assuming the Change Battle End ME event command is not a feasible option?
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.
I’ve updated the script to support battle end ME. Instructions have been updated.
Thank you for the scrip, it works like a charm. 😀
Thanks! Maybe you can share with others how you used it 🙂
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. ^^
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 :/
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?
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.
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.
Understood, I’ll test it out. But when you say first, do you above (close to Scene scripts) or below (close to Main)? ^^”
First means the first script below materials. Last means the one right above Main.
do you*
Sorry for double posting, I wanted to correct my spelling mistake ^^”
Thanks for the answer. I’ll make sure they are in the suggested order. ^^
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 ^^