This script is for people that have certains OS that cant silence programs manually
or if you thing that this system is better. Using this script you can use rpg maker
while listening music, for example.
Note that im open to feedback, suggestions and corrections.
or if you thing that this system is better. Using this script you can use rpg maker
while listening music, for example.
Note that im open to feedback, suggestions and corrections.
Code:
#==============================================================================
# Game silenced mode
# By gerkrt/gerrtunk
# Version: 1
# License: MIT, credits
# Date: 10/04/2012
# IMPORTANT NOTE: to acces the more actualitzed or corrected version of this
# script check here: [url=http://usuarios.multimania.es/kisap/english_list.html]http://usuarios.multimania.es/kisap/english_list.html[/url] or my
# pastebin here: [url=http://pastebin.com/u/gerkrt]http://pastebin.com/u/gerkrt[/url]
#==============================================================================
=begin
------- INTRODUCTION ----------
This script is for people that have certains OS that cant silence programs manually
or if you thing that this system is better. Using this script you can use rpg maker
while listening music, for example.
Note that im open to feedback, suggestions and corrections.
------ USE ---------
Is very simple to use. Just put the option Silenced_game to = true and the game will
skip all the music. And = false for the oposite.
Note that you can erase this script for final or public versions as it isnt used
for normal players.
=end
module Wep
Silenced_game = false
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# Esta clase almacena las variables sobre datos y comandos del sistema, como
# la reproducción de música y sonido, el windowskin, temporizador, etc
# Llama a $game_system para acceder a las variables incluidas aquÃ.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Reproducción de Sonidos
# A partir de aquà están las métodos que incluyen los datos sobre la
# reproducción de todo tipo de sonido(música, ambiente, efecto sonoro, etc)
# Para que los comandos de reproducción funcionen corréctamente la variable
# que contiene el archivo de sonido debe ser la clase RPG::AudioFile
# y contener en su método de inicio (nombre, volúmen, tono)
# Puedes llamar a esta clase con el siguiente método:
# RPG::AudioFile.new(nombre, volúmen, tono)
# Los valores por defecto son ("", 100, 100)
#--------------------------------------------------------------------------
# * Reproducir Música
# "bgm" es la variable que incluye el archivo que se reproduce
#--------------------------------------------------------------------------
alias wep_gs_bgm_play bgm_play
def bgm_play(bgm)
if Wep::Silenced_game
return
end
wep_gs_bgm_play(bgm)
end
#--------------------------------------------------------------------------
# * Reproducir Sonido de Fondo
# "bgs" es la variable que incluye el archivo que se reproduce
#--------------------------------------------------------------------------
alias wep_gs_bgs_play bgs_play
def bgs_play(bgs)
if Wep::Silenced_game
return
end
wep_gs_bgs_play(bgs)
end
#--------------------------------------------------------------------------
# * Reproducir Efecto Musical
# "me" es ña variable que incluye el archivo que se reproducirá
#--------------------------------------------------------------------------
alias wep_gs_me_play me_play
def me_play(me)
if Wep::Silenced_game
return
end
wep_gs_me_play(me)
end
#--------------------------------------------------------------------------
# * Reproducir Efecto Sonoro
# "se" es el archivo que se reproducirá
#--------------------------------------------------------------------------
alias wep_gs_se_play se_play
def se_play(se)
if Wep::Silenced_game
return
end
wep_gs_se_play(se)
end
end
module Wep
Scripts_list = [] unless defined? Scripts_list
Scripts_list.push ('Game silenced mode')
end