Setting "Tint Screen," or tinting scripts, to work in battle...

I'm having all sorts of troubles on this... I've checked a few other posts and tried their methods, but I still run into problems.

What I'm trying to do is this... I have a switch that turns on/off based on what time of the day it is in game. So I have a common script that determines what time of the day it is through variables, and when it's a specific time it gets dark, like a day/night transition. So when the variable reaches a specific number, the "Night" switch turns on. I'm trying to add an event to battles that detects if the "Night" switch is on or off on Turn 0. If it's off, nothing happens, but if it's on, I want the screen to tint into night. I've tried it with the Tint Screen option (wait 1 frame) and using the...

$game_troop.screen.start_tone_change(Tone.new(-64, -64, 0, 64), 5400)

...script but nothing seems to be making it work. Nothing changes even when all I do is guard for 15 turns.

I'm also using "Khas Awesome Lighting Effects" so if that helps with some ideas...
Might be the span. Can you show us a screenshot of your troop event page?


Also, are you sure the switch/variable have the correct values? Are you using F9 to confirm that they are set in a way that will trigger the troop event?
Yes, the switch and variables have the correct values and functions properly every where, EXCEPT in battle.

I have a seconds, minutes, hours, days, and AM/PM variable that function in a common event that is triggered by a seperate event within the game. This is to make a real feel of day to night. The second variable is add +1, and at 20 the minute variable is +1 and the second variable restarts. The minute variable goes to +60, where it restarts and the hour variable is +1. The hour variable goes to +13, but at +12 the AM/PM variable is +1 (+1 = PM, 0 = AM), and the hour variable resets to 1 when it is +13.

When the timer meets a specific variable, like AM/PM +1 Hour +5 Minute +30, Khas lighting script dims the screen to appear like it's becoming dusk, and it darkens every hour until AM/PM +1 Hour +11 Minute +30, then it gets brighter until AM/PM +1 Hour +1 Minute +30. Every hour Khas lighting script is called, so at 5 PM you'll see...

s = $game_map.effect_surface
s.change_color(60,0,0,0,90)

...and at 7 PM you'll see...

s = $game_map.effect_surface
s.change_color(70,0,0,0,120)

I know the day to night works, so I know the variables work. Also, when the timer reaches 5 PM, the "Night" switch turns on, and at 5 AM it turns off. I know this works because when 5 PM rolls around I have torches set to turn on whent the "Night" switch comes on, and turn off when the switch turns off.

So here is what it looks like in the troop database...

question1_zpsqvqxbj6p.png


This is page one. Obviously set to play the music as the fight begins. The switch is only there to test my attempts at making the screen tint as I'm trying to run it from battle test.

question2_zps1yrxr3qy.png


This is page two. The idea is for the event to detect if the "Night" switch is on or off on turn 0, and to tint the screen if it is on, or do nothing if it's off. I have tried both battle span and turn span, but neither seem to make a difference.

I'm not sure what I'm doing wrong.
Let me guess - the time is controlled by a parallel process common event?


Unfortunately for you, the battlescreen is a screen, not the map - and with all screens, parallel processes are stopped when opening them (same as when you open the menu screen - nothing will happen on the map while any screen is opened.


One option would be to have the battle events take over and handle the time control based on the number of turns. For that, you'll have to read the variables at turn 0 and create a time event that counts them up once per turn during battlescreen.


Another option (no guarantee, not tested) is to check if Tsukihime's scene interpreter script works during battle and allows the parallel processes to continue. However, there are a lot of things that can go wrong if you try to go this way...


Edit:


Another problem might be from Khas' Lighting script. It is known that this script disables the regular tinting commands, you'll need to use Khas' commands instead - and I don't know if those were intended for the battlescreen.


You might wait for his new light script to come out, might be any day now (I haven't checked current status, I only know that he's working on a completely new light script)
Ah, I see... but it's not the issue of time proceeding while the battle is going on.

I haven't tested it yet past getting a battle, so I don't know if the timer stops after a fight, but I do know it continues after opening a menu or going to a shop, etc. Things you can do on the map. It pauses, and resumes once I've returned to moving around.

The problem I'm having is having the battle screen reflect the time of day. Basically, will there be a tint (dark) or no tint (light)? When the "Night" switch is on, I want the battle event to tint to reflect that it's dark out, not that I want time to keep going on while you are in the battle.

So I get that the common event, which runs on a parallel process, will stop working once I enter a battle, but the "Night" switch should still be in affect. I know the switch isn't broken, because I can activate it within the battle event anyway. But like I was saying, the problem is making the battle event tint. It won't tint. It just stays the same regardless. I could put a wait 1 frame, a text box, a picture of a cat, and it won't tint at all. Using either the tint screen function or using any scripts, that I know of, it just stays the same normal tint.

Alright... for example... I have "Night" switch set to on (turn 0) in the first box (battle span). The second box (turn span) checks if "Night" switch is on (turn 0) and I put that the screen should tint to the night setting. The problem is... it doesn't. But to make sure that the setup for the boxes were correct, instead of using the tint screen function, I just put a text box, and the text box worked. So what I'm not understanding is... why won't tint screen work? I've also tried using, again, scripts and using Khas's script and I don't get any results.

Edit:
Oh, I didn't realize it prevented tint screen from working. I suppose I could wait for his new light script to come out and see if that may have the function I'm looking for. If not, I might just make some new back drops that are used for "night" battles and set it to switch the battle back to those when the "Night" switch is on.
So your problem isn't the condition, it's the command.


Then, for testing purposes please remove all conditions and have only the tint command always executed in turn zero - and please give us a screenshot of how you do that.


Because in your screenshots above, you only displayed the conditions and talked mostly about the conditions, but don't show the command you have problems with.


Only after you get the tint working, only then you should start testing the conditions and switches.
question3_zpsfc0qacua.png


Tint screen does not work. With no conditions, none, just it being used on turn 0, it does absolutely nothing. Even without BGM, it doesn't work.

No, I started with the conditions because I already have tons and tons of work in this game and I know what connects, or what works with what. In my head it made sense, "How can I make a battle look like it's night time? Oh, I got it, tint screen... Oh, it's not working?"

Then I messed with the conditions, and they worked, so I went to the bare bone set up. Turn 0... do something... nope? Okay, go to RPG Maker forums for help.

The other things I did were...

question4_zpsr3dwnfhl.png


And...

question5_zpsttxu3tpi.png

Original thread: https://forums.rpgmakerweb.com/threads/setting-tint-screen-or-tinting-scripts-to-work-in-battle.38341/