Aller en bas
GWOO
GWOO
Membre

Nombre de messages : 127
Age : 27
Localisation : Oyonnax
Distinction : aucune
Date d'inscription : 27/10/2012
http://gravity-mh3.xooit.fr

Paramètres Volume  Empty Paramètres Volume

Ven 9 Nov 2012 - 17:11
Voila un script très bien que j'ai trouvé pour modifier les paramètres du volume en jeu.

Auteur du script : Kal

Script à placer au dessus de Main.
Appelez le script Volume_Control

Code:
# encoding: utf-8
#===============================================================================
# �¡ Volume Control For RGSS3
#-------------------------------------------------------------------------------
#�@2011/12/01�@Ru/‚Þ‚Á‚­R
#-------------------------------------------------------------------------------
# English Translation By: Elemental Crisis (http://RPGMakerVXAce.com)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Bug fixes and menu bars added by Kal.
#-------------------------------------------------------------------------------
#
#�@Adds the ability to change volume control.
#
#�@�œ The following methods are added to the Audio Module
#�@Audio.volBGM �c�c Maximum BGM volume setting.
#�@Audio.volBGS �c�c Maximum BGS volume setting.
#�@Audio.volSE  �c�c Maximum SE volume setting.
#�@Audio.volME  �c�c  Maximum ME volume setting.
#�@Audio.volBGM=�”’l �c�cSet BGM maximum volume (0-100)
#�@Audio.volBGM=�”’l �c�c Set BGS maximum volume (0-100)
#�@Audio.volSE=�”’l  �c�c Set SE maximum volume (0-100)
#�@Audio.volME=�”’l  �c�c Set ME maximum volume (0-100)
#
#�@�œ Volume control is added to the main menu.
#
#-------------------------------------------------------------------------------
# �yKnown Issues�z
#�@Created before VXAce's official release so unable to properly test.
#-------------------------------------------------------------------------------
#==============================================================================
# �œ Settings
#==============================================================================
module HZM_VXA
  module AudioVol
        # Display Volume Control on Main Menu?
        # �@true  �c�c Display.
        # �@false �c�c Don't Display.
        MENU_FLAG = true
 
        # Volume Control Name in Main Menu.
        MENU_NAME              = "Volume"
 
        # Volume Control Settings Name.
        CONFIG_BGM_NAME  = "BGM"
        CONFIG_BGS_NAME  = "BGS"
        CONFIG_SE_NAME  = "SE"
        CONFIG_ME_NAME  = "ME"
        CONFIG_EXIT_NAME = "Quitter"
 
        # Volume Change Variation.
        # ADD_VOL_NORMAL �c�c Variation of Left/Right Keys.
        # ADD_VOL_HIGH  �c�c Variation of LR Key.
        ADD_VOL_NORMAL = 5
        ADD_VOL_HIGH  = 25
 
        # Use bars or numbers.
        # :bars  => use bars
        # :numbers  => use numbers
        DISPLAY = :bars
 
        # Bar display options.
        # The higher BAR_X the more to the right the bar is drawn.
        # BAR_WIDTH sets the width of the bar.
        # Y_ADJUST allows you to precisely adjust the y value (how high or low
        # the bar is rendered).
        BAR_X      = 55 
        BAR_WIDTH  = 70
        Y_ADJUST        = -3
  end
end
#==============================================================================
# �ª �@ Settings Above �@ �ª
# �«    Script Below    �«
#==============================================================================
# Additonal Methods.
# class << Audio means we open up the Audio module and all methods defined
# get defined on self (that is, the Audio module itself)
class << Audio

  def volBGM=(vol)
        @hzmVolBGM = normalize_volume(vol)
  end

  def volBGS=(vol)
        @hzmVolBGS = normalize_volume(vol)
  end

  def volSE=(vol)
        @hzmVolSE = normalize_volume(vol)
  end

  def volME=(vol)
        @hzmVolME = normalize_volume(vol)
  end

  def volBGM
        @hzmVolBGM.nil? ? @hzmVolBGM = 100 : @hzmVolBGM
  end

  def volBGS
        @hzmVolBGS.nil? ? @hzmVolBGS = 100 : @hzmVolBGS
  end

  def volSE
        @hzmVolSE.nil? ? @hzmVolSE = 100 : @hzmVolSE
  end

  def volME
        @hzmVolME.nil? ? @hzmVolME = 100 : @hzmVolME
  end

  # Make sure volume does not go over 100 or under 0.
  def normalize_volume(vol)
        vol = 100 if vol > 100
        vol = 0  if vol < 0
        vol
  end 
  # Playback
  alias hzm_Vol_Audio_bgm_play bgm_play
  def bgm_play(filename, volume=100, pitch=100, pos=0)
        volume = self.volBGM * volume.to_f / 100
        hzm_Vol_Audio_bgm_play(filename, volume, pitch, pos)
  end

  alias hzm_Vol_Audio_bgs_play bgs_play
  def bgs_play(filename, volume=100, pitch=100)
        volume = self.volBGS * volume.to_f / 100
        hzm_Vol_Audio_bgs_play(filename, volume, pitch)
  end

  alias hzm_Vol_Audio_se_play se_play
  def se_play(filename, volume=100, pitch=100)
        volume = self.volSE * volume.to_f / 100
        hzm_Vol_Audio_se_play(filename, volume, pitch)
  end

  alias hzm_Vol_Audio_me_play me_play
  def me_play(filename, volume=100, pitch=100)
        volume = self.volME * volume.to_f / 100
        hzm_Vol_Audio_me_play(filename, volume, pitch)
  end
end
# Add To Menu.
if HZM_VXA::AudioVol::MENU_FLAG
  class Window_MenuCommand
        alias hzm_Vol_Window_MenuCommand_add_original_commands add_original_commands
        def add_original_commands
          hzm_Vol_Window_MenuCommand_add_original_commands
          add_command(HZM_VXA::AudioVol::MENU_NAME, :hzm_vxa_vol) 
        end
  end
  class Scene_Menu
        alias hzm_Vol_create_command_window create_command_window
        def create_command_window
          hzm_Vol_create_command_window
          @command_window.set_handler(:hzm_vxa_vol, method(:hzm_vxa_vol))
        end
 
        def hzm_vxa_vol
          SceneManager.call(HZM_VXA::AudioVol::Scene_VolConfig)
        end
  end
