Leon 55 Report post Posted November 26, 2008 Okay, ever get just plain sick of trying to find the perfect screen tone for your map? Well, this tool will be your salvation. Plug this script into your game, go into test mode, and press 'F8' to allow you to change the map's tone before your very eyes! Now, this script won't set the tone for you, but gives you the numbers you need to set it in an event. So, enjoy! Script #------------------------------------------------------------------------------- # Screen Tint Debug Menu by Leon_Westbrooke #------------------------------------------------------------------------------- # This scene allows you, in Debug mode, tamper with the map's tone until you # find a desired coloring. # It will NOT set the tone for you automatically. Instead, record the numbers # and use them in a change screen tone event. However, this should cut down # on countless testing of the screen's tint. # # To use: # Plug the script into your game's script archive. # To access it, go into debug mode (F12) and press F8 to access the menu. # Use the arrow keys to change the maps tone. #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Game_Temp #------------------------------------------------------------------------------- class Game_Temp alias leon_stdm_gametemp_init initialize attr_accessor :tinttest_red attr_accessor :tinttest_green attr_accessor :tinttest_blue attr_accessor :tinttest_gray def initialize leon_stdm_gametemp_init @tinttest_red = 0 @tinttest_green = 0 @tinttest_blue = 0 @tinttest_gray = 0 end end #------------------------------------------------------------------------------- # END Game_Temp #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Spriteset_Map #------------------------------------------------------------------------------- class Spriteset_Map attr_accessor :viewport1 end class Game_Screen attr_accessor :tone end #------------------------------------------------------------------------------- # END Spriteset_Map #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Scene_Map #------------------------------------------------------------------------------- class Scene_Map alias leon_stdm_scenemap_update update def update leon_stdm_scenemap_update if $DEBUG and Input.press?(Input::F8) $scene = Scene_TintDebug.new end end end #------------------------------------------------------------------------------- # END Scene_Map #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Window_TintTest #------------------------------------------------------------------------------- class Window_TintTest < Window_Selectable def initialize super(0, 0, 192, 192) self.contents = Bitmap.new(width - 32, height - 32) @item_max = 5 self.index = 0 self.active = true refresh end def refresh self.contents.clear self.contents.draw_text(4, 0, 160, 32, "Red") self.contents.draw_text(4, 32, 160, 32, "Green") self.contents.draw_text(4, 64, 160, 32, "Blue") self.contents.draw_text(4, 96, 160, 32, "gray") self.contents.draw_text(4, 128, 160, 32, "Exit") self.contents.draw_text(-4, 0, 160, 32, $game_temp.tinttest_red.to_s, 2) self.contents.draw_text(-4, 32, 160, 32, $game_temp.tinttest_green.to_s, 2) self.contents.draw_text(-4, 64, 160, 32, $game_temp.tinttest_blue.to_s, 2) self.contents.draw_text(-4, 96, 160, 32, $game_temp.tinttest_gray.to_s, 2) end end #------------------------------------------------------------------------------- # END Window_TintTest #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # * Scene_TintDebug #------------------------------------------------------------------------------- class Scene_TintDebug def main @spriteset = Spriteset_Map.new $game_temp.tinttest_red = @spriteset.viewport1.tone.red.to_i $game_temp.tinttest_green = @spriteset.viewport1.tone.green.to_i $game_temp.tinttest_blue = @spriteset.viewport1.tone.blue.to_i $game_temp.tinttest_gray = @spriteset.viewport1.tone.gray.to_i @window_tint = Window_TintTest.new Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @window_tint.dispose @spriteset.dispose end def update if Input.trigger?(Input::B) $scene = Scene_Map.new end if @window_tint.active update_windowtint return end end def update_windowtint @window_tint.update case @window_tint.index when 0 if Input.trigger?(Input::RIGHT) $game_temp.tinttest_red += 1 if $game_temp.tinttest_red >= 255 $game_temp.tinttest_red = 255 end elsif Input.trigger?(Input::LEFT) $game_temp.tinttest_red -= 1 if $game_temp.tinttest_red <= -255 $game_temp.tinttest_red = -255 end elsif Input.repeat?(Input::RIGHT) $game_temp.tinttest_red += 5 if $game_temp.tinttest_red >= 255 $game_temp.tinttest_red = 255 end elsif Input.repeat?(Input::LEFT) $game_temp.tinttest_red -= 5 if $game_temp.tinttest_red <= -255 $game_temp.tinttest_red = -255 end end when 1 if Input.trigger?(Input::RIGHT) $game_temp.tinttest_green += 1 if $game_temp.tinttest_green >= 255 $game_temp.tinttest_green = 255 end elsif Input.trigger?(Input::LEFT) $game_temp.tinttest_green -= 1 if $game_temp.tinttest_green <= -255 $game_temp.tinttest_green = -255 end elsif Input.repeat?(Input::RIGHT) $game_temp.tinttest_green += 5 if $game_temp.tinttest_green >= 255 $game_temp.tinttest_green = 255 end elsif Input.repeat?(Input::LEFT) $game_temp.tinttest_green -= 5 if $game_temp.tinttest_green <= -255 $game_temp.tinttest_green = -255 end end when 2 if Input.trigger?(Input::RIGHT) $game_temp.tinttest_blue += 1 if $game_temp.tinttest_blue >= 255 $game_temp.tinttest_blue = 255 end elsif Input.trigger?(Input::LEFT) $game_temp.tinttest_blue -= 1 if $game_temp.tinttest_blue <= -255 $game_temp.tinttest_blue = -255 end elsif Input.repeat?(Input::RIGHT) $game_temp.tinttest_blue += 5 if $game_temp.tinttest_blue >= 255 $game_temp.tinttest_blue = 255 end elsif Input.repeat?(Input::LEFT) $game_temp.tinttest_blue -= 5 if $game_temp.tinttest_blue <= -255 $game_temp.tinttest_blue = -255 end end when 3 if Input.trigger?(Input::RIGHT) $game_temp.tinttest_gray += 1 if $game_temp.tinttest_gray >= 255 $game_temp.tinttest_gray = 255 end elsif Input.trigger?(Input::LEFT) $game_temp.tinttest_gray -= 1 if $game_temp.tinttest_gray <= -255 $game_temp.tinttest_gray = -255 end elsif Input.repeat?(Input::RIGHT) $game_temp.tinttest_gray += 5 if $game_temp.tinttest_gray >= 255 $game_temp.tinttest_gray = 255 end elsif Input.repeat?(Input::LEFT) $game_temp.tinttest_gray -= 5 if $game_temp.tinttest_gray <= -255 $game_temp.tinttest_gray = -255 end end when 4 if Input.trigger?(Input::C) $scene = Scene_Map.new end end red = $game_temp.tinttest_red green = $game_temp.tinttest_green blue = $game_temp.tinttest_blue gray = $game_temp.tinttest_gray @spriteset.viewport1.tone = Tone.new(red, green, blue, gray) $game_screen.tone = Tone.new(red, green, blue, gray) @window_tint.refresh @spriteset.update end end #------------------------------------------------------------------------------- # * Scene_TintDebug #------------------------------------------------------------------------------- 1 Phrono reacted to this Share this post Link to post Share on other sites
Kiriashi 117 Report post Posted November 26, 2008 I..... Love..... you....... r scripts Share this post Link to post Share on other sites
Nisage 31 Report post Posted November 26, 2008 Sweet, this will make it alot easier to deal with the Screen Tones. Thanks. Share this post Link to post Share on other sites
Leon 55 Report post Posted November 26, 2008 Bug fixed: Exit previously didn't work. Now it does. Share this post Link to post Share on other sites
Polraudio 122 Report post Posted November 27, 2008 Nice script Leon. This helps lots. Share this post Link to post Share on other sites