class Window_Options < Window_Selectable
def initialize
super(0, 0, 460, 380)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 18
self.index = 0
self.visible = true
refresh
end
def refresh
self.contents.clear
@item_max = 7
self.contents.draw_text(4, 0, 120, 32, "Music Effect")
self.contents.draw_text(120, 0, 600, 32, "__________________________")
self.contents.draw_text(123, 23, 600, 32, "0 15 25 50 55 75 95 100")
self.contents.draw_text(4, 60, 120, 32, "Sound Effect")
self.contents.draw_text(120, 60, 600, 32, "__________________________")
self.contents.draw_text(123, 83, 600, 32, "0 15 25 50 55 75 95 100")
self.contents.draw_text(4, 130, 120, 32, "Screen Tone")
self.contents.draw_text(120, 130, 600, 32, "__________________________")
self.contents.draw_text(123, 153, 600, 32, "0 15 25 50 55 75 95 100")
self.contents.draw_text(4, 200, 120, 32, "Back-Design")
self.contents.draw_text(190, 200, 600, 32, ($game_system.skin_name).to_s)
self.contents.draw_text(4, 245, 120, 32, "BGM Music")
self.contents.draw_text(190, 245, 600, 32, ($game_system.music_name).to_s)
self.contents.draw_text(4, 275, 120, 32, "Game-Font")
self.contents.draw_text(190, 275, 600, 32, ($game_system.fonts_name).to_s)
self.contents.draw_text(4, 305, 120, 32, "Font-Size")
self.contents.draw_text(190, 305, 600, 32, ($game_system.fonts_size).to_s)
end
def update_cursor_rect
self.cursor_rect.empty
end
end
class Scene_Options
def main
@spriteset = Spriteset_Map.new
@scale = Sprite.new
@scale.bitmap = RPG::Cache.picture("scale")
@scale.x = $game_music.cursor_position
@scale.y = 25
@scale.z = 800
@scale1 = Sprite.new
@scale1.bitmap = RPG::Cache.picture("scale1")
@scale1.x = $game_music.cursor1_position
@scale1.y = 85
@scale1.z = 800
@scale2 = Sprite.new
@scale2.bitmap = RPG::Cache.picture("scale2")
@scale2.x = $game_music.cursor2_position
@scale2.y = 155
@scale2.z = 800
@sd1 = Sprite.new
@sd1.bitmap = RPG::Cache.picture("side1")
@sd1.x = 120
@sd1.y = 190
@sd1.z = 800
@sd2 = Sprite.new
@sd2.bitmap = RPG::Cache.picture("side2")
@sd2.x = 260
@sd2.y = 190
@sd2.z = 800
@sd3 = Sprite.new
@sd3.bitmap = RPG::Cache.picture("side1")
@sd3.x = 120
@sd3.y = 230
@sd3.z = 800
@sd4 = Sprite.new
@sd4.bitmap = RPG::Cache.picture("side2")
@sd4.x = 260
@sd4.y = 230
@sd4.z = 800
@sd5 = Sprite.new
@sd5.bitmap = RPG::Cache.picture("side1")
@sd5.x = 120
@sd5.y = 260
@sd5.z = 800
@sd6 = Sprite.new
@sd6.bitmap = RPG::Cache.picture("side2")
@sd6.x = 300
@sd6.y = 260
@sd6.z = 800
@sd7 = Sprite.new
@sd7.bitmap = RPG::Cache.picture("side1")
@sd7.x = 120
@sd7.y = 290
@sd7.z = 800
@sd8 = Sprite.new
@sd8.bitmap = RPG::Cache.picture("side2")
@sd8.x = 260
@sd8.y = 290
@sd8.z = 800
@cur = Sprite.new
@cur.bitmap = RPG::Cache.picture("hand")
@cur.z = 900
@cur.x = 345
@cur.y = 35
@options = Window_Options.new
@options.active = true
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@spriteset.dispose
@options.dispose
@scale.dispose
@scale1.dispose
@scale2.dispose
@cur.dispose
@sd1.dispose
@sd2.dispose
@sd3.dispose
@sd4.dispose
@sd5.dispose
@sd6.dispose
@sd7.dispose
@sd8.dispose
end
def update
@spriteset.update
@options.update
@scale.update
@scale1.update
@scale2.update
@cur.update
@sd1.update
@sd2.update
@sd3.update
@sd4.update
@sd5.update
@sd6.update
@sd7.update
@sd8.update
if @options.active
update_options
return
end
end
def update_options
#music
case $game_music.current_number
when 0
$game_music.bgm_volume = 0
$game_system.bgm_play($game_system.bgm_memorize)
when 1
$game_music.bgm_volume = 15
$game_system.bgm_play($game_system.bgm_memorize)
when 2
$game_music.bgm_volume = 25
$game_system.bgm_play($game_system.bgm_memorize)
when 3
$game_music.bgm_volume = 25
$game_system.bgm_play($game_system.bgm_memorize)
when 4
$game_music.bgm_volume = 50
$game_system.bgm_play($game_system.bgm_memorize)
when 5
$game_music.bgm_volume = 75
$game_system.bgm_play($game_system.bgm_memorize)
when 6
$game_music.bgm_volume = 95
$game_system.bgm_play($game_system.bgm_memorize)
when 7
$game_music.bgm_volume = 100
$game_system.bgm_play($game_system.bgm_memorize)
end
case $game_music.current1_number
when 0
$game_music.se_volume = 0
when 1
$game_music.se_volume = 15
when 2
$game_music.se_volume = 25
when 3
$game_music.se_volume = 25
when 4
$game_music.se_volume = 50
when 5
$game_music.se_volume = 75
when 6
$game_music.se_volume = 95
when 7
$game_music.se_volume = 100
end
case $game_music.current2_number
when 0
$game_screen.start_tone_change($game_music.tone0,10)
$game_screen.update
when 1
$game_screen.start_tone_change($game_music.tone1,10)
$game_screen.update
when 2
$game_screen.start_tone_change($game_music.tone2,10)
$game_screen.update
when 3
$game_screen.start_tone_change($game_music.tone3,10)
$game_screen.update
when 4
$game_screen.start_tone_change($game_music.tone4,10)
$game_screen.update
when 5
$game_screen.start_tone_change($game_music.tone5,10)
$game_screen.update
when 6
$game_screen.start_tone_change($game_music.tone6,10)
$game_screen.update
when 7
$game_screen.start_tone_change($game_music.tone7,10)
$game_screen.update
end
case @options.index
when 0
@cur.y = 35
when 1
@cur.y = 95
when 2
@cur.y = 165
when 3
@cur.y = 233
when 4
@cur.y = 274
when 5
@cur.y = 305
when 6
@cur.y = 335
end
#music
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$game_music.cursor_position = @scale.x
$game_music.cursor1_position = @scale1.x
$game_music.cursor2_position = @scale2.x
$scene = Scene_Menu.new(5)
return
end
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.decision_se)
case @options.index
when 0
if @scale.x == 310
$game_system.se_play($data_system.buzzer_se)
return
end
unless @scale.x == 280
@scale.x += 25
$game_music.current_number += 1
else
@scale.x += 30
$game_music.current_number += 1
end
when 1
if @scale1.x == 310
$game_system.se_play($data_system.buzzer_se)
return
end
unless @scale1.x == 280
@scale1.x += 25
$game_music.current1_number += 1
else
@scale1.x += 30
$game_music.current1_number += 1
end
when 2
if @scale2.x == 310
$game_system.se_play($data_system.buzzer_se)
return
end
unless @scale2.x == 280
@scale2.x += 25
$game_music.current2_number += 1
else
@scale2.x += 30
$game_music.current2_number += 1
end
when 3
$game_system.next_skin
@options.refresh
when 4
$game_system.next_music
@options.refresh
when 5
$game_system.next_font
$game_system.map_interpreter.update
@options.refresh
when 6
$game_system.next_size
@options.refresh
end
end
if Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.decision_se)
case @options.index
when 0
if @scale.x == 130
$game_system.se_play($data_system.buzzer_se)
return
end
unless @scale.x == 310
@scale.x -= 25
$game_music.current_number -= 1
else
@scale.x -= 30
$game_music.current_number -= 1
end
when 1
if @scale1.x == 130
$game_system.se_play($data_system.buzzer_se)
return
end
unless @scale1.x == 310
@scale1.x -= 25
$game_music.current1_number -= 1
else
@scale1.x -= 30
$game_music.current1_number -= 1
end
when 2
if @scale2.x == 130
$game_system.se_play($data_system.buzzer_se)
return
end
unless @scale2.x == 310
@scale2.x -= 25
$game_music.current2_number -= 1
else
@scale2.x -= 30
$game_music.current2_number -= 1
end
when 3
$game_system.prev_skin
@options.refresh
when 4
$game_system.prev_music
@options.refresh
when 5
$game_system.prev_font
$game_system.map_interpreter.update
@options.refresh
when 6
$game_system.prev_size
@options.refresh
end
end
end#end of function
end#end of Scene_Options
the make another script below the game_system script and add this
CODE
class Game_Options
attr_accessor :bgm_volume
attr_accessor :se_volume
attr_accessor :cursor_position
attr_accessor :current_number
attr_accessor :cursor1_position
attr_accessor :current1_number
attr_accessor :current2_number
attr_accessor :cursor2_position
attr_accessor :tone0
attr_accessor :tone1
attr_accessor :tone2
attr_accessor :tone3
attr_accessor :tone4
attr_accessor :tone5
attr_accessor :tone6
attr_accessor :tone7
def initialize
@bgm_volume = 100
@se_volume = 100
@cursor_position = 310
@current_number = 7
@cursor1_position = 310
@current1_number = 7
@cursor2_position = 130
@current2_number = 0
@tone0 = Tone.new(0,0,0,0)
@tone1 = Tone.new(-34,-34,-34, 153)
@tone2 = Tone.new(-17,-17,-17,153)
@tone3 = Tone.new(0,0,0,170)
@tone4 = Tone.new(17,17,17,170)
@tone5 = Tone.new(34,34,34,170)
@tone6 = Tone.new(51,51,51,170)
@tone7 = Tone.new(68,68, 68, 187)
end
end
then replace your Game_system script with this if you have not edited it
CODE
#==============================================================================
# â– Game_System
#------------------------------------------------------------------------------
#  システム周りã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ã†ã‚¯ãƒ©ã‚¹ã§ã™ã€‚BGM ãªã©ã®ç®¡ç†ã‚‚è¡Œã„ã¾ã™ã€‚ã“ã®ã‚¯ãƒ©ã‚¹
# ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ $game_system ã§å‚ç…§ã•ã‚Œã¾ã™ã€‚
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# ◠公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :map_interpreter # マップイベント用インタプリタ
attr_reader :battle_interpreter # ãƒãƒˆãƒ«ã‚¤ãƒ™ãƒ³ãƒˆç”¨ã‚¤ãƒ³ã‚¿ãƒ—リタ
attr_accessor :timer # タイマー
attr_accessor :timer_working # タイマー作動ä¸ãƒ•ãƒ©ã‚°
attr_accessor :save_disabled # セーブç¦æ¢
attr_accessor :menu_disabled # メニューç¦æ¢
attr_accessor :encounter_disabled # エンカウントç¦æ¢
attr_accessor :message_position # æ–‡ç« ã‚ªãƒ—ã‚·ãƒ§ãƒ³ 表示ä½ç½®
attr_accessor :message_frame # æ–‡ç« ã‚ªãƒ—ã‚·ãƒ§ãƒ³ ウィンドウæž
attr_accessor :save_count # セーブ回数
attr_accessor :magic_number # マジックナンãƒãƒ¼
attr_accessor :skin_name
attr_accessor :music_name
attr_accessor :fonts_name
attr_accessor :fonts_size
attr_accessor :current_x
attr_accessor :current_y
attr_accessor :npc_name
attr_accessor :skip
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
@map_interpreter = Interpreter.new(0, true)
@battle_interpreter = Interpreter.new(0, false)
@timer = 0
@timer_working = false
@save_disabled = false
@menu_disabled = false
@encounter_disabled = false
@message_position = 2
@message_frame = 0
@save_count = 0
@magic_number = 0
@skin_name = ""
@music_name = ""
@fonts_name = $fontface
@fonts_size = 18
@current_x = 428
@current_y = 103
@npc_name = ""
@skip = false
end
#--------------------------------------------------------------------------
# â— BGM ã®æ¼”å¥
# bgm : æ¼”å¥ã™ã‚‹ BGM
#--------------------------------------------------------------------------
def bgm_play(bgm)
@playing_bgm = bgm
#@music_name = bgm.name
if bgm != nil and bgm.name != ""
Audio.bgm_play("Audio/BGM/" + bgm.name , bgm.volume*$game_music.bgm_volume/100, bgm.pitch)
else
Audio.bgm_stop
end
Graphics.frame_reset
end
#--------------------------------------------------------------------------
# â— BGM ã®åœæ¢
#--------------------------------------------------------------------------
def bgm_stop
Audio.bgm_stop
end
#--------------------------------------------------------------------------
# â— BGM ã®ãƒ•ã‚§ãƒ¼ãƒ‰ã‚¢ã‚¦ãƒˆ
# time : フェードアウト時間 (秒)
#--------------------------------------------------------------------------
def bgm_fade(time)
@playing_bgm = nil
Audio.bgm_fade(time * 1000)
end
#--------------------------------------------------------------------------
# â— BGM ã®è¨˜æ†¶
#--------------------------------------------------------------------------
def bgm_memorize
@memorized_bgm = @playing_bgm
end
#--------------------------------------------------------------------------
# â— BGM ã®å¾©å¸°
#--------------------------------------------------------------------------
def bgm_restore
bgm_play(@memorized_bgm)
end
#--------------------------------------------------------------------------
# â— BGS ã®æ¼”å¥
# bgs : æ¼”å¥ã™ã‚‹ BGS
#--------------------------------------------------------------------------
def bgs_play(bgs)
@playing_bgs = bgs
if bgs != nil and bgs.name != ""
Audio.bgs_play("Audio/BGS/" + bgs.name, bgs.volume* $game_music.se_volume/100, bgs.pitch)
else
Audio.bgs_stop
end
Graphics.frame_reset
end
#--------------------------------------------------------------------------
# â— BGS ã®ãƒ•ã‚§ãƒ¼ãƒ‰ã‚¢ã‚¦ãƒˆ
# time : フェードアウト時間 (秒)
#--------------------------------------------------------------------------
def bgs_fade(time)
@playing_bgs = nil
Audio.bgs_fade(time * 1000)
end
#--------------------------------------------------------------------------
# â— BGS ã®è¨˜æ†¶
#--------------------------------------------------------------------------
def bgs_memorize
@memorized_bgs = @playing_bgs
end
#--------------------------------------------------------------------------
# â— BGS ã®å¾©å¸°
#--------------------------------------------------------------------------
def bgs_restore
bgs_play(@memorized_bgs)
end
#--------------------------------------------------------------------------
# â— ME ã®æ¼”å¥
# me : æ¼”å¥ã™ã‚‹ ME
#--------------------------------------------------------------------------
def me_play(me)
if me != nil and me.name != ""
Audio.me_play("Audio/ME/" + me.name, me.volume* $game_music.se_volume/100, me.pitch)
else
Audio.me_stop
end
Graphics.frame_reset
end
#--------------------------------------------------------------------------
# â— SE ã®æ¼”å¥
# se : æ¼”å¥ã™ã‚‹ SE
#--------------------------------------------------------------------------
def se_play(se)
if se != nil and se.name != ""
Audio.se_play("Audio/SE/" + se.name, se.volume* $game_music.se_volume/100, se.pitch)
end
end
#--------------------------------------------------------------------------
# â— SE ã®åœæ¢
#--------------------------------------------------------------------------
def se_stop
Audio.se_stop
end
#--------------------------------------------------------------------------
# â— æ¼”å¥ä¸ BGM ã®å–å¾—
#--------------------------------------------------------------------------
def playing_bgm
return @playing_bgm
end
#--------------------------------------------------------------------------
# â— æ¼”å¥ä¸ BGS ã®å–å¾—
#--------------------------------------------------------------------------
def playing_bgs
return @playing_bgs
end
#--------------------------------------------------------------------------
# ◠ウィンドウスã‚ン ファイルåã®å–å¾—
#--------------------------------------------------------------------------
def windowskin_name
if @windowskin_name == nil
return $data_system.windowskin_name
else
return @windowskin_name
end
end
#--------------------------------------------------------------------------
# ◠ウィンドウスã‚ン ファイルåã®è¨å®š
# windowskin_name : æ–°ã—ã„ウィンドウスã‚ン ファイルå
#--------------------------------------------------------------------------
def windowskin_name=(windowskin_name)
@windowskin_name = windowskin_name
end
#--------------------------------------------------------------------------
# â— ãƒãƒˆãƒ« BGM ã®å–å¾—
#--------------------------------------------------------------------------
def battle_bgm
if @battle_bgm == nil
return $data_system.battle_bgm
else
return @battle_bgm
end
end
#--------------------------------------------------------------------------
# â— ãƒãƒˆãƒ« BGM ã®è¨å®š
# battle_bgm : æ–°ã—ã„ãƒãƒˆãƒ« BGM
#--------------------------------------------------------------------------
def battle_bgm=(battle_bgm)
@battle_bgm = battle_bgm
end
#--------------------------------------------------------------------------
# â— ãƒãƒˆãƒ«çµ‚了 BGM ã®å–å¾—
#--------------------------------------------------------------------------
def battle_end_me
if @battle_end_me == nil
return $data_system.battle_end_me
else
return @battle_end_me
end
end
#--------------------------------------------------------------------------
# â— ãƒãƒˆãƒ«çµ‚了 BGM ã®è¨å®š
# battle_end_me : æ–°ã—ã„ãƒãƒˆãƒ«çµ‚了 BGM
#--------------------------------------------------------------------------
def battle_end_me=(battle_end_me)
@battle_end_me = battle_end_me
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
# タイマーを 1 減らã™
if @timer_working and @timer > 0
@timer -= 1
end
end
#Thanks for Deke window skin changing script
def next_skin
array = Dir.entries("Graphics/Windowskins")
array.delete("..")
array.delete(".")
for i in 0...array.size
string = array[i]
loop do
if string.include?(".")
string.chop!
else
break
end
end
if $game_system.windowskin_name == string
string = array[(i + 1) % array.size]
loop do
if string.include?(".")
string.chop!
else
break
end
end
$game_system.windowskin_name = string
$game_system.skin_name = string
break
end
end
end
#----------------------------------------------------------------
def prev_skin
array = Dir.entries("Graphics/Windowskins")
array.delete("..")
array.delete(".")
for i in 0...array.size
string = array[i]
loop do
if string.include?(".")
string.chop!
else
break
end
end
if $game_system.windowskin_name == string
string = array[(i - 1) % array.size]
loop do
if string.include?(".")
string.chop!
else
break
end
end
$game_system.windowskin_name = string
$game_system.skin_name = string
break
end
end
end
#End of window changing
def playing_bgm=(playing_bgm)
@playing_bgm = playing_bgm
end
#Music Changing
def next_music
music_list = Dir.entries("Audio/BGM")
music_list.delete("..")
music_list.delete(".")
for i in 0...music_list.size
string = music_list[i]
loop do
if string.include?(".")
string.chop!
else
break
end
end
if $game_system.playing_bgm.name == string
string = music_list[(i + 1) % music_list.size]
loop do
if string.include?(".")
string.chop!
else
break
end
end
Audio.bgm_play("Audio/BGM/" + string, 100, 90)
$game_system.playing_bgm.name = string
$game_system.music_name = string
break
end
end
end
#----------------------------------------------------------------
def prev_music
music_list = Dir.entries("Audio/BGM")
music_list.delete("..")
music_list.delete(".")
for i in 0...music_list.size
string = music_list[i]
loop do
if string.include?(".")
string.chop!
else
break
end
end
if $game_system.playing_bgm.name == string
string = music_list[(i - 1) % music_list.size]
loop do
if string.include?(".")
string.chop!
else
break
end
end
Audio.bgm_play("Audio/BGM/" + string, 100, 90)
$game_system.playing_bgm.name = string
$game_system.music_name = string
break
end
end
end
#Music Changing
#Font changing
def next_font
fonts = ["Arial",
"Arial Black",
"Arial Narrow",
"Book Antiqua",
"Bookman Old Style",
"Century Gothic",
"Comic Sans MS",
"Courier New",
"Garamond",
"Georgia",
"MS Sans Serif",
"MS Serif",
"Times Roman",
"Tahoma"]
for i in 0...fonts.size
fonts_n = fonts[i]
loop do
if fonts_n.include?(".")
fonts_n.chop!
else
break
end
end
if $fontface == fonts_n
fonts_n = fonts[(i + 1) % fonts.size]
loop do
if fonts_n.include?(".")
fonts_n.chop!
else
break
end
end
$fontface = fonts_n
$game_system.fonts_name = fonts_n
$fontface = $game_system.fonts_name
$game_system.map_interpreter.update
break
end
end
end
def prev_font
fonts = ["Arial",
"Arial Black",
"Arial Narrow",
"Book Antiqua",
"Bookman Old Style",
"Century Gothic",
"Comic Sans MS",
"Courier New",
"Garamond",
"Georgia",
"MS Sans Serif",
"MS Serif",
"Times Roman",
"Tahoma"]
for i in 0...fonts.size
fonts_n = fonts[i]
loop do
if fonts_n.include?(".")
fonts_n.chop!
else
break
end
end
if $fontface == fonts_n
fonts_n = fonts[(i - 1) % fonts.size]
loop do
if fonts_n.include?(".")
fonts_n.chop!
else
break
end
end
$fontface = fonts_n
$game_system.fonts_name = fonts_n
$fontface = $game_system.fonts_name
$game_system.map_interpreter.update
break
end
end
end
#Font changing
#Font size change
def next_size
sizes = [8, 15, 18, 24, 26, 28, 30, 32]
for i in 0...sizes.size
siz = sizes[i]
if $fontsize == siz
siz = sizes[(i + 1) % sizes.size]
$fontsize = siz
$game_system.fonts_size = siz
break
end
end
end
def prev_size
sizes = [8, 15, 18, 24, 26, 28, 30, 32]
for i in 0...sizes.size
siz = sizes[i]
if $fontsize == siz
siz = sizes[(i - 1) % sizes.size]
$fontsize = siz
$game_system.fonts_size = siz
break
end
end
end
#Font size change
end