Beginer development: Times of Day

Times of Day

It's my first atempt make game and events
So i create parallel event that changes time,

Code:
◆Control Switches:#0007 Time = ON
◆If:Time = 1
  ◆Tint Screen:(-68,-68,-68,0), 60 frames (Wait)
  ◆
:End
◆If:Time = 2
  ◆Tint Screen:(34,-34,-68,170), 60 frames (Wait)
  ◆
:End
◆If:Time = 3
  ◆Tint Screen:(0,0,0,0), 60 frames (Wait)
  ◆
:End
◆If:Time = 4
  ◆Tint Screen:(-68,-68,0,68), 60 frames (Wait)
  ◆
:End
◆If:Time ≥ 5
  ◆Control Variables:#0007 Time = 1
  ◆
:End

Then i create NPC, with parallel settings

Code:
◆If:Time = 1
  ◆Set Event Location:This Event, (5,1)
  ◆
:End
◆If:Time = 2
  ◆Set Event Location:This Event, (4,12)
  ◆
:End
◆If:Time = 3
  ◆Set Event Location:This Event, (9,12)
  ◆
:End
◆If:Time = 4
  ◆Set Event Location:This Event, (23,8)
  ◆
:End

All works for now, but i wonder how practical it will be and maybe there already some methods that much better?
For now I just watch Youtube lessons
'Games Mechanics Design' is for looking at aspects of game play at a more conceptual level. "How do I...?" (implementation) questions belong in the Support forum for the engine you are using.

Moved to: RPGMaker MV
Meow, I am still new, like newb just learning how to make switches do stuff (And WHOA do I still got to debug them things), but..
If I set a parallel process like this, won't my game lag? I really like the concept of night/day cycles, could significantly impact my game design, but I'm uncertain of night / day if parallel process will make my game lag-inate. Sorry if I'm ruining this thread and taking it off topic, but it seems on target to me.

I suppose massive thanks for sharing this @NaughtyScales , meow.
'Games Mechanics Design' is for looking at aspects of game play at a more conceptual level. "How do I...?" (implementation) questions belong in the Support forum for the engine you are using.

Sorry about that.

Yeah i was wonder about that too so i take i little nap and upgrade cycles

1st tab Autorun
Code:
◆If:Time = 1
  ◆Tint Screen:(-68,-68,-68,0), 60 frames (Wait)
  ◆Control Variables:#0008 Time chec = 1
  ◆
:End
◆If:Time = 2
  ◆Tint Screen:(34,-34,-68,170), 60 frames (Wait)
  ◆Control Variables:#0008 Time chec = 2
  ◆
:End
◆If:Time = 3
  ◆Tint Screen:(0,0,0,0), 60 frames (Wait)
  ◆Control Variables:#0008 Time chec = 3
  ◆
:End
◆If:Time = 4
  ◆Tint Screen:(-68,-68,0,68), 60 frames (Wait)
  ◆Control Variables:#0008 Time chec = 4
  ◆Text:None, Window, Bottom
  :    :No more actions for today
  ◆
:End
◆Control Self Switch:A = ON

2nd tab Parralel
Code:
◆If:Time chec ≠ Time
  ◆Control Self Switch:A = OFF
  ◆
:End

So now game check only one IF

If it's not affect game i think will stop on that for now, but I have some problems with NPC when I try interact with them

@Sauteed_Onion

So for now how i understand parallel process will work only on that map that you activated so if add timer like 1sec/60 frames so it will fixate how many time this Event make check
The following is a copy of a combination in game calendar & day/night cycle common event, that runs as a parallel process in my projects. You might find it useful.

