Help - Search - Members - Calendar
Full Version: Law's Menu Music
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS-Submissions
The Law G14
Law’s Menu Music

Version 2.0
The Law G14
10/11/09


Introduction

I saw a script like this before for vx by Sojabird and since I noticed that a lot of people seemed to like it, I made one for xp. Basically what it does is play a different music then the map music when you enter the menu. Hope you guys like it smile.gif


Features

- Plays music in menu

- Plug n’ Play

- Can choose if you would like the BGM to be just the Map BGM except faded out a little (In Version 2.0)


Script


Click to view attachment


Compatibility

Will probably run into issues with scripts that edit the menu.


Installation

On line 30 of the script, that's where you change what song you want the menu to play.


FAQ

None as of now.


Terms and Conditions

Please credit me where it is due.



Special Thanks

Special Thanks to Sojabird and his script for giving me the idea to do this script.

Thanks to Night Runner for Bug fixes as well as Redd for suggesting the idea on the faded Map BGM
Chibichan
O_O Whoa. You told me about this about two hours ago and it's already finished?! Wow... I like the function. Simple, yet interesting.
Zeffa
Is there possibly a way to do this for other screens Law?

Such as shop screens and MCgamer's Scene_Item_Mixer script?
The Law G14
QUOTE
O_O Whoa. You told me about this about two hours ago and it's already finished?! Wow... I like the function. Simple, yet interesting.


Thanks for the comments Chibichan biggrin.gif Glad you think it's interesting smile.gif

QUOTE
Is there possibly a way to do this for other screens Law?

Such as shop screens and MCgamer's Scene_Item_Mixer script?


Yup, it's definitly possible, would you like me to make another script for the shop screen and then post it here?

Also, orginally, I didn't have the instructions for the script but I just added them so that you know how to change what song plays when you enter the menu smile.gif


Zeffa
This is all great dude yeah, I'd really like a song added for the shop menu, but if this is too much trouble don't worry about it.

Heh heh It'd be sweet to get some funky music playin as you try your luck at mixing and such too. biggrin.gif biggrin.gif Yah Yah!
BlackMask
Your my god
enough said
The Law G14
QUOTE
This is all great dude yeah, I'd really like a song added for the shop menu, but if this is too much trouble don't worry about it.

Heh heh It'd be sweet to get some funky music playin as you try your luck at mixing and such too. Yah Yah!


Here ya go smile.gif

[Show/Hide] The Script
CODE
#------------------------------------------------------------------------------
#==============================================================================
#==============================================================================
#=========================*Law's Shop Music*===================================
#=========================Author: The Law G14==================================
#============================Version 1.0=======================================
#==============================================================================
#------------------------------------------------------------------------------
#===============================================================================
# ** Scene_Shop
#-------------------------------------------------------------------------------
# This class performs shop screen processing.
#===============================================================================

class Scene_Shop
  #-----------------------------------------------------------------------------
  # * Update
  #-----------------------------------------------------------------------------
  alias law_shop_update update
  def update
    law_shop_update
    $game_system.bgm_memorize
    # Update windows
    @help_window.update
    @command_window.update
    @gold_window.update
    @dummy_window.update
    @buy_window.update
    @sell_window.update
    @number_window.update
    @status_window.update
    Audio.bgm_play("Audio/BGM/001-Battle01", 100, 100)
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If buy window is active: call update_buy
    if @buy_window.active
      update_buy
      return
    end
    # If sell window is active: call update_sell
    if @sell_window.active
      update_sell
      return
    end
    # If quantity input window is active: call update_number
    if @number_window.active
      update_number
      return
    end
  end
  #-----------------------------------------------------------------------------
  # * Update Command
  #-----------------------------------------------------------------------------
  alias law_shop_update_command update_command
  def update_command
    law_shop_update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $game_system.bgm_restore
      $scene = Scene_Map.new
      return
    end
  end
end



@BlackMask: lol, glad you like the script biggrin.gif
BlackMask
wow gratz on jr mod
Zeffa
Heh heh

Thanks very much Law, I'd completely forgot about this. Been busy with the old RPG and what not.
Redd
Hey, is there any way that we could make the music fade off into the distance when we click menu or shop, and then go back to normal when we click out?
The Law G14
When I do use the bgm_fade method, it horribly lags in the menu so I'd rather stay away from it, sorry sad.gif

