06-30-2009, 01:00 PM
Tool Screen Tint
by Leon Westbrooke
Jun 30 2009
Okay, to use this script, just plug it in the script database above main, and below the other default scripts. Now, whenever you test play your game, if you press 'F8', you will get a small window that will allow you to dink with the screen's tint, so that you can get it just right.
Now, it doesn't save it for you, so you must remember, or write down the numbers, then plug them into an event to allow the tinting, but this should save you countless time on getting the tone of your screen JUST right. Please, enjoy.
by Leon Westbrooke
Jun 30 2009
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.
No support is given. If you are the owner of the thread, please contact administration.
Okay, to use this script, just plug it in the script database above main, and below the other default scripts. Now, whenever you test play your game, if you press 'F8', you will get a small window that will allow you to dink with the screen's tint, so that you can get it just right.
Now, it doesn't save it for you, so you must remember, or write down the numbers, then plug them into an event to allow the tinting, but this should save you countless time on getting the tone of your screen JUST right. Please, enjoy.
Content Hidden
Code:
#-------------------------------------------------------------------------------
# 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_svcl_scenemap_update update
def update
leon_svcl_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::B)
$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
#-------------------------------------------------------------------------------