Spoiler: Time Event
◆Wait:300 frames
◆Control Variables:#0001 Minute += 1
◆If:Minute ≥ 60
◆Control Variables:#0002 Hour += 1
◆Control Variables:#0001 Minute = 0
◆
:End
◆If:Hour ≥ 24
◆Control Variables:#0003 Day += 1
◆Control Variables:#0002 Hour = 0
◆
:End
◆If:Day ≥ 29
◆Control Variables:#0004 Month += 1
◆Control Variables:#0003 Day = 1
◆
:End
◆If:Month ≥ 14
◆Control Variables:#0005 Year += 1
◆Control Variables:#0004 Month = 1
◆
:End
◆If:Hour = 5
◆Control Switches:#0002 Pre-Dawn = ON
◆Control Switches:#0003 Dawn = OFF
◆Control Switches:#0004 Day = OFF
◆Control Switches:#0005 Dusk = OFF
◆Control Switches:#0006 Twilight = OFF
◆Control Switches:#0007 Night = OFF
◆
:End
◆If:Hour = 6
◆Control Switches:#0002 Pre-Dawn = OFF
◆Control Switches:#0003 Dawn = ON
◆Control Switches:#0004 Day = OFF
◆Control Switches:#0005 Dusk = OFF
◆Control Switches:#0006 Twilight = OFF
◆Control Switches:#0007 Night = OFF
◆
:End
◆If:Hour = 7
◆Control Switches:#0002 Pre-Dawn = OFF
◆Control Switches:#0003 Dawn = OFF
◆Control Switches:#0004 Day = ON
◆Control Switches:#0005 Dusk = OFF
◆Control Switches:#0006 Twilight = OFF
◆Control Switches:#0007 Night = OFF
◆
:End
◆If:Hour = 19
◆Control Switches:#0002 Pre-Dawn = OFF
◆Control Switches:#0003 Dawn = OFF
◆Control Switches:#0004 Day = OFF
◆Control Switches:#0005 Dusk = ON
◆Control Switches:#0006 Twilight = OFF
◆Control Switches:#0007 Night = OFF
◆
:End
◆If:Hour = 20
◆Control Switches:#0002 Pre-Dawn = OFF
◆Control Switches:#0003 Dawn = OFF
◆Control Switches:#0004 Day = OFF
◆Control Switches:#0005 Dusk = OFF
◆Control Switches:#0006 Twilight = ON
◆Control Switches:#0007 Night = OFF
◆
:End
◆If:Hour = 21
◆Control Switches:#0002 Pre-Dawn = OFF
◆Control Switches:#0003 Dawn = OFF
◆Control Switches:#0004 Day = OFF
◆Control Switches:#0005 Dusk = OFF
◆Control Switches:#0006 Twilight = OFF
◆Control Switches:#0007 Night = ON
◆
:End
◆If:Region = 0
◆Tint Screen:(0,0,0,0), 60 frames
◆
:End
◆If:Region = 1
◆If:Pre-Dawn is ON
◆Tint Screen:(34,-34,-68,170), 60 frames
◆
:End
◆If:Dawn is ON
◆Tint Screen:(68,-34,-34,0), 60 frames
◆
:End
◆If:Day is ON
◆Tint Screen:(0,0,0,0), 60 frames
◆
:End
◆If:Dusk is ON
◆Tint Screen:(68,-34,-34,0), 60 frames
◆
:End
◆If:Twilight is ON
◆Tint Screen:(34,-34,-68,170), 60 frames
◆
:End
◆If:Night is ON
◆Tint Screen:(-68,-68,0,68), 60 frames
◆
:End
◆
:End

For any dungeons or building interiors you need to adjust the "Region" variable to "0", to remove any tinting. I recommend placing a parallel event in the upper or lower right or left corners of each map to assign the correct number to the "Region" variable.

I also use a parallel weather event, that operates off of the hour cycle of time event, & control of the weather variable, via RNG on each "hour". Just like with the time event "Region" variable set to "0", effectively turns off the events. You can also create multiple weather pattern types by simply having different region ids for each type of weather pattern.

So for example heavy snowfall up in the mountains, heavy rain & fog on the coasts, & a lack of precipitation in the desert regions.

Spoiler: Weather Event
◆If:Region = 0
◆Set Weather Effect:None, 60 frames
◆
:End

