Introduction
A couple of weeks ago, I was bored. So bored to the point where I thought up of this script which I'm sure anyone who reads this will question its usefulness. *ahem* On with my bad attempt to convince you to install this script!
Features
Your game starts with the colors you set as the 'initial color'. It pretty much gives your game the initial color tone instead of starting with the amount of red, green, blue and grey set to 0.
There's a switch to turn the auto-tone back on. To change the tone of your screen to the 'initial colors', just turn off a specific game switch.
No need to rely on a particular map to change the colors at the start of your game!
Screenshots
Go change the tint and color on your television. There's your screenshot.
Demo
No demo available.
Script
Create a new script called "Auto Tone" above main and then Copy/Paste this pretty short code below.
"Script"
Code:
=begin
?????????????????????????????????????????????????????????????????????????????????
? AutoTone ?
? By Punk/StereoProphet ?
? http://rmvxpuniverse.com ?
? 5/6/2008 ?
?????????????????????????????????????????????????????????????????????????????????
? ? Author's Notes: ?
? ?? I thought of this script for the hell of it, really. Please don't question ?
? how useful it is. It was just a random idea that popped in my head. ?
? ? Description: ?
? ?? It gives your game the initial color tone in the beginning of the game. ?
? Instead of starting with the amount of red, green, blue and saturation ?
? set to 0, you can set the starting screen tone of the game. ?
? ? Credits: ?
? ??? Digi: Pointing out something wrong with the code. ?
? ??? Zeriab: Because his variation of the autoswitcher taught me a lesson. ?
? ? Things to know about: ?
? ?? @at_switch_id: The switch ID of the Auto Tone. When turned off, it would ?
? ? change the screen tone's colors to the "initial colors" set ?
? ? by the user. After changing the screen tone to the initial ?
? ? colors, it would turn the Auto tone switch on to prevent it ?
? ? from changing to the "initial colors" unless the switch was ?
? ? turned off again. ?
? ?? @at_red: Set value of Red. Ranges from -255 (no red) to 255 (fully red). ?
? ?? @at_green: Set value of Green. Ranges from -255 (no green) to 255 ?
? ? (fully green). ?
? ?? @at_blue: Set value of Blue. Ranges from -255 (none) to 255 (fully blue). ?
? ?? @at_grey: Set saturation. Ranges from 0 (Saturated) to 255 (Desaturated). ?
? ? Switch Tip: ?
? ?? To change the screen tone back to the auto tone colors, turn off the ?
? auto tone switch. ?
?????????????????????????????????????????????????????????????????????????????????
=end
class Scene_Map
def initialize
@at_switch_id = 1 #Switch ID of Auto Tone.
@at_red = 0 # Amount of RED. It can range from -255 to 255.
@at_green = 0 # Amount of GREEN. Ranges from -255 to 255.
@at_blue = 0 # Amount of BLUE. Ranges from -255 to 255.
@at_grey = 0 # Amount of Saturation. Ranges from 0 to 255.
punk_autotone
end
def punk_autotone
if $game_switches[@at_switch_id] == true
else
punk_attone = Tone.new(@at_red, @at_green, @at_blue, @at_grey)
$game_screen.start_tone_change(punk_attone, 0)
$game_switches[@at_switch_id] = true
end
end
end
FAQ
Maximum values of Red, Green, Blue and Saturation?
Red: -255 to 255. (No red to complete red)
Green: -255 to 255. (No green to complete green)
Blue: -255 to 255. (No blue to complete blue)
Saturation: 0 to 255 (Not grey to grey)
Switches: Why a game switch and not a local/global/etc. variable of any sort?
My reasons may sound pretty dumb but allow me to explain.
This is because I am (and safe to say, anyone here) very familiar with game switches. Yes, I'm also familiar with global variables. While some of us are used to typing in a small code in an evented script command which does something in-game, I guess I had "ease of use" in mind so I wanted to have users use game switches instead.
Switches: Why did you even put a switch in there?
I'm not sure if this makes me a bad coder, haha. Anyway, the reason why I put in a switch in this script was because my script would always go back to the 'initial colors' whenever I went into a different scene. So that's why the switch is there... to prevent that. :P
If someone can think of a better method than this then be my guest.
Switches: What is the purpose of the switch?
Although I think I vaguely answered this in the spoiler above, I might be able to answer in full detail as to what is the purpose of the switch.
When you're starting your game, your game will instantly change it's screen tone to the colors you set. Right after it changes the colors of your screen, it turns on the game switch id of your choosing. When the switch is on, your game doesn't change back to the "auto tone" colors and you're pretty much free to give it a new color using the change screen tone event command.
You can turn off the switch to change it back to the auto tone colors but it would turn the switch back on right after changing screen tone.
How do I change the switch ID?
I thought I perfectly laid out the instructions in the script. Guess I was wrong. Anyway, go to this line.
Code:
@at_switch_id = [color=red]1[/color] #Switch ID of Auto Tone.
[key=red]The game switch ID.[/key]You can change the switch ID to any number.
Is this compatible with VX?
No.
Why, Punk? Why did you make this?
It's amazing what boredom can do to someone like me. Haha.
I was so bored, I decided I wanted to go script something but I didn't know what until this random idea came into my head. But hey, like (Zeriab's) AutoSwitcher, you no longer have to rely on a particular map to change your screen tone, eh?
Compatibility
I'm not sure if it's compatible with the SDK.
It's not compatible with RPG Maker VX. Hence the XP prefix.
Credits and Thanks Digi pointed out something that was wrong with my code.
I'm also giving credit to Zeriab because his help with the AutoSwitcher taught me something.
Author's Notes
Punk totally does not support this script!
Terms and Conditions
Credit Punk, Digi and Zeriab.