Making a simple day/night system with a date system

Hello, everyone.

As the title says, I'm trying to make a simple time system. I don't want anything too advanced like timers and calendars. I just want to accomplish:

1.) A day/night cycle- where it is static and the only way it can advance the time (morning or night) is through player actions like sleeping at an inn, a story cutscene where they are doing something that takes a long time, etc.

2.) A date system- Monday to Sunday, no need for numbered dates or months like June 1st or seasons like winter and summer. Only Monday to Sunday.

basically, the end result would look kinda like this: [Night, Friday]
And if possible, it would be shown in the corner of the screen or in the main menu.

I actually already managed to make a day/night cycle that I wanted, that was done through Switches like [Night Time = ON] and then having a screen tint event, only that I'm having quite the problem trying to integrate it into a date system (or even if what I did was the correct way of doing it).

I already looked to some Time/Date plugins but a lot of them had components that I didn't need to use and also I couldn't remove them (like timers, calendars, seasons). Also all the tutorials I could find about making a time system all had these things as well.

I'm a beginner at this in general. Thank you for any advice you guys can give!
just make a common event on parallel process with a wait(15) or so.
each loop count up a variable counter by 1

then conditional branch checking if the counter is high enough for whatever time you want to be 1 hour, if yes count up the hour and set the counter to zero

then conditional branch checking the hour to determine if any tint has to change
followed by a conditional branch to check if hour is >24, if yes set hour to zero and count up day.

last conditional branch to check if day is >7 if yes day =0 (since you don't want months)
That's...odd. When I Google "RPG Maker MV time tutorial," none of the YouTube videos that come up have any kind of advanced calendar system.

I'd suggest you follow along with this one, then simply add an additional counter for the days of the week.



Note that there is a bit of poor design in the Time_Counting event - as Andar said, there is no reason the parallel process should run every frame. Add a Wait: 60 command at the bottom, then change the top conditional to be >= 10
If you only need to track day/night and day of the week, you could use a variable like this:
  • 0 = Monday (day)
  • 1 = Monday (night)
  • 2 = Tuesday (day)
  • ...
  • 13 = Sunday (night)
For the reset you could use either a branch (if > 13) or Control Variables -> Mod (Mod 14 gets the remainder after dividing the input by 14).

You could keep the day/night switch as well if that's convenient.
just make a common event on parallel process with a wait(15) or so.
each loop count up a variable counter by 1

then conditional branch checking if the counter is high enough for whatever time you want to be 1 hour, if yes count up the hour and set the counter to zero

then conditional branch checking the hour to determine if any tint has to change
followed by a conditional branch to check if hour is >24, if yes set hour to zero and count up day.

last conditional branch to check if day is >7 if yes day =0 (since you don't want months)
That's...odd. When I Google "RPG Maker MV time tutorial," none of the YouTube videos that come up have any kind of advanced calendar system.

I'd suggest you follow along with this one, then simply add an additional counter for the days of the week.



Note that there is a bit of poor design in the Time_Counting event - as Andar said, there is no reason the parallel process should run every frame. Add a Wait: 60 command at the bottom, then change the top conditional to be >= 10

Sorry :hswt: I forgot to mention that what I meant by no timers is that no second, minutes, and hours that are running. Just only day and night. Like the only way it will change from day to night (and vice versa) are through particular actions made by the player, like sleeping at an inn.
If you only need to track day/night and day of the week, you could use a variable like this:
  • 0 = Monday (day)
  • 1 = Monday (night)
  • 2 = Tuesday (day)
  • ...
  • 13 = Sunday (night)
For the reset you could use either a branch (if > 13) or Control Variables -> Mod (Mod 14 gets the remainder after dividing the input by 14).

You could keep the day/night switch as well if that's convenient.
I think that may actually be a way better setup than what I have. Thank you 😀

Also how would I go on doing that, Like this? 14 pages of seperate days?

time prob1.jpg
Just as a note, we're not supposed to double post. If you need to refer to two people at once, you can use the Reply or +Quote buttons, or @ tag them. If you do make a post and need to add something, there's an Edit button right at the bottom.
Also how would I go on doing that, Like this? 14 pages of seperate days?
That's a very inefficient approach - it's also not what caethyril described. She said you could use one variable to track what day it is, there's no need for 7 switches (and I have no idea why you have 14 pages).

I'll offer the suggestion that you might want to do more eventing tutorials (there are a bunch on YouTube), as this is pretty basic eventing logic compared to some more advanced things you might need to do in your game.

You can have one Common Event, one game switch and one game variable.
Conditional Branch -> Switch Day is ON
--Control Switch Day OFF
--tint your screen or whatever you want to do for night time
-Else
--Control Switch Day ON
--Control Variable -> Weekday +1
--Conditional Branch -> Variable -> Weekday > 7
---Control Variable -> Weekday = 1

Then every time you do anything that advances time, you just make it call that Common Event.

If you want the variable to store the name of the day of the week, then that's just a bit longer with more conditionals because you can't simply say "Weekday +1," you'll need to do "If it's Sunday, Control Variable to Monday," etc.
Yea, usually you'd only use a new page if you want the event to change its trigger, appearance, auto-movement, etc. If it's only the event contents that change, then consider using a single page with Conditional Branch commands.
hat I meant by no timers is that no second, minutes, and hours that are running.
I understood that - that is why I only had hours listed in my example.
and you don't have to display either - what is visible to the player and what is used internally are two different things.
so you can have the internal counters for hours running and just never display them to the player

Original thread: https://forums.rpgmakerweb.com/threads/making-a-simple-day-night-system-with-a-date-system.149940/