end
# Volume Change Window
module HZM_VXA
  module AudioVol
        class Window_VolConfig < Window_Command
          def initialize
                super(0, 0)
                self.x = (Graphics.width - self.window_width)/2
                self.y = (Graphics.height - self.window_height)/2
          end
       
          def make_command_list
                add_command(HZM_VXA::AudioVol::CONFIG_BGM_NAME,  :bgm)
                add_command(HZM_VXA::AudioVol::CONFIG_BGS_NAME,  :bgs)
                add_command(HZM_VXA::AudioVol::CONFIG_SE_NAME,  :se)
                add_command(HZM_VXA::AudioVol::CONFIG_ME_NAME,  :me)
                add_command(HZM_VXA::AudioVol::CONFIG_EXIT_NAME, :cancel)
          end
       
          def draw_item(index)
                super
                return unless index < 4
                case index
                when 0
                  vol = Audio.volBGM
                when 1
                  vol = Audio.volBGS
                when 2
                  vol = Audio.volSE
                when 3
                  vol = Audio.volME
                end
         
                # Draws vol as a number or as a bar.
                if DISPLAY == :bars
                  y = (index * line_height) + Y_ADJUST
                  draw_gauge(BAR_X, y, BAR_WIDTH, vol / 100.0, normal_color, normal_color)
                else
                  draw_text(item_rect_for_text(index), vol, 2)
                end
          end
       
          def volAdd(index, val)
                case index
                when 0
                  Audio.volBGM += val
                  now = RPG::BGM.last
                  Audio.bgm_play('Audio/BGM/' + now.name, now.volume, now.pitch, now.pos) if now
                when 1
                  Audio.volBGS += val
                when 2
                  Audio.volSE += val
                when 3
                  Audio.volME += val
                end
                Sound.play_cursor
                redraw_item(index)
          end
       
          def cursor_left(wrap = false)
                volAdd(@index, -HZM_VXA::AudioVol::ADD_VOL_NORMAL)
          end
       
          def cursor_right(wrap = false)
                volAdd(@index,  HZM_VXA::AudioVol::ADD_VOL_NORMAL)
          end
       
          def cursor_pageup
                volAdd(@index,  -HZM_VXA::AudioVol::ADD_VOL_HIGH)
          end
       
          def cursor_pagedown
                volAdd(@index,  HZM_VXA::AudioVol::ADD_VOL_HIGH)
          end
        end
 
        class Scene_VolConfig < Scene_MenuBase
          def start
                super
                @command_window = Window_VolConfig.new
                @command_window.viewport = @viewport
                @command_window.set_handler(:cancel,  method(:return_scene))
          end
       
          def terminate
                super
                @command_window.dispose
          end
        end
  end
end
# Reading/Saving
class << DataManager
  alias hzm_Vol_make_save_contents make_save_contents
  def make_save_contents
        contents = hzm_Vol_make_save_contents
        contents[:hzm_vxa_vol]  = {
          :bgm => Audio.volBGM,
          :bgs => Audio.volBGS,
          :se  => Audio.volSE,
          :me  => Audio.volME
        }
        contents
  end

  alias hzm_Vol_extract_save_contents extract_save_contents
  def extract_save_contents(contents)
        hzm_Vol_extract_save_contents(contents)
        Audio.volBGM = contents[:hzm_vxa_vol][:bgm]
        Audio.volBGS = contents[:hzm_vxa_vol][:bgs]
        Audio.volSE  = contents[:hzm_vxa_vol][:se]
        Audio.volME  = contents[:hzm_vxa_vol][:me]
  end
end


Quelques screens :


Paramètres Volume  954169ParamtreVolumepart1

Paramètres Volume  142584ParamtreVolumepart2

LightNox
LightNox
Membre

Nombre de messages : 1759
Age : 33
Localisation : Chez Moi ^^
Date d'inscription : 10/04/2008

Paramètres Volume  Empty Re: Paramètres Volume

Ven 9 Nov 2012 - 17:55
Sympathique merci du partage Wink
Brandobscure
Brandobscure
Membre

Nombre de messages : 528
Age : 27
Localisation : Belgique
Distinction : aucune
Date d'inscription : 03/01/2011

Paramètres Volume  Empty Re: Paramètres Volume

Ven 9 Nov 2012 - 20:01
Merci du partage Very Happy
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 1:21
(Désolé pour le necropost) J'aime beaucoup ce script mais je suis en train de renommer le tout. Parce-qu'un joueur ne comprend pas forcément le "BGM" etc.. Quelqu'un pourrait m'aider à trouver une traduction pour le SE ?
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 3:59
Peut être que "bruitage" fera l'affaire ?
Korndor
Korndor
Staffeux retraité