◆If:Region = 1
◆If:Hour = 0
◆Control Variables:#0008 Weather = Random 1..10
◆If:Weather = 1
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 2
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 3
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 4
◆Set Weather Effect:Rain, 3, 999 frames
◆Play BGS:Rain1 (50, 100, 0)
◆
:End
◆If:Weather = 5
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 6
◆Set Weather Effect:Rain, 6, 999 frames
◆Play BGS:Rain3 (50, 100, 0)
◆
:End
◆If:Weather = 7
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 8
◆Set Weather Effect:Rain, 9, 999 frames
◆Play BGS:Rain4 (50, 100, 0)
◆
:End
◆If:Weather = 9
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 10
◆Set Weather Effect:Storm, 9, 999 frames
◆Play BGS:Storm2 (50, 100, 0)
◆
:End
◆
:End
◆If:Hour = 1
◆Control Variables:#0008 Weather = Random 1..10
◆If:Weather = 1
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 2
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 3
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 4
◆Set Weather Effect:Rain, 3, 999 frames
◆Play BGS:Rain1 (50, 100, 0)
◆
:End
◆If:Weather = 5
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 6
◆Set Weather Effect:Rain, 6, 999 frames
◆Play BGS:Rain3 (50, 100, 0)
◆
:End
◆If:Weather = 7
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 8
◆Set Weather Effect:Rain, 9, 999 frames
◆Play BGS:Rain4 (50, 100, 0)
◆
:End
◆If:Weather = 9
◆Set Weather Effect:None, 60 frames
◆
:End
◆If:Weather = 10
◆Set Weather Effect:Storm, 9, 999 frames
◆Play BGS:Storm2 (50, 100, 0)
◆
:End
◆
:End

If you want to get really complicated you can create different seasonal tilesets, & have the time event change the tilesets of the map, based on the "month" variable as well.

With enough of work most things can be evented.
Wow, this is really good meat and potatoes. I was actually wondering how hard it would be to implement these systems. Thanks guys/gals. :3
The following is a copy of a combination in game calendar & day/night cycle common event, that runs as a parallel process in my projects. You might find it useful.

Thanks, I see you spend a lot time to think this through. Butt my idea more casual, 1 action change part of day.
For now i have problem for NPC interact with time, so i think how solve it, put NPC coordinate in 1st or some how make individual schedule

Can one event finish of process of another ? Or reset self switch of another?
Thanks, I see you spend a lot time to think this through. Butt my idea more casual, 1 action change part of day.
For now i have problem for NPC interact with time, so i think how solve it, put NPC coordinate in 1st or some how make individual schedule

Can one event finish of process of another ? Or reset self switch of another?

I am honestly not certain what you're asking me here.

Wow, this is really good meat and potatoes. I was actually wondering how hard it would be to implement these systems. Thanks guys/gals. :3

My current primary project that I created this for, is intended to be the first entry in a continuing IP. So I try to make the world feel "lived in".

For example, NPC events can have multiple pages, each being contingent upon which time trigger is active. Which in turn gives the NPCs a schedule to operate on, rather than just having them stand in place. Or books opening into a picture file with text detailing game world lore.

It's a good bit of work at first, but the advantage lies in the fact that once created, the files can be carried over to future projects, via a simple copy & paste. & that familiarity can be played upon, for example in future entries in the series, having books & NPCs reference events of previous games.
I am honestly not certain what you're asking me here.

I asked about

Which in turn gives the NPCs a schedule to operate on, rather than just having them stand in place.

For now I have cycles in game day, but i can't figure out how make NPC use triggers parallel (to scan cycle) then Action button (to interact with them) then again parallel (so they still scan day time)
I asked about

For now I have cycles in game day, but i can't figure out how make NPC use triggers parallel (to scan cycle) then Action button (to interact with them) then again parallel (so they still scan day time)

If I am understanding you, what you need to do, is create multiple event pages within the "NPC" event itself. With each event page linked to a trigger or variable amount. Along with programming the activity you're wanting the NPC to do, into a custom move route. & then have what you want the NPC to do, when interacting with the player, being the event entry itself.
If I am understanding you, what you need to do, is create multiple event pages within the "NPC" event itself. With each event page linked to a trigger or variable amount. Along with programming the activity you're wanting the NPC to do, into a custom move route. & then have what you want the NPC to do, when interacting with the player, being the event entry itself.

Ok I undersandt now, i need create separate parallel event that will track NPC.
Example pool
NPC appear there only afternoon
Where i need hide him in other time ? Make transparent and through ON?
Ok I undersandt now, i need create separate parallel event that will track NPC.
Example pool
NPC appear there only afternoon
Where i need hide him in other time ? Make transparent and through ON?

That's certainly an option,

Personally I was planning on using something along those lines myself for certain NPCs, like guards so they have a day shift & a night shift; or kids playing outside during the day, then inside a house at night.
After further development, to make smooth experience I upgraded my time event

So 1st page: Add Fade-in/out, to avoid visible NPC teleportation around map. Add day counter but it's not important it's for other event purpose
Code:
◆If:Time = 1
  ◆Fadeout Screen
  ◆Tint Screen:(-34,-34,0,0), 60 frames (Wait)
  ◆Fadein Screen
  ◆Control Variables:#0008 Time chec = 1
  ◆
