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.

Quieter music (in menu)

A simple edit add this in a new script above main

Code:
class Scene_Menu
  alias music_main main
  def main
    audio = $game_temp.map_bgm.dup
    audio.volume = 70
    $game_system.bgm_play(audio)
    music_main
    $game_system.bgm_play($game_temp.map_bgm)
  end
end
 
That means there is no music playing use this instead (Sorry I was tired when I typed that up)

Code:
class Scene_Menu
  alias music_main main
  def main
    audio = $game_system.bgm_playing.dup
    audio.volume = 70
    $game_system.bgm_play(audio)
    music_main
    $game_system.bgm_play($game_system.bgm_playing)
  end
end
 
another fix

Code:
class Scene_Menu
  alias music_main main
  def main
    $game_temp.map_bgm = $game_system.playing_bgm.dup
    audio = $game_system.playing_bgm.dup
    audio.volume = 70
    $game_system.bgm_play(audio)
    music_main
    $game_system.bgm_play($game_temp.map_bgm)
  end
end
 

Kest

Member

Here's another fix for this, it would crash the game whenever a map had no music. I think I got it right, anyways...

Code:
class Scene_Menu
  alias music_main main
  def main
    if $game_temp.map_bgm != nil
      $game_temp.map_bgm = $game_system.playing_bgm.dup
      audio = $game_system.playing_bgm.dup
      audio.volume = 80
      $game_system.bgm_play(audio)
      music_main
      $game_system.bgm_play($game_temp.map_bgm)
    else
      music_main
    end
  end
end
 
Try this:
Code:
class Scene_Menu
  alias music_main main
  def main
    if $game_temp.map_bgm != nil
      $game_temp.map_bgm = $game_system.playing_bgm.dup
      audio = $game_system.playing_bgm.dup
      audio.volume = audio.volume - 30
      $game_system.bgm_play(audio)
    end
    music_main
    if $scene.is_a?(Scene_Map)
      $game_system.bgm_play($game_temp.map_bgm)
    end
  end
end
class Scene_Item
  alias music_main main
  def main
    music_main
    if $scene.is_a?(Scene_Map)
      $game_system.bgm_play($game_temp.map_bgm)
    end
  end
end
class Scene_Save
  alias music_main main
  def main
    music_main
    if $scene.is_a?(Scene_Map)
      $game_system.bgm_play($game_temp.map_bgm)
    end
  end
end

Untested, but it should work.
 
Silly Trick-- SephirothSpawn. A scene change chamges the $scene variable, which gets changed BEFORE the transition takes place. This checks if that scene is Scene_Map. If it is, it restores the map BGM.
 

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