Nombre de messages : 4959
Age : 110
Localisation : Erem Vehyx
Distinction : Champion de boxe et au lit ! :O [Wax]
Être Mythique [Mister]
Papi Korndor qui a l'ostéoporose [Skillo]
Soldat Ikéa [Coco']
Un bonhomme, un vrai ! [Neresis]
Vieillard acariâtre [Didier Gustin]
Date d'inscription : 16/12/2007
https://www.rpgmakervx-fr.com/

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 4:17
BGM : Fond Musical
BGS : Ambiance
ME : Musique ponctuelle/événementielle ?
SE : Bruitages
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 8:57
Merci pour vos idées mais j'ai encore quelque chose à demander. Ce script est incompatible avec je ne sais quel script, ce qui fait que le jeu plante (si il y a un BGS sur une map) et donc, soit je ne peux pas mettre de BGS en fond sur les maps (sinon, ça plante), soit je dois enlever ce script, auriez-vous des idées pour m'aider ? :x
Korndor
Korndor
Staffeux retraité

Nombre de messages : 4959
Age : 110
Localisation : Erem Vehyx
Distinction : Champion de boxe et au lit ! :O [Wax]
Être Mythique [Mister]
Papi Korndor qui a l'ostéoporose [Skillo]
Soldat Ikéa [Coco']
Un bonhomme, un vrai ! [Neresis]
Vieillard acariâtre [Didier Gustin]
Date d'inscription : 16/12/2007
https://www.rpgmakervx-fr.com/

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 12:28
Quels sont les deux scripts ?
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 13:01
Il fait buguer le Game_Map qui est pourtant un script de base. Je ne sais à cause de quel script.
Je ne sais pas mais voici ce qu'il me dit :
Paramètres Volume  Error-2
Korndor
Korndor
Staffeux retraité

Nombre de messages : 4959
Age : 110
Localisation : Erem Vehyx
Distinction : Champion de boxe et au lit ! :O [Wax]
Être Mythique [Mister]
Papi Korndor qui a l'ostéoporose [Skillo]
Soldat Ikéa [Coco']
Un bonhomme, un vrai ! [Neresis]
Vieillard acariâtre [Didier Gustin]
Date d'inscription : 16/12/2007
https://www.rpgmakervx-fr.com/

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 13:14
Fais-nous la liste de tous tes scripts avec lien vers la version que tu possèdes s'il te plaît Smile
Ou bien upload ton projet et met-le en dl
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 14:08
- Fullscreen ++
- Map name on load fix
- Map Name processing
- temps de jeu dans le menu
- KMS Minimap
- Mode 7 ace
- Nom au dessus des PNJ
- Khas Awesome Light Effects
- Sprite & Window Smooth Sliding
- Volume_Control
Korndor
Korndor
Staffeux retraité

Nombre de messages : 4959
Age : 110
Localisation : Erem Vehyx
Distinction : Champion de boxe et au lit ! :O [Wax]
Être Mythique [Mister]
Papi Korndor qui a l'ostéoporose [Skillo]
Soldat Ikéa [Coco']
Un bonhomme, un vrai ! [Neresis]
Vieillard acariâtre [Didier Gustin]
Date d'inscription : 16/12/2007
https://www.rpgmakervx-fr.com/

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 14:20
Korndor a écrit:Fais-nous la liste de tous tes scripts avec lien vers la version que tu possèdes s'il te plaît Smile
Ou bien upload ton projet et met-le en dl

Je sais que c'est dur de faire des efforts pour que les gens puissent t'aider convenablement, mais considère que t'aider est aussi un effort...
Bénévole et bienveillant en plus Wink

Ce serait plus agréable que tu donnes plu d'informations, car à force de voir quelqu'un arriver en ne postant que des :
"J'ai besoin de ça, ça et ca."
"J'ai un bug de script."
"Il me me faut ça."
"Comment je configure ça ?"
"Il me faut tel et tel truc."

... Eh bien on n'aura tout simplement plus envie de t'aider, avec cette impression d'être pris pour des bonnes poires ou des salariés d'Enterbrain qui sont là pour faire du support pur et simple. Le problème, c'est qu'on n'est pas payés et que notre seule récompense est la bonne ambiance du forum, à laquelle tu n'as (si je ne m'abuse) presque pas contribué jusque là. Wink

Bonne continuation !
Korn'
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 14:33
Ah oui, excuse moi je n'avais pas vu ! ^^

http://www.rpg-maker.fr/scripts-320-fullscreen.html
http://www.rpgmakervxace.net/topic/674-map-name-load-fix/
- temps de jeu dans le menu, je ne me souviens pu ou je l'ai eu alors je le met en spoiler :
Code:

#==============================================================================
# ** Window Time
#------------------------------------------------------------------------------
#  Display Game Time
#==============================================================================
class Window_PlayTime < Window_Base
  def initialize(x, y)
        super(x, y, 160, 60)
        self.contents.font.bold = true
        self.contents.font.size = 25
        self.contents.font.color = normal_color
        refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
        self.contents.clear
        @total_sec = Graphics.frame_count / Graphics.frame_rate
        hour = @total_sec / 60 / 60
        min = @total_sec / 60 % 60
        sec = @total_sec % 60
        ptime = sprintf("%02d:%02d:%02d", hour, min, sec)
        self.contents.draw_text(4, 0, contents.width - 8, contents.height - 4, "Temps : " + ptime, 2)
  end
 
  def update
        super
        if Graphics.frame_count / Graphics.frame_rate != @total_sec
          refresh
        end
  end
end
 
class Scene_Menu < Scene_MenuBase
 
  #--------------------------------------------------------------------------
  # ● start
  #--------------------------------------------------------------------------
  alias flip_playtime_start start
  def start
        flip_playtime_start
        create_playtime_window
  end
 
  #--------------------------------------------------------------------------
  # ● create Playtime Window
  #--------------------------------------------------------------------------
  def create_playtime_window
        @playtime_window = Window_PlayTime.new(0, 308)
  end
end
 
http://forums.rpgmakerweb.com/index.php?/topic/1935-kms-minimap/
http://www.rgss-factory.net/ace-mode-7-ace/
http://www.forum-lepalaisdumaking.com/t1956-rmvx-ace-pnj-name
http://forums.rpgmakerweb.com/index.php?/topic/4917-khas-awesome-light-effects/
http://www.rpgmakervxace.net/topic/1328-sprite-window-smooth-sliding/
et pour finir, le volume control

Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 17:29
Ton soucis vient du script "volume control".

Erreur script "Game map" ligne 329 :
@map.bgs.play if @map.autoplay_bgs

L'erreur vient en ajoutant un BGM auto ainsi qu'un BGS auto sur la carte.

Essaie ce script modifié :

Code:
# encoding: utf-8
#===============================================================================
# �¡ Volume Control For RGSS3
#-------------------------------------------------------------------------------
#�@2011/12/01�@Ru/‚Þ‚Á‚­R
#-------------------------------------------------------------------------------
# English Translation By: Elemental Crisis (http://RPGMakerVXAce.com)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Bug fixes and menu bars added by Kal.
#-------------------------------------------------------------------------------
#
#�@Adds the ability to change volume control.
#
#�@�œ The following methods are added to the Audio Module
#�@Audio.volBGM �c�c Maximum BGM volume setting.
#�@Audio.volBGS �c�c Maximum BGS volume setting.
#�@Audio.volSE  �c�c Maximum SE volume setting.
#�@Audio.volME  �c�c  Maximum ME volume setting.
#�@Audio.volBGM=�”’l �c�cSet BGM maximum volume (0-100)
#�@Audio.volBGM=�”’l �c�c Set BGS maximum volume (0-100)
#�@Audio.volSE=�”’l  �c�c Set SE maximum volume (0-100)
#�@Audio.volME=�”’l  �c�c Set ME maximum volume (0-100)
#
#�@�œ Volume control is added to the main menu.
#
#-------------------------------------------------------------------------------
# �yKnown Issues�z
#�@Created before VXAce's official release so unable to properly test.
#-------------------------------------------------------------------------------
#==============================================================================
# �œ Settings
#==============================================================================
module HZM_VXA
  module AudioVol
        # Display Volume Control on Main Menu?
        # �@true  �c�c Display.
        # �@false �c�c Don't Display.
        MENU_FLAG = true
 
        # Volume Control Name in Main Menu.
        MENU_NAME              = "Volume"
 
        # Volume Control Settings Name.
        CONFIG_BGM_NAME  = "BGM"
        CONFIG_BGS_NAME  = "BGS"
        CONFIG_SE_NAME  = "SE"
        CONFIG_ME_NAME  = "ME"
        CONFIG_EXIT_NAME = "Quitter"
 
        # Volume Change Variation.
        # ADD_VOL_NORMAL �c�c Variation of Left/Right Keys.
        # ADD_VOL_HIGH  �c�c Variation of LR Key.
        ADD_VOL_NORMAL = 5
        ADD_VOL_HIGH  = 25
 
        # Use bars or numbers.
        # :bars  => use bars
        # :numbers  => use numbers
        DISPLAY = :bars
 
        # Bar display options.
        # The higher BAR_X the more to the right the bar is drawn.
        # BAR_WIDTH sets the width of the bar.
        # Y_ADJUST allows you to precisely adjust the y value (how high or low
        # the bar is rendered).
        BAR_X      = 55 
        BAR_WIDTH  = 70
        Y_ADJUST        = -3
  end
end
#==============================================================================
# �ª �@ Settings Above �@ �ª
# �«    Script Below    �«
#==============================================================================
# Additonal Methods.
# class << Audio means we open up the Audio module and all methods defined
# get defined on self (that is, the Audio module itself)
class << Audio

  def volBGM=(vol)
        @hzmVolBGM = normalize_volume(vol)
  end

  def volBGS=(vol)
        @hzmVolBGS = normalize_volume(vol)
  end

  def volSE=(vol)
        @hzmVolSE = normalize_volume(vol)
  end

  def volME=(vol)
        @hzmVolME = normalize_volume(vol)
  end

  def volBGM
        @hzmVolBGM.nil? ? @hzmVolBGM = 100 : @hzmVolBGM
  end

  def volBGS
        @hzmVolBGS.nil? ? @hzmVolBGS = 100 : @hzmVolBGS
  end

  def volSE
        @hzmVolSE.nil? ? @hzmVolSE = 100 : @hzmVolSE
  end

  def volME
        @hzmVolME.nil? ? @hzmVolME = 100 : @hzmVolME
  end

  # Make sure volume does not go over 100 or under 0.
  def normalize_volume(vol)
        vol = 100 if vol > 100
        vol = 0  if vol < 0
        vol
  end 
  # Playback
  alias hzm_Vol_Audio_bgm_play bgm_play
  def bgm_play(filename, volume=100, pitch=100, pos=0)
        volume = self.volBGM * volume.to_f / 100
        hzm_Vol_Audio_bgm_play(filename, volume, pitch, pos)
  end

  alias hzm_Vol_Audio_bgs_play bgs_play
  def bgs_play(filename, volume=100, pitch=100, pos=0)
        volume = self.volBGS * volume.to_f / 100
        hzm_Vol_Audio_bgs_play(filename, volume, pitch, pos)
  end

  alias hzm_Vol_Audio_se_play se_play
  def se_play(filename, volume=100, pitch=100)
        volume = self.volSE * volume.to_f / 100
        hzm_Vol_Audio_se_play(filename, volume, pitch)
  end

  alias hzm_Vol_Audio_me_play me_play
  def me_play(filename, volume=100, pitch=100)
        volume = self.volME * volume.to_f / 100
        hzm_Vol_Audio_me_play(filename, volume, pitch)
  end
end
# Add To Menu.
if HZM_VXA::AudioVol::MENU_FLAG
  class Window_MenuCommand
        alias hzm_Vol_Window_MenuCommand_add_original_commands add_original_commands
        def add_original_commands
          hzm_Vol_Window_MenuCommand_add_original_commands
          add_command(HZM_VXA::AudioVol::MENU_NAME, :hzm_vxa_vol) 
        end
  end
  class Scene_Menu
        alias hzm_Vol_create_command_window create_command_window
        def create_command_window
          hzm_Vol_create_command_window
          @command_window.set_handler(:hzm_vxa_vol, method(:hzm_vxa_vol))
        end
 
        def hzm_vxa_vol
          SceneManager.call(HZM_VXA::AudioVol::Scene_VolConfig)
        end
  end
end
# Volume Change Window
module HZM_VXA
  module AudioVol
        class Window_VolConfig < Window_Command
          def initialize
                super(0, 0)
                self.x = (Graphics.width - self.window_width)/2
                self.y = (Graphics.height - self.window_height)/2
          end
       
          def make_command_list
                add_command(HZM_VXA::AudioVol::CONFIG_BGM_NAME,  :bgm)
                add_command(HZM_VXA::AudioVol::CONFIG_BGS_NAME,  :bgs)
                add_command(HZM_VXA::AudioVol::CONFIG_SE_NAME,  :se)
                add_command(HZM_VXA::AudioVol::CONFIG_ME_NAME,  :me)
                add_command(HZM_VXA::AudioVol::CONFIG_EXIT_NAME, :cancel)
          end
       
          def draw_item(index)
                super
                return unless index < 4
                case index
                when 0
                  vol = Audio.volBGM
                when 1
                  vol = Audio.volBGS
                when 2
                  vol = Audio.volSE
                when 3
                  vol = Audio.volME
                end
         
                # Draws vol as a number or as a bar.
                if DISPLAY == :bars
                  y = (index * line_height) + Y_ADJUST
                  draw_gauge(BAR_X, y, BAR_WIDTH, vol / 100.0, normal_color, normal_color)
                else
                  draw_text(item_rect_for_text(index), vol, 2)
                end
          end
       
          def volAdd(index, val)
                case index
                when 0
                  Audio.volBGM += val
                  now = RPG::BGM.last
                  Audio.bgm_play('Audio/BGM/' + now.name, now.volume, now.pitch, now.pos) if now
                when 1
                  Audio.volBGS += val
                when 2
                  Audio.volSE += val
                when 3
                  Audio.volME += val
                end
                Sound.play_cursor
                redraw_item(index)
          end
       
          def cursor_left(wrap = false)
                volAdd(@index, -HZM_VXA::AudioVol::ADD_VOL_NORMAL)
          end
       
          def cursor_right(wrap = false)
                volAdd(@index,  HZM_VXA::AudioVol::ADD_VOL_NORMAL)
          end
       
          def cursor_pageup
                volAdd(@index,  -HZM_VXA::AudioVol::ADD_VOL_HIGH)
          end
       
          def cursor_pagedown
                volAdd(@index,  HZM_VXA::AudioVol::ADD_VOL_HIGH)
          end
        end
 
        class Scene_VolConfig < Scene_MenuBase
          def start
                super
                @command_window = Window_VolConfig.new
                @command_window.viewport = @viewport
                @command_window.set_handler(:cancel,  method(:return_scene))
          end
       
          def terminate
                super
                @command_window.dispose
          end
        end
  end
end
# Reading/Saving
class << DataManager
  alias hzm_Vol_make_save_contents make_save_contents
  def make_save_contents
        contents = hzm_Vol_make_save_contents
        contents[:hzm_vxa_vol]  = {
          :bgm => Audio.volBGM,
          :bgs => Audio.volBGS,
          :se  => Audio.volSE,
          :me  => Audio.volME
        }
        contents
  end

  alias hzm_Vol_extract_save_contents extract_save_contents
  def extract_save_contents(contents)
        hzm_Vol_extract_save_contents(contents)
        Audio.volBGM = contents[:hzm_vxa_vol][:bgm]
        Audio.volBGS = contents[:hzm_vxa_vol][:bgs]
        Audio.volSE  = contents[:hzm_vxa_vol][:se]
        Audio.volME  = contents[:hzm_vxa_vol][:me]
  end
end


Dernière édition par spywaretof le Dim 26 Mai 2013 - 18:23, édité 1 fois
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 18:39
Un grand merci ! Et comment pourrais-je agrandir la fenêtre en largeur ?
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 18:55
(double post, désolé) j'ai aussi un bug, lorsque je descend le BGS dans le menu de volume, il ne descend pas IG
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 19:21
Test celui-ci :

Code:
# encoding: utf-8
#===============================================================================
# ¡ Volume Control For RGSS3
#-------------------------------------------------------------------------------
#@2011/12/01@Ru/‚Þ‚Á‚­Ru
#-------------------------------------------------------------------------------
# English Translation By:
# Elemental Crisis (http://RPGMakerVXAce.com AND http://RPGCrisis.net)
#
# Bug fixes and menu bars added by Kal.
# BGS fix by NS.
#-------------------------------------------------------------------------------
#@Adds the ability to change volume control.
#
#@œ The following methods are added to the Audio Module
#@Audio.volBGM cc Maximum BGM volume setting.
#@Audio.volBGS cc Maximum BGS volume setting.
#@Audio.volSE  cc Maximum SE volume setting.
#@Audio.volME  cc Maximum ME volume setting.
#@Audio.volBGM=Number cc Set BGM maximum volume (0-100)
#@Audio.volBGM=Number cc Set BGS maximum volume (0-100)
#@Audio.volSE=Number  cc Set SE maximum volume (0-100)
#@Audio.volME=Number  cc Set ME maximum volume (0-100)
#
#@œ Volume control is added to the main menu.
#
#-------------------------------------------------------------------------------
# yKnown Issuesz
#@Created before VXAce's official release so unable to properly test.
#-------------------------------------------------------------------------------

#==============================================================================
# œ Settings
#==============================================================================
module HZM_VXA
  module AudioVol
        # Display Volume Control on Main Menu?
        # true  cc Display.
        # false cc Don't Display.
        MENU_FLAG = true
   
        # Volume Control Name in Main Menu.
        MENU_NAME      = "Volume"
   
        # Volume Control Settings Name.
        CONFIG_BGM_NAME  = "BGM"
        CONFIG_BGS_NAME  = "BGS"
        CONFIG_SE_NAME  = "SE"
        CONFIG_ME_NAME  = "ME"
        CONFIG_EXIT_NAME = "Exit"
   
        # Volume Change Variation.
        # ADD_VOL_NORMAL cc Variation of Left/Right Keys.
        # ADD_VOL_HIGH  cc Variation of LR Key.
        ADD_VOL_NORMAL = 5
        ADD_VOL_HIGH  = 25
 
        # Use bars or numbers.
        # :bars  => use bars
        # :numbers  => use numbers
        DISPLAY = :bars
 
        # Bar display options.
        # The higher BAR_X the more to the right the bar is drawn.
        # BAR_WIDTH sets the width of the bar.
        # Y_ADJUST allows you to precisely adjust the y value (how high or low
        # the bar is rendered).
        BAR_X      = 55 
        BAR_WIDTH  = 70
        Y_ADJUST        = -3
  end
end

#==============================================================================
# ª @ Settings Above @ ª
# «    Script Below    «
#==============================================================================
# Additonal Methods.
# class << Audio means we open up the Audio module and all methods defined
# get defined on self (that is, the Audio module itself)
class << Audio

  def volBGM=(vol)
        @hzmVolBGM = normalize_volume(vol)
  end

  def volBGS=(vol)
        @hzmVolBGS = normalize_volume(vol)
  end

  def volSE=(vol)
        @hzmVolSE = normalize_volume(vol)
  end

  def volME=(vol)
        @hzmVolME = normalize_volume(vol)
  end

  def volBGM
        @hzmVolBGM.nil? ? @hzmVolBGM = 100 : @hzmVolBGM
  end

  def volBGS
        @hzmVolBGS.nil? ? @hzmVolBGS = 100 : @hzmVolBGS
  end

  def volSE
        @hzmVolSE.nil? ? @hzmVolSE = 100 : @hzmVolSE
  end

  def volME
        @hzmVolME.nil? ? @hzmVolME = 100 : @hzmVolME
  end

  # Make sure volume does not go over 100 or under 0.
  def normalize_volume(vol)
        vol = 100 if vol > 100
        vol = 0  if vol < 0
        vol
  end 
  # Playback
  alias hzm_Vol_Audio_bgm_play bgm_play
  def bgm_play(filename, volume=100, pitch=100, pos=0)
        volume = self.volBGM * volume.to_f / 100
        hzm_Vol_Audio_bgm_play(filename, volume, pitch, pos)
  end

  alias hzm_Vol_Audio_bgs_play bgs_play
  def bgs_play(filename, volume=100, pitch=100, pos=0)
        volume = self.volBGS * volume.to_f / 100
        hzm_Vol_Audio_bgs_play(filename, volume, pitch, pos)
  end

  alias hzm_Vol_Audio_se_play se_play
  def se_play(filename, volume=100, pitch=100)
        volume = self.volSE * volume.to_f / 100
        hzm_Vol_Audio_se_play(filename, volume, pitch)
  end

  alias hzm_Vol_Audio_me_play me_play
  def me_play(filename, volume=100, pitch=100)
        volume = self.volME * volume.to_f / 100
        hzm_Vol_Audio_me_play(filename, volume, pitch)
  end
end
# Add To Menu.
if HZM_VXA::AudioVol::MENU_FLAG
  class Window_MenuCommand
        alias hzm_Vol_Window_MenuCommand_add_original_commands add_original_commands
        def add_original_commands
          hzm_Vol_Window_MenuCommand_add_original_commands
          add_command(HZM_VXA::AudioVol::MENU_NAME, :hzm_vxa_vol) 
        end
  end
  class Scene_Menu
        alias hzm_Vol_create_command_window create_command_window
        def create_command_window
          hzm_Vol_create_command_window
          @command_window.set_handler(:hzm_vxa_vol, method(:hzm_vxa_vol))
        end
 
        def hzm_vxa_vol
          SceneManager.call(HZM_VXA::AudioVol::Scene_VolConfig)
        end
  end
end
# Volume Change Window
module HZM_VXA
  module AudioVol
        class Window_VolConfig < Window_Command
          def initialize
                super(0, 0)
                self.x = (Graphics.width - self.window_width)/2
                self.y = (Graphics.height - self.window_height)/2
          end
       
          def make_command_list
                add_command(HZM_VXA::AudioVol::CONFIG_BGM_NAME,  :bgm)
                add_command(HZM_VXA::AudioVol::CONFIG_BGS_NAME,  :bgs)
                add_command(HZM_VXA::AudioVol::CONFIG_SE_NAME,  :se)
                add_command(HZM_VXA::AudioVol::CONFIG_ME_NAME,  :me)
                add_command(HZM_VXA::AudioVol::CONFIG_EXIT_NAME, :cancel)
          end
       
          def draw_item(index)
                super
                return unless index < 4
                case index
                when 0
                  vol = Audio.volBGM
                when 1
                  vol = Audio.volBGS
                when 2
                  vol = Audio.volSE
                when 3
                  vol = Audio.volME
                end
         
                # Draws vol as a number or as a bar.
                if DISPLAY == :bars
                  y = (index * line_height) + Y_ADJUST
                  draw_gauge(BAR_X, y, BAR_WIDTH, vol / 100.0, normal_color, normal_color)
                else
                  draw_text(item_rect_for_text(index), vol, 2)
                end
          end
       
          def volAdd(index, val)
                case index
                when 0
                  Audio.volBGM += val
                  now = RPG::BGM.last
                  Audio.bgm_play('Audio/BGM/' + now.name, now.volume, now.pitch, now.pos) if now
                when 1
                  Audio.volBGS += val
                  now = RPG::BGS.last
                  Audio.bgs_play('Audio/BGS/' + now.name, now.volume, now.pitch, now.pos) if now
                when 2
                  Audio.volSE += val
                when 3
                  Audio.volME += val
                end
                Sound.play_cursor
                redraw_item(index)
          end
       
          def cursor_left(wrap = false)
                volAdd(@index, -HZM_VXA::AudioVol::ADD_VOL_NORMAL)
          end
       
          def cursor_right(wrap = false)
                volAdd(@index,  HZM_VXA::AudioVol::ADD_VOL_NORMAL)
          end
       
          def cursor_pageup
                volAdd(@index,  -HZM_VXA::AudioVol::ADD_VOL_HIGH)
          end
       
          def cursor_pagedown
                volAdd(@index,  HZM_VXA::AudioVol::ADD_VOL_HIGH)
          end
        end
 
        class Scene_VolConfig < Scene_MenuBase
          def start
                super
                @command_window = Window_VolConfig.new
                @command_window.viewport = @viewport
                @command_window.set_handler(:cancel,  method(:return_scene))
          end
       
          def terminate
                super
                @command_window.dispose
          end
        end
  end
end
# Reading/Saving
class << DataManager
  alias hzm_Vol_make_save_contents make_save_contents
  def make_save_contents
        contents = hzm_Vol_make_save_contents
        contents[:hzm_vxa_vol]  = {
          :bgm => Audio.volBGM,
          :bgs => Audio.volBGS,
          :se  => Audio.volSE,
          :me  => Audio.volME
        }
        contents
  end

  alias hzm_Vol_extract_save_contents extract_save_contents
  def extract_save_contents(contents)
        hzm_Vol_extract_save_contents(contents)
        Audio.volBGM = contents[:hzm_vxa_vol][:bgm]
        Audio.volBGS = contents[:hzm_vxa_vol][:bgs]
        Audio.volSE  = contents[:hzm_vxa_vol][:se]
        Audio.volME  = contents[:hzm_vxa_vol][:me]
  end
end
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 19:27
PARFAIT ! UN ENORME MERCI ! Comment on fait pour mettre des points de participation ? Je te met tout ce que je peux xD

Ps : comment agrandir la largeur du menu volume (j'ai changé BGM par Musique etc.. ducoup ça rentre dans la barre)
Elisa'
Elisa'
Staffeux retraité

Nombre de messages : 2924
Age : 26
Localisation : Par là-bas !
Distinction : Mon héritière que je chéris Paramètres Volume  344805Paramètres Volume  344805
[Coco' Smile]
Plus que 2 ans avant d'épouser Coco' ! Compte à rebours lancé !
[Auto-distinction]

Adepte du "Je le savais" alors qu'elle le savait pas.
Date d'inscription : 30/05/2009

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 20:01
+3 points de participation pour spywaretof Smile
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 20:13
Alors, des idées pour agrandir en largeur la fenêtre ? ^^ Quand je note Musique à la place de BGM, ça rentre dans la barre. Et j'aimerais pas :/
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 21:43
Tanks Elisa Smile

Je fais ça dès que j'ai le temps Undweed.
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 21:54
Merci Smile j attends alors. Merci d'avance. J ai mis Musique, Ambiance, Bruitage, Extra Smile
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 22:20

Alors deux chose à faire.

1) Aller dans le script Window_Command et changer la ligne 23

Changer :

Code:
 return 160
Par :

Code:
 return 185

2) Ton script modifié :

Code:
# encoding: utf-8
#===============================================================================
# ¡ Volume Control For RGSS3
#-------------------------------------------------------------------------------
#@2011/12/01@Ru/‚Þ‚Á‚­Ru
#-------------------------------------------------------------------------------
# English Translation By:
# Elemental Crisis (http://RPGMakerVXAce.com AND http://RPGCrisis.net)
#
# Bug fixes and menu bars added by Kal.
# BGS fix by NS.
#-------------------------------------------------------------------------------
#@Adds the ability to change volume control.
#
#@œ The following methods are added to the Audio Module
#@Audio.volBGM cc Maximum BGM volume setting.
#@Audio.volBGS cc Maximum BGS volume setting.
#@Audio.volSE  cc Maximum SE volume setting.
#@Audio.volME  cc Maximum ME volume setting.
#@Audio.volBGM=Number cc Set BGM maximum volume (0-100)
#@Audio.volBGM=Number cc Set BGS maximum volume (0-100)
#@Audio.volSE=Number  cc Set SE maximum volume (0-100)
#@Audio.volME=Number  cc Set ME maximum volume (0-100)
#
#@œ Volume control is added to the main menu.
#
#-------------------------------------------------------------------------------
# yKnown Issuesz
#@Created before VXAce's official release so unable to properly test.
#-------------------------------------------------------------------------------

#==============================================================================
# œ Settings
#==============================================================================
module HZM_VXA
  module AudioVol
        # Display Volume Control on Main Menu?
        # true  cc Display.
        # false cc Don't Display.
        MENU_FLAG = true
   
        # Volume Control Name in Main Menu.
        MENU_NAME      = "Volume"
   
        # Volume Control Settings Name.
        CONFIG_BGM_NAME  = "Musique"
        CONFIG_BGS_NAME  = "Ambiance"
        CONFIG_SE_NAME  = "Bruitage"
        CONFIG_ME_NAME  = "Extra"
        CONFIG_EXIT_NAME = "Exit"
   
        # Volume Change Variation.
        # ADD_VOL_NORMAL cc Variation of Left/Right Keys.
        # ADD_VOL_HIGH  cc Variation of LR Key.
        ADD_VOL_NORMAL = 5
        ADD_VOL_HIGH  = 25
 
        # Use bars or numbers.
        # :bars  => use bars
        # :numbers  => use numbers
        DISPLAY = :bars
 
        # Bar display options.
        # The higher BAR_X the more to the right the bar is drawn.
        # BAR_WIDTH sets the width of the bar.
        # Y_ADJUST allows you to precisely adjust the y value (how high or low
        # the bar is rendered).
        BAR_X      = 87 
        BAR_WIDTH  = 70
        Y_ADJUST        = -6
  end
end

#==============================================================================
# ª @ Settings Above @ ª
# «    Script Below    «
#==============================================================================
# Additonal Methods.
# class << Audio means we open up the Audio module and all methods defined
# get defined on self (that is, the Audio module itself)
class << Audio

  def volBGM=(vol)
        @hzmVolBGM = normalize_volume(vol)
  end

  def volBGS=(vol)
        @hzmVolBGS = normalize_volume(vol)
  end

  def volSE=(vol)
        @hzmVolSE = normalize_volume(vol)
  end

  def volME=(vol)
        @hzmVolME = normalize_volume(vol)
  end

  def volBGM
        @hzmVolBGM.nil? ? @hzmVolBGM = 100 : @hzmVolBGM
  end

  def volBGS
        @hzmVolBGS.nil? ? @hzmVolBGS = 100 : @hzmVolBGS
  end

  def volSE
        @hzmVolSE.nil? ? @hzmVolSE = 100 : @hzmVolSE
  end

  def volME
        @hzmVolME.nil? ? @hzmVolME = 100 : @hzmVolME
  end

  # Make sure volume does not go over 100 or under 0.
  def normalize_volume(vol)
        vol = 100 if vol > 100
        vol = 0  if vol < 0
        vol
  end 
  # Playback
  alias hzm_Vol_Audio_bgm_play bgm_play
  def bgm_play(filename, volume=100, pitch=100, pos=0)
        volume = self.volBGM * volume.to_f / 100
        hzm_Vol_Audio_bgm_play(filename, volume, pitch, pos)
  end

  alias hzm_Vol_Audio_bgs_play bgs_play
  def bgs_play(filename, volume=100, pitch=100, pos=0)
        volume = self.volBGS * volume.to_f / 100
        hzm_Vol_Audio_bgs_play(filename, volume, pitch, pos)
  end

  alias hzm_Vol_Audio_se_play se_play
  def se_play(filename, volume=100, pitch=100)
        volume = self.volSE * volume.to_f / 100
        hzm_Vol_Audio_se_play(filename, volume, pitch)
  end

  alias hzm_Vol_Audio_me_play me_play
  def me_play(filename, volume=100, pitch=100)
        volume = self.volME * volume.to_f / 100
        hzm_Vol_Audio_me_play(filename, volume, pitch)
  end
end
# Add To Menu.
if HZM_VXA::AudioVol::MENU_FLAG
  class Window_MenuCommand
        alias hzm_Vol_Window_MenuCommand_add_original_commands add_original_commands
        def add_original_commands
          hzm_Vol_Window_MenuCommand_add_original_commands
          add_command(HZM_VXA::AudioVol::MENU_NAME, :hzm_vxa_vol) 
        end
  end
  class Scene_Menu
        alias hzm_Vol_create_command_window create_command_window
        def create_command_window
          hzm_Vol_create_command_window
          @command_window.set_handler(:hzm_vxa_vol, method(:hzm_vxa_vol))
        end
 
        def hzm_vxa_vol
          SceneManager.call(HZM_VXA::AudioVol::Scene_VolConfig)
        end
  end
end
# Volume Change Window
module HZM_VXA
  module AudioVol
        class Window_VolConfig < Window_Command
          def initialize
                super(0,0)
                self.x = (Graphics.width - self.window_width)/2
                self.y = (Graphics.height - self.window_height)/2
          end
          def make_command_list
                add_command(HZM_VXA::AudioVol::CONFIG_BGM_NAME,  :bgm)
                add_command(HZM_VXA::AudioVol::CONFIG_BGS_NAME,  :bgs)
                add_command(HZM_VXA::AudioVol::CONFIG_SE_NAME,  :se)
                add_command(HZM_VXA::AudioVol::CONFIG_ME_NAME,  :me)
                add_command(HZM_VXA::AudioVol::CONFIG_EXIT_NAME, :cancel)
          end
       
          def draw_item(index)
                super
                return unless index < 4
                case index
                when 0
                  vol = Audio.volBGM
                when 1
                  vol = Audio.volBGS
                when 2
                  vol = Audio.volSE
                when 3
                  vol = Audio.volME
                end
         
                # Draws vol as a number or as a bar.
                if DISPLAY == :bars
                  y = (index * line_height) + Y_ADJUST
                  draw_gauge(BAR_X, y, BAR_WIDTH, vol / 100.0, normal_color, normal_color)
                else
                  draw_text(item_rect_for_text(index), vol, 2)
                end
          end
       
          def volAdd(index, val)
                case index
                when 0
                  Audio.volBGM += val
                  now = RPG::BGM.last
                  Audio.bgm_play('Audio/BGM/' + now.name, now.volume, now.pitch, now.pos) if now
                when 1
                  Audio.volBGS += val
                  now = RPG::BGS.last
                  Audio.bgs_play('Audio/BGS/' + now.name, now.volume, now.pitch, now.pos) if now
                when 2
                  Audio.volSE += val
                when 3
                  Audio.volME += val
                end
                Sound.play_cursor
                redraw_item(index)
          end
       
          def cursor_left(wrap = false)
                volAdd(@index, -HZM_VXA::AudioVol::ADD_VOL_NORMAL)
          end
       
          def cursor_right(wrap = false)
                volAdd(@index,  HZM_VXA::AudioVol::ADD_VOL_NORMAL)
          end
       
          def cursor_pageup
                volAdd(@index,  -HZM_VXA::AudioVol::ADD_VOL_HIGH)
          end
       
          def cursor_pagedown
                volAdd(@index,  HZM_VXA::AudioVol::ADD_VOL_HIGH)
          end
        end
 
        class Scene_VolConfig < Scene_MenuBase
          def start
                super
                @command_window = Window_VolConfig.new
                @command_window.viewport = @viewport
                @command_window.set_handler(:cancel,  method(:return_scene))
          end
             
          def terminate
                super
                @command_window.dispose
          end
        end
  end
end
# Reading/Saving
class << DataManager
  alias hzm_Vol_make_save_contents make_save_contents
  def make_save_contents
        contents = hzm_Vol_make_save_contents
        contents[:hzm_vxa_vol]  = {
          :bgm => Audio.volBGM,
          :bgs => Audio.volBGS,
          :se  => Audio.volSE,
          :me  => Audio.volME
        }
        contents
  end

  alias hzm_Vol_extract_save_contents extract_save_contents
  def extract_save_contents(contents)
        hzm_Vol_extract_save_contents(contents)
        Audio.volBGM = contents[:hzm_vxa_vol][:bgm]
        Audio.volBGS = contents[:hzm_vxa_vol][:bgs]
        Audio.volSE  = contents[:hzm_vxa_vol][:se]
        Audio.volME  = contents[:hzm_vxa_vol][:me]
  end
end

Voila.
Undweed
Undweed
Membre

Nombre de messages : 51
Distinction : aucune
Date d'inscription : 15/09/2012

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 22:26
Tu es SU-PER sans rire, comment on donne des points de participation ?

Balbereith : Seul le staff peut distribuer des points ;-)
Spytje
Spytje
Administrateur

Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008

Paramètres Volume  Empty Re: Paramètres Volume

Dim 26 Mai 2013 - 22:30
De rien, c'est déjà fais pour les points merci Smile
Contenu sponsorisé

Paramètres Volume  Empty Re: Paramètres Volume

Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum