Galv’s Item/Equip Sound Effects V.1.0

Demo – Version 1.0 >

#------------------------------------------------------------------------------#
#  Galv's Item/Equip Sound Effects
#------------------------------------------------------------------------------#
#  For: RPGMAKER VX ACE
#  Version 1.0
#------------------------------------------------------------------------------#
#  2012-10-30 - Version 1.0 - release
#------------------------------------------------------------------------------#
#  This script allows you to set individual sound effects for using items, using
#  skills or equipping different armors and weapons in the menu.
#------------------------------------------------------------------------------#
#  INSTRUCTIONS:
#  Notetag ITEMS, SKILLS, ARMORS and WEAPONS with the following tag:
#------------------------------------------------------------------------------#
#
#  <se: "se_name",volume,pitch>
#
#  EXAMPLE:
#  <se: "Heal7",100,100>
#
#------------------------------------------------------------------------------#
#  Database SE settings will be used for items not tagged with an SE.
#------------------------------------------------------------------------------#

$imported = {} if $imported.nil?
$imported["Menu_Use_SE"] = true

module Menu_Use_SE
#------------------------------------------------------------------------------#
#  SCRIPT SETUP OPTIONS
#------------------------------------------------------------------------------#

  OPTIMIZE_EQUIP_SE = ["Bell3", 90, 100]  # Sound for optimize equip. To disable
                                          # set to ["",0,0]
  
  CLEAR_EQUIP_SE = ["Battle3", 90, 150]   # Sound for clear equip. To disable
                                          # set to ["",0,0]
                                          
  # Database settings for equip SE will be used if these are disabled.
  
#------------------------------------------------------------------------------#
#  END SCRIPT SETUP OPTIONS
#------------------------------------------------------------------------------#
  
end

module SE_Stuff
  def item_se
    if @item_se.nil?
      if @note =~ /<se: "(.*)",(.*),(.*)>/i
        @item_se = [$1,$2.to_i,$3.to_i]
      else
        @item_se = ""
      end
    end
    @item_se
  end
end
class RPG::Item
  include SE_Stuff
end
class RPG::Skill
  include SE_Stuff
end
class RPG::Armor
  include SE_Stuff
end
class RPG::Weapon
  include SE_Stuff
end

#------------------------------------------------------------------------------#
# SE For Items and Skills Menus
#------------------------------------------------------------------------------#

class Scene_Item < Scene_ItemBase
  alias galv_item_se_play_se_for_item play_se_for_item
  def play_se_for_item
    return if item.nil?
    if item.item_se != ""
      return RPG::SE.new(item.item_se[0], item.item_se[1], item.item_se[2]).play
    end
    galv_item_se_play_se_for_item
  end
end # Scene_Item < Scene_ItemBase

class Scene_Skill < Scene_ItemBase
  alias galv_item_se_play_se_for_item play_se_for_item
  def play_se_for_item
    return if item.nil?
    if item.item_se != ""
      return RPG::SE.new(item.item_se[0], item.item_se[1], item.item_se[2]).play
    end
    galv_item_se_play_se_for_item
  end
end # Scene_Skill < Scene_ItemBase


#------------------------------------------------------------------------------#
# SE For Equip Menu
#------------------------------------------------------------------------------#

class Scene_Equip < Scene_MenuBase
  alias galv_item_se_command_optimize command_optimize
  def command_optimize
    RPG::SE.stop
    sound = Menu_Use_SE::OPTIMIZE_EQUIP_SE
    if sound[0] != ""
      RPG::SE.new(sound[0], sound[1], sound[2]).play
    else
      Sound::play_system_sound(4)
    end
    galv_item_se_command_optimize
  end

  alias galv_item_se_command_clear command_clear
  def command_clear
    RPG::SE.stop
    sound = Menu_Use_SE::CLEAR_EQUIP_SE
    if sound[0] != ""
      RPG::SE.new(sound[0], sound[1], sound[2]).play
    else
      Sound::play_system_sound(4)
    end
    galv_item_se_command_clear
  end

  alias galv_item_se_on_item_ok on_item_ok
  def on_item_ok
    get_equip_se
    galv_item_se_on_item_ok
  end

  def get_equip_se
    return if @item_window.item.nil?
    item = @item_window.item
    if item.item_se != "" 
      RPG::SE.new(item.item_se[0], item.item_se[1], item.item_se[2]).play
    else
      Sound::play_system_sound(4)
    end
  end
end # Scene_Equip < Scene_MenuBase

#------------------------------------------------------------------------------#
# OVERWRITE
#------------------------------------------------------------------------------#
module Sound
  def self.play_equip
    return
  end
end
Advertisements

5 thoughts on “Galv’s Item/Equip Sound Effects V.1.0

  1. Rpgmakermods says:

    error Scripts #—————..

    • CaoCao says:

      I love these rude people who just come over posting the error note as if it was a cancer asking someone to correct their own mistakes.
      Thanks for the script galv; will be very useful for my project.

  2. Galv says:

    That doesn’t help a whole lot to solve the problem. But make sure you copied the script properly. Mouse over the script box above and then some little icons on the right will appear. Click the one that says “Copy to Clipboard” and see if that works

  3. Luck 38 says:

    hey guy i´m new but i want to know how put this on my rpg maker i already download but nothing, say “lite version is not compatible ” or something of this thing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s