EDIT: I tottally misenterpreted your post, do you mean that you just want the bgm to be softer when you play it in the menu?
The Law G14
Updated the script. Made the script shorter and fixed a terrible bug.

As always, enjoy smile.gif
zzcloudzz
Sigh....i got it....i put it in the script editor....and guess what.... dry.gif my head phones decided to die.....
Redd
HAHA that sucks.
Yeah that is actually what I meant. Just make the BGM softer than usual, so it's some kind of psychic wall
The Law G14
Ah, I see what you mean, now. I'm not too sure how I would do this since I'm not too familiar with the Audio Class but I'll try to look into it and give you a response when I manage to come up with something.
Redd
Sweeeeet thanks dude smile.gif
carnie_natas
another good script,keep it up Law.

Ive decided to include this in my project,Props!
pianta64
Awesome script! Just what I wanted! Thanks!
Nanaki
I have a strange problem. Whenever I try to use "skill" or "equip," it automatically selects the first character on the right -- in other words, I can't change armor or use spells for the other three characters in my party. It shows the cursor for a second as if it's going to let me pick a character, but then it acts as if I've pressed "enter" and selects Aluxes.

I tested this in a fresh project file with no other scripts installed, and I have the same problem. Does anyone else have this issue? I'm using the legal English version, 1.0.4.0. (Did I install the script wrong? I'm new to RMXP. I put this below all of the default scripts, but above Main.)
pianta64
QUOTE (Nanaki @ Dec 22 2010, 05:16 AM) *
I have a strange problem. Whenever I try to use "skill" or "equip," it automatically selects the first character on the right -- in other words, I can't change armor or use spells for the other three characters in my party. It shows the cursor for a second as if it's going to let me pick a character, but then it acts as if I've pressed "enter" and selects Aluxes.

I tested this in a fresh project file with no other scripts installed, and I have the same problem. Does anyone else have this issue? I'm using the legal English version, 1.0.4.0. (Did I install the script wrong? I'm new to RMXP. I put this below all of the default scripts, but above Main.)


Yes, I am having the same problem too.
Night_Runner
This is where I miss being a mod.

Features:
  • Will restore the music even if you jump from the Item scene back to the map (items with common events would normally bypass the menu, so the battle music would continue to play).
  • Less lag! (if you noticed any).
  • More compatible with other menu altering scripts!
  • Fixes 2 bugs:
    • If you pressed accept to the Skill or Quip options it would bypass the character selection.
    • If you managed to get the character selection working, it would skip back to the map if you cancelled in character selection


[Show/Hide] Fixed Code
CODE
#------------------------------------------------------------------------------
#==============================================================================
#==============================================================================
#=========================*Law's Menu Music*===================================
#=========================Author: The Law G14==================================
#=================== Original VX script by Sojabird============================
#============================Version 1.0=======================================
#==============================================================================
#------------------------------------------------------------------------------
#===============================================================================
# ** Scene_Menu
#-------------------------------------------------------------------------------
# This class performs menu screen processing.
#===============================================================================

class Scene_Menu
  #-----------------------------------------------------------------------------
  # * Update
  #-----------------------------------------------------------------------------
  alias law_initialize  initialize  unless $@
  def initialize(*args)
    $game_system.bgm_memorize if $scene.is_a? Scene_Map
    Audio.bgm_play("Audio/BGM/001-Battle01", 100, 100)
    return law_initialize(*args)
  end
  #-----------------------------------------------------------------------------
  # * Update Command
  #-----------------------------------------------------------------------------
  alias law_main main
  def main
    law_main
    $game_system.bgm_restore if $scene.is_a? Scene_Map
  end
end


#===============================================================================
# ** Scene_Item
#-------------------------------------------------------------------------------
#  This class performs item screen processing.
#===============================================================================

class Scene_Item
  #-----------------------------------------------------------------------------
  # * Update Command
  #-----------------------------------------------------------------------------
  alias law_main main
  def main
    law_main
    $game_system.bgm_restore if $scene.is_a? Scene_Map
  end
end
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.