implementing a week system.

Hey everyone. I hope this is the right place to post this.

I'm looking to add a week system into my game. nothing fancy, just a simple Sunday - Saturday system.
I also need it to work alongside with a day cycle system that I put in. (with the help of the furom memebers here of course.) here's a pic of the day cycle common event with 0 being morning, 1/noon, 2/evening , and 3 being night before going back to morning. just to give some context.
Screenshot (3).png


If someone could help me with this, or even point me in the right direction to find out how to do this.
it would be greatly appreciated.
I made a system like that, including time, day/night, weeks, months, years, weather, light everything.
I uploaded it as a workshop on steam. If you want you can see how I did it. I explained everything inside the events with comments. (Read the green text) You need to look at the common events.

And feel free to copy anything of that system into your own if you want to use it.

It can both run on real time, or play time as a base. And goes as fast or slow as you want. I have set it to be 1/60 (1 real life second is 1 in-game minute) by default. This means every 24 minutes a day passes. But you can set it at 1/1 if you like, and make it real-time.

There is one down side... Every month has the same length. No problem for fantasy calendars, but a problem for a real life one.

I have found a way around this, but I don't believe I have this included in the workshop. (I improved it to my own liking long after I forgot about the workshop)

You know how to use steam workshops? You do need a steam version of MV for this. You subscribe to the workshop. Then open MV and go to File -> Steam management. There you can now load the workshop.

I use Orange Time system, and it's incredible, lets you do everything you're trying to pull off.
Similar to your time system, you first set day=0 (it's a variable of course)
Then in the last condition where you put time change=0, under that you increase day by 1 if you're doing this in the same common event. Otherwise, just check if time change>3, then day+=1.
Similarly, when day>6: set day=0.
In another variable, say variable 50, in script call you write $gameVariables.setValue(50, ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]). Your day name is $gameVariables.value(50)[day] now. If you're using variable 49 for day for example, you can show the day with $gameVariables.value(50)[$gameVariables.value(49)]
Alternatively, skip this whole extra variable array thing and just do 7 condition checks. If day==0: sunday, if day==1, day=monday etc. etc.
Thanks everyone. I'll look into each of these apporch, and ill see which one best works for my game.
Similar to your time system, you first set day=0 (it's a variable of course)
Then in the last condition where you put time change=0, under that you increase day by 1 if you're doing this in the same common event. Otherwise, just check if time change>3, then day+=1.
Similarly, when day>6: set day=0.
In another variable, say variable 50, in script call you write $gameVariables.setValue(50, ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]). Your day name is $gameVariables.value(50)[day] now. If you're using variable 49 for day for example, you can show the day with $gameVariables.value(50)[$gameVariables.value(49)]
Alternatively, skip this whole extra variable array thing and just do 7 condition checks. If day==0: sunday, if day==1, day=monday etc. etc.

This is actually what I'm looking for. I added it and it works great for the first half of the week.
But, Wednesday going into Thursday is where it falls apart. then everything just get all mixed up.
I would post pictures, but it's not letting me.
I didn't get to test my approach so maybe I made a mistake somehow :/ Are you using the array way or the condition check way? A screenshot would really help to pinpoint the issue. You can upload an image on imgur and post the link.
I didn't get to test my approach so maybe I made a mistake somehow :/ Are you using the array way or the condition check way? A screenshot would really help to pinpoint the issue. You can upload an image on imgur and post the link.

I'm still new to rpg makers. So I'm pretty sure I made a mistake or 2 somewhere.
Press F9 and look at your day change variable value. If it's alright, I think it's a problem with your show picture. It will work but it's inefficient and I think you messed up somewhere because there's too many ids to focus on. Why do you need sooo many separate Ids? Let picture id 10 is the day picture. You don't need to erase it. Every time you assign a different picture to an id, the previous picture is auto erased. So all you have to do is, if daychange=0, picture 10= sunday; if daychange=1, picture 10= monday etc. etc.
Give it a try and let me know.
Sorry, I didn't know that. that info will definitely come in handy when I start to add the cut scenes arts.
I made the adjustment. It's definitely running smoother and there's no overlapping pics anymore. but for some odd reason. Thursday, and Saturday images just won't show up. it'll be double wednesdays, and
Press F9 and look at your day change variable value. If it's alright, I think it's a problem with your show picture. It will work but it's inefficient and I think you messed up somewhere because there's too many ids to focus on. Why do you need sooo many separate Ids? Let picture id 10 is the day picture. You don't need to erase it. Every time you assign a different picture to an id, the previous picture is auto erased. So all you have to do is, if daychange=0, picture 10= sunday; if daychange=1, picture 10= monday etc. etc.
Give it a try and let me know.

Sorry, I didn't know that. that info will definitely come in handy when I start to add the cut scenes arts.
I made the adjustment. It's definitely running smoother and there's no overlapping pics anymore. but for some odd reason. Thursday, and Saturday images just won't show up. it'll be double wednesdays, and fridays before going back to sundays. I rechecked the images on the off chance I made double, and missed label them. but that doesn't seems to be the case. it's a real headache. also sorry if I'm being a bother.
The conditions are wrong in time change=4 and time change=6. It will be daychange. I didn't notice it in the last set of screenshots lol I feel stupid and pretty blind now XD But I'm most certain this is the issue.
The conditions are wrong in time change=4 and time change=6. It will be daychange. I didn't notice it in the last set of screenshots lol I feel stupid and pretty blind now XD But I'm most certain this is the issue.

that was indeed the problem. I fixed it and now it's running smooth like butter. I guess I was working on it so long. I just didn't notice it. unfortunately the common events has thrown my artwork cut-scenes completely out of wack. but that's another problem for another day. thank you so much for helping me with this. I don't think i would've figure this out on my own. really appreciated it.
Glad I could help. Good luck with your project ^^/

Original thread: https://forums.rpgmakerweb.com/threads/implementing-a-week-system.131928/