Area music to keep playing during a specific fight

Status
Not open for further replies.

MiinionX

Warper
Member
Joined
Aug 7, 2016
Messages
3
Reaction score
0
First Language
English
Primarily Uses
Hello there!

I am attempting to create a boss fight where the boss theme plays slightly before the boss fight begins, and said song will carry over into the fight itself (as in seamlessly transition not restart). Essentially the boss attempts a potshot on one of the protagonists, and the fight happens from there after the two of them exchange a few lines. I attempted to do this using VX Ace's method but had no such luck. If anybody would like to inform me on how to do this I would be more than happy to try it.

Thank you for your help,
Miinion.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
start the music X frames (converted from seconds) before the actual start of the battle, so that the loop is caught when the battle scene is already presented.

it's all about math and timing, there's really no other solution to it. (aside from splitting the track in two, and using an intro and a battle loop separately, but you still have to time it correctly anyways)
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
I think there is another solution, and a smoother one at that. I can't open my RMXP right now so I'm going based off of VX Ace, but I see a method in BattleManager called "play_battle_bgm". You can probably find its equivalent by searching the project file for "bgm".

At the beginning of this method (after the "def" line), add a line:
if ($game_switches[x] == false)
where x is the ID of a Switch you'd like to set to TRUE in an event whenever you want the music to not restart when entering battle, and at the end of the method (right before the final "end" line), and another line that reads:
end

Then, just be sure to set the switch to TRUE before any battle where you don't want the music to restart, and be sure to set that switch back to FALSE afterwards.

EDIT:
I got my RMXP working and I think I found where the BGM plays. In the call_battle method, there is a line that reads:
$game_system.bgm_play($game_system.battle_bgm)
You will need to add the lines I mentioned earlier, above and below that line. So after your edit, the method should look like this:
Code:
  #--------------------------------------------------------------------------
  # * Battle Call
  #--------------------------------------------------------------------------
  def call_battle
    # Clear battle calling flag
    $game_temp.battle_calling = false
    # Clear menu calling flag
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    # Make encounter count
    $game_player.make_encounter_count
    # Memorize map BGM and stop BGM
    $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
    # Play battle start SE
    $game_system.se_play($data_system.battle_start_se)
    # Play battle BGM
    if ($game_switches[x] == false)
        $game_system.bgm_play($game_system.battle_bgm)
    end
    # Straighten player position
    $game_player.straighten
    # Switch to battle screen
    $scene = Scene_Battle.new
  end
 
Last edited:

DerVVulfman

Resident Werewolf
Veteran
Joined
Jun 26, 2012
Messages
315
Reaction score
155
First Language
English
Primarily Uses
RMXP
Hrm, this reminds me of a scene (and subsequently the music) from Final Fantasy VIII where the the heroes of Balamb Garden are on a troop transport at sea about to get dropped off at a beach front. The music start off slow and laboring as the boats approach, but then goes into a fast and relentless fervor when the teams drop off to face wave after wave of enemies in a continuous loop.

For those not familiar, look for Final Fantasy VIII's track called 'The Landing', it is Disc 1 - Track 8.

In this, they didn't use two piece of music, but one. They began playing the piece, but had 'loop points' in place. Instead of ending the piece and returning to its beginning, it returns to a pre-defined point past the well-written and orchestrated opening flourish.

This feature is not available in RPGMaker per-say, except by way of scripts that use Window's MCISendstring feature to play the music. The earliest version of a script that handled this was by a Japanese scripter named cogwheel (who also made the famous RTAB system), later adapted by GubiD (of the GTBS system, and then later I had a hand in making a version offering multiple audio channels. But using any of these systems will not let looping music play throuh RPGMaker's native DirectSound drivers, but by those in Windows.

And it's sometimes a real ***** to find the loop points you really desire. And Ogg Vorbis requires extra drivers and loop points are even harder to acquire due to its format. Glad I made an editor...
 

RHC2019

Villager
Member
Joined
Sep 27, 2019
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMXP
@Wavelength: I just came here to ask the same question as Miinion, actually, so thank you for already answering it. I just started with RPG Maker yesterday though, and don't know exactly where I should be looking. I went to tools > script editor (here: https://i.gyazo.com/2f14a6a132ddd19fcd826caaddc78571.png), but I don't see anything called BattleManager on the left, and I can't find the method you mentioned with control+f.

Should I be in a different section altogether? I looked around, but nothing else seems like it'd relate to scripting, hahah!
Thanks again for the help. Having the bgm repeat every time a battle starts is a real drag for the area I'm making.

Edit: Should've looked a bit harder. Found it under Scene_Map. Works great. Thanks again, Wavelength! =)
 
Last edited:
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top