A Simple Day/Night Cycle

I found tons of stuff for complicated cycles with timers, and calendars even seasons. I just need to sort out how to do a simple set up for Morning, noon, afternoon, evening and midnight. I got the triggers set I just got sort out how to do the lighting bits for each one. Goal is simple have a trigger for every event for each time minus ones not present at that time.

Trying to make a game that is open ended to a point, but in a fixed setting so you got trigger different events at different times of days, to unlock more story with that branch. I can handle most of it, its just I never made a day/night lighting change and I was looking for some simple stuff to simply make my external maps look different for each time of day, so I can have player feel like there is a real difference and have a tiny bit of immersion.

I mean with this system its really one of the simpler ways to add to immersion with out my low budget since I can't do commissioned art and got use what resource packs I got already, I want to at least have this little bitty thing to make it feel less like a vanilla RPG maker game, so some one doesn't start it up and go "oh look another one with bare bones assets, and nothing fancy.."

I mean I found a neat little script for lighting effects so I can make outdoor lights look nicer, but I am still kind of struggling here I felt really confident from hours of tutorials online on this and just experimenting but this sadly is very humbling as I got no clue how to do this...

So recap I am trying to do a lighting change only outdoors for different times of day, but no fancy clock, I just want to have events the player does flip off the current switch and send player to the next switch for next time of day. I mean do I need a script common events? or should I use a hidden where player can't touch it event system to auto trigger it for each zone. And what command do I give to tweak lighting?
I'd say you should activate a switch when the player is in a zone that has day/night cycle and then you decide how many frames you want for each part of the day (night, day, noon, etc).

If the switch is ON you can activate a common event (triggered by that swith) that checks every 60 frames if you have to change phase.

To check something like that you need a variable to store playtime and a variable to store the value of
Code:
(playtime%day_frames_length)
#playtime is the variable you used to store your playtime
#day_frames_length is the amount of frames you want for your day/night complete cycle
based on that result you know at which point of the day you are.

What's left is tinting your screen accordingly (Event command, second page). You can decide your RGB combination and tint your screen to look dark at night or more red at dawn. If tinting the screen is not enough then you can always use an image. Keep in mind that in that case it is better if you put the day phase check inside the parallax image event - having too many parallel process events running is not a good idea.

Don't forget to turn your switch off every time the player is in a map that does not have night/day cycle. Of course while turning off that switch you should also tint your screen back to normal or delete the image. No need to tint it back when you activate the switch because the parallel process common event will run instantly and the whole thing will be checked again.

If you want to be a perfectionist you could even use a variable to store your day phase and only refresh the image/tint your screen if either the screen is normal/image is not displayed or the day phase changed.

P.S. how to answer to a wall of text? Through another wall of text (of course).

Original thread: https://forums.rpgmakerweb.com/threads/a-simple-day-night-cycle.96819/