RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Optional Battle Music

0 Members and 1 Guest are viewing this topic.

********
Rep:
Level 96
2010 Most Attractive Male Member2010 Best Musician
OH MY GOD ARLEN'S MAKING A GAME.

It's just a joke kind of game, though, and I don't have much time. And I've never used VX (though I have used XP and 2003, and not much has changed.)

ANYWAY, I have my epic field music for my maps, but I don't want battle music. I want the music that's playing on the field to CONTINUE once the battle starts, and CONTINUE TO CONTINUE once the battle is over. With no interruptions.


What crazy script thing do I need to make this work?

:tinysmile::tinysmile:

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Best RPG Maker User (Scripting)2010 Best Use Of Avatar And Signature Space
Super lazy way to do it, and not very compatible, but put this in its own slot above Main and above all other custom scripts, but still below the default ones:

Code: [Select]
#==============================================================================
# ** Scene Map
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    overwritten method - call_battle
#==============================================================================

class Scene_Map
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Switch to Battle Screen
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def call_battle
    @spriteset.update
    Graphics.update
    $game_player.make_encounter_count
    $game_player.straighten
    $game_temp.map_bgm = RPG::BGM.last
    $game_temp.map_bgs = RPG::BGS.last
    Sound.play_battle_start
    $game_temp.next_scene = nil
    $scene = Scene_Battle.new
  end
end

#==============================================================================
# ** Scene Battle
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    overwritten method - process_victory
#==============================================================================

class Scene_Battle
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Victory Processing
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def process_victory
    @info_viewport.visible = false
    @message_window.visible = true
    display_exp_and_gold
    display_drop_items
    display_level_up
    battle_end(0)
  end
end

It won't work if you use some other script that overwrites either method, but if you run into any just tell me and I'll fix them up for you.
« Last Edit: April 12, 2010, 09:18:08 PM by modern algebra »

********
Rep:
Level 96
2010 Most Attractive Male Member2010 Best Musician
Balls awesome. I'm probably not going to use any other scripts in the game, it's going to be really basic, but I'll come back if there's any issues, lol.

Thanks, MA.

:tinysmile::tinysmile:

********
Rep:
Level 96
2010 Most Attractive Male Member2010 Best Musician
Okay, so it works, but now my bgm's aren't looping correctly. There's a gap, a 1/2 second and very noticable gap before it goes from the end to the beginning.

I checked the files. They loop flawlessly in iTunes, Adobe Soundbooth, Logic, and Audacity.

I tried mp3. Still has gaps.
I tried wav. Still has gaps.
I'm about to try .ogg, but I'm not hopeful.

The only thing that remains that could cause this problem is ... this script. :(

:tinysmile::tinysmile:

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Best RPG Maker User (Scripting)2010 Best Use Of Avatar And Signature Space
All this script does is take out the lines that would normally stop the field music from playing when entering battle and stop the victory me from playing when exiting battle. I don't see how it could interfere with looping. Do they loop properly when the script isn't included in your game? RMVX doesn't have a very good audio engine, but I did think oggs and midis looped correctly.

********
Rep:
Level 96
2010 Most Attractive Male Member2010 Best Musician
Ogg seems to fix the issue. What a horrible bug to leave in a program like this...

Sorry for doubting you, MA. :'(

:tinysmile::tinysmile:

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Best RPG Maker User (Scripting)2010 Best Use Of Avatar And Signature Space
haha :) Yeah, it has the worst Audio handling ever. The looping is terrible for some formats as you know. Worse than that, you can't even play a file from a certain point of time, meaning you can't pause and resume files; you have to start them at the beginning every time. Nor are you able to retrieve any properties from the currently playing file, such as title, length, etc... It's a pain.

********
Furry Philosopher
Rep:
Level 94
Rawr?
2013 Best RPG Maker User (Creativity)Randomizer - GIAW 11Gold - GIAW 11 (Hard)Secret Santa 2013 ParticipantFor frequently finding and reporting spam and spam bots2012 Best RPG Maker User (Mapping)2012 Best RPG Maker User (Programming)Secret Santa 2012 ParticipantGold - GIAW 9Project of the Month winner for September 2008For taking a crack at the RMRK Wiki2011 Best RPG Maker User (Programming)2011 Best Veteran2011 Kindest Member2010 Best RPG Maker User (Events)2010 Best RPG Maker User (Story)
OGG works very nicely for loops, but it has a bit of delay I've noticed when starting up. Sadly, midi's are the only perfect looping music, but OGG's come the closest for the quality you want.