Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #----------------------------------------------------------------------------
- # [<-|->] GlitchyPSIX's Variable Window Tone Changing Script
- #----------------------------------------------------------------------------
- # Yes, this is my first script seeing what I can do with my first Ruby notions.
- # Using the values from the variables defined in the setup, you can set
- # Window_Tone (Window Color) easily without the default events...
- # and the best thing of it is that is pretty enjoyable
- # by the end-user as it looks like he can edit
- # the game in a way like Mother 3's Window Flavor System. But this one is
- # more customizable :3
- #----------------------------------------------------------------------------
- # My next goal for this script is making also a Color Selector for newbie-
- # friendly engine... :D
- # I feel good with this because it does not override over 255.
- # If it detects over 255 value, it sets it to fixed 255 xD
- #----------------------------------------------------------------------------
- module GLITCHYSCOLOR
- REDVAR = 10 #10 by default
- BLUVAR = 11 #11 by default
- GRNVAR = 12 #12 by default
- end
- #----------------------------------------------------------------------------
- # <-> Editing anything past this point may result in... Wait, I'm not
- # Yanfly! xD
- #----------------------------------------------------------------------------
- $imported = {} if $imported.nil?
- $imported[:glitchyscolor] = true
- #----------------------------------------------------------------------------
- # Window_Base
- #----------------------------------------------------------------------------
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # * Update Tone
- #--------------------------------------------------------------------------
- def update_tone
- if $game_variables[GLITCHYSCOLOR::REDVAR] > 254
- then $game_variables[GLITCHYSCOLOR::REDVAR] = 255
- end
- if $game_variables[GLITCHYSCOLOR::BLUVAR] > 254
- then $game_variables[GLITCHYSCOLOR::BLUVAR] = 255
- end
- if $game_variables[GLITCHYSCOLOR::GRNVAR] > 254
- then $game_variables[GLITCHYSCOLOR::GRNVAR] = 255
- end
- red = $game_variables[GLITCHYSCOLOR::REDVAR]
- blue = $game_variables[GLITCHYSCOLOR::BLUVAR]
- green = $game_variables[GLITCHYSCOLOR::GRNVAR]
- tone = Tone.new(red, green, blue, 0)
- self.tone.set(tone)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement