Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Character specific Battle Bgm

I really don't know if there is a script for this, but it didn't appear in the search I made.

I would like a character specific battle music script, compatible with RMXP.
It works like in Golden sun, how if certain characters are in the party, then the battle BGM will change accordingly.

Say I were to have Aluxes/Arshes as the first character and it plays a certain battle bgm,
but If Basil were the character in battle position 1, then the music would change.
Could someone please give me a link to a topic that has the script?
Thanks a lot.
-Gemise-
 
Here ya go. Paste above 'main'

If you have a file named "Aluxes.mid" or "Aluxes.mp3", it will play when Aluxes is the first party member.
If not, it will play the default set in your database System tab.

Code:
class Game_System

  def battle_bgm
    @battle_bgm = RPG::AudioFile.new($game_party.actors[0].name)
    if FileTest.exist?('Audio/BGM/' + @battle_bgm.name + '.mid') or
       FileTest.exist?('Audio/BGM/' + @battle_bgm.name + '.mp3')
      return @battle_bgm
    else
      return $data_system.battle_bgm
    end
  end
end

Be Well
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top