Day night cycle with reset

Hi. I am testing out a day night cycle weather event but I want to add that when it is night time, the player has the option to sleep till morning.

How can I do this without messing up the currently ongoing and active daynight event ? I am using a tutorial from Youtube.


Also does anyone know how long 999 wait is?
First 60 frames wait = 1 second.

Forget the video. Create a parallel process common event with a 60 frames wait (1 second) that increases the value of a variable by 1. Add two conditionals that check the value of that variable... If the variable is between 0 and 90 you can call that day, if it's between 91~180 you call that night.

So, if it is day and the day switch is off you change screen tone and set the "day" switch on, this is so you can use the condition for other events etc and also so the screen tone doesn't keep changing every time. Do the same thing for "night" then add a conditional at the end to reset the variable back to 0 once it goes above 180.

Now to make the character sleep through the night, you just have to change the value of the day/night timer variable to 0.

6eb50312a10145ffb7b81e5d0cb575cf.png

0c6599eb535c4ca088b02eb948a9e2f7.png
Thanks for the reply! I have a question about using variables as timers. I've seen it done before but how do you time that?
Thanks for the reply! I have a question about using variables as timers. I've seen it done before but how do you time that?


Just like in the day/night example: create a parallel process with a wait command and a variable increase command.
Just like in the day/night example: create a parallel process with a wait command and a variable increase command.

No, I meant how do you time it. Like how many seconds is one click of a +1 Variable time. I am trying to find out how long it takes for day to night.
I know it isn't exactly what your asking but maybe this will help. For me I have sleeping in a bed set to take 8 hours, which is my night cycle. To make this work in my time parallel process I added,

If Hours Variable = 24 Set Days Variable to +1 and set Hours Variable to 0
Then
If Hours Variable = 25 Set Days Variable to +1 and set Hours Variable to 1
Then
If Hours Variable = 26 Set Days Variable to +1 and set Hours Variable to 2

I will do one of those settings for each hour up to 8, the max time sleeping could cause the clock to go past the 24 hours.
I suppose you could add another condition in there for If Hours variable = 0, which would be dawn, ahh maybe erase event.
No, I meant how do you time it. Like how many seconds is one click of a +1 Variable time. I am trying to find out how long it takes for day to night.

I still don't think I understand what you mean.

Entire day in the event lasts 180 seconds with 90 for daytime and 90 for night, ofc you can change it by changing the variable ranges or add dawn/dusk etc.
So each variable that adds 1 = 1 equals a second?
exactly, so 1 variable would add 1 second, and if that variable is 60 second then it would become a minute

i can give you a full day night system with months and days if you want
No thanks! But thanks. I just wanted something that lasted 7 or so minutes so the player can have enough time for things that happen during the day or night. 😀
Hello! I know it's been almost a year since I last posted in this topic, can't believe that. ^^;

But now I am wondering what to do if you want to go inside a house and come back out for the night and day thing. How do you keep the lightning normal inside a house during night?

Edit: I hope I am not breaking any rules, I read you can post after 72 hours but it has been a year and I didn't think making another topic would be appropriate since this still has to do with my newer question.
Hey there, for the lighting inside the house you need a parallel process in the house that sets the screen tinting to what ever level you want it, maybe make it instant if you don't want it to look like your eyes are adjusting.
@Jeremian Eastman Thanks so much for replying after almost a year! xD

I actually made a parallel process event in the house and set the Tint back to "normal" and nothing happens?
I attached a screenshot to show the event I made.

Do you think it is because the Day/Night event is in my Common Events and not the map? I just tested the Day/night thing I had on the map but that doesn't seem to be the cause?
Hello, i'm not sure if this is helpfull but if you want to do a day night cycle i prefer to use the plugin game time from Daimonious Tails. With this plugin you've a ingame time with a clock and you can easily tint the screen from the map where your house is. If you leave the house and want the normal tint of the time you just have to put a plugin event on the map when you left the house: GameTime pauseTint false.
Then you see the screen how it is (20:00 for example it's dark outside, but the plugin do it automaticly with the tint). Also there's some other usefull command for example that when you sleep it can add time. (for example it's 14:00 you sleep for 2 hours and then it shows 16:00).
Do you think it is because the Day/Night event is in my Common Events and not the map? I just tested the Day/night thing I had on the map but that doesn't seem to be the cause?

Yeah that's why. I put all of my tinting events in a Parallel process, one for each map. I just use condition branches set to the time system variables on each map. Otherwise they would get over written as you are experiencing.
Yeah that's why. I put all of my tinting events in a Parallel process, one for each map. I just use condition branches set to the time system variables on each map. Otherwise they would get over written as you are experiencing.

I cleared the Common Event for Day Night and the inside of the house is still dark. The Day/Night is now a map parallel event. Any ideas of what I am doing wrong?

Edit: Nevermind, I think I found the problem. I have Tint picture and not Tint screen.
Edit: Nevermind, I think I found the problem. I have Tint picture and not Tint screen.

Ahh yeah, sorry I didn't notice that in the pic you posted, you're right though it needs to be tint screen.🙂
@Jeremiah Eastman It's all cool! =)

Say, how do you make it back dark outside and cancel the light event inside?

Edit: @Skydorm: Hello! Thanks, but I am trying not to use scripts.
That is where you would need a parallel in each map. Your parallel in the house or where ever is setting it to your lit setting. So when you go outside you need a parallel on the map there which has the new tint options. I'll post a pic of a basic parallel I use on each map. I have 4 different tints I use in a day so it is a little more involved than a basic tint control but it should give you an idea how I set them up.
ddd.jpg


You can see there that I also set the music to the time, that isn't necessary in the basic parallel. With this set up Hours =1 is 6am, Hours = 16 is night time so that's the darkness setting. This will cancel out the event though when you go onto the new map if you have one on ever map.🙂
So basically have an event that checks where your timer is at and set a new event with parallel to cancel out the lightining?

Original thread: https://forums.rpgmakerweb.com/threads/day-night-cycle-with-reset.78925/