:End
◆If:Time = 2
  ◆Fadeout Screen
  ◆Tint Screen:(0,0,0,0), 60 frames (Wait)
  ◆Fadein Screen
  ◆Control Variables:#0008 Time chec = 2
  ◆
:End
◆If:Time = 3
  ◆Fadeout Screen
  ◆Tint Screen:(-102,0,0,0), 60 frames (Wait)
  ◆Fadein Screen
  ◆Control Variables:#0008 Time chec = 3
  ◆
:End
◆If:Time = 4
  ◆Fadeout Screen
  ◆Tint Screen:(-68,-68,0,68), 60 frames (Wait)
  ◆Fadein Screen
  ◆Control Variables:#0008 Time chec = 4
  ◆
:End
◆If:Time = 5
  ◆Fadeout Screen
  ◆Tint Screen:(-68,-68,0,119), 60 frames (Wait)
  ◆Fadein Screen
  ◆Control Variables:#0008 Time chec = 5
  ◆
:End
◆If:Time > 5
  ◆Control Variables:#0006 Day += 1
  ◆Control Variables:#0007 Time = 1
  ◆
:End
◆If:Day > 7
  ◆Control Variables:#0006 Day = 1
  ◆
:End
◆Control Switches:#0008 Time chec = ON

And most important it's page 2, i stop use self-switch bc, when i travel to other map i have repeat Fade-in/out, now it's fixed.
Waiting 60 needed bc i have other parallel event that control NPC appearance depending on time, that will must minimize affect on performance if in future i need other parallel events.

Code:
◆If:Time chec ≠ Time
  ◆Control Switches:#0008 Time chec = OFF
  ◆
:End
◆Wait:60 frames
A little late to the parade, but wanted to drop this one over here:
A little late to the parade, but wanted to drop this one over here:


Yeah I know that channel, but like i say before my time system work on other principles. Time in my game changed by action not by time itself(clock). But thanks
Yeah I know that channel, but like i say before my time system work on other principles. Time in my game changed by action not by time itself(clock). But thanks

Mostly, I was pointing out to the "darkness" changes. From personal tinkering, applying alpha-opecity darkness messed with framerates. This was reasonably created.
Mostly, I was pointing out to the "darkness" changes. From personal tinkering, applying alpha-opecity darkness messed with framerates. This was reasonably created.

Ok, but i don't hear anything about it in video that you linked 😅
Ok, but i don't hear anything about it in video that you linked 😅
Did you watch both videos? One is Some Random Dude and the other is Driftwood Gaming. I don't know if I liked the key item that tells us what time and such, but I like the idea of making alarm clocks and maybe an onscreen prompt after sleeping at an inn.
Did you watch both videos? One is Some Random Dude and the other is Driftwood Gaming. I don't know if I liked the key item that tells us what time and such, but I like the idea of making alarm clocks and maybe an onscreen prompt after sleeping at an inn.
Yeap both, I don't need clock, and there nothing about that tint filter give drop in frame rate. 😅

If he even reffer to
All works for now, but i wonder how practical it will be and maybe there already some methods that much better?
For now I just watch Youtube lessons

He don't say why clock are will be better for my game, he just drop video. And then say stuff that was not in the video.
Ok, but i don't hear anything about it in video that you linked 😅
Yes, pardon. Its the second video (by Driftwood Gaming) that goes into the meat of clockrate (frame counts) and optimized tinting that SRD skimped on.

After re-reading the entire thing, I think I understand now what you are trying to do...
1. You need to "control" day-time cycle, but do it manually, not with a frame-based clock.
Example: PC tends garden, drinks some tea, talks to friend = 3 actions complete > set to "evening"
2. You need to display different people at different day times.
Example: In the morning you have NPC1 at the market that you can chat with, In the evening guards at the gates won't talk to you and the NPC at the market is gone.

Let me know if I am getting you right.
Як треба пиши Українською, я перекладу.

If you want to get really complicated you can create different seasonal tilesets, & have the time event change the tilesets of the map, based on the "month" variable as well.

With enough of work most things can be evented.

That is actually an interesting idea. Have you tinkered with that on a code-level, instead of creating different maps? This gave me an idea to try something. Thank you for something to tinker with. =)

Original thread: https://forums.rpgmakerweb.com/threads/beginer-development-times-of-day.89383/