Tips about making npc appear on the Day/night cycle. and light

Hello there, so straight to the point:
I made a simple day/night cycle on my game i am making with 2 pararel events.
The player can progress from the morning/mid day/evening/night with a simple variable event, and i also made another event where the screen tints accordingly on the variable value.
( 0-3)
Now then the thing is that i need certain certain npc to appear only in the morning or midday or evening and on the event page, the condition branch for the Variables, i can only select the value equal or bigger. Meaning that somehow i can select the nps to appear only from the night up. If i select value 3 ( night) he will appear at night. If i select 2 (evening) it will spawn at evening and night and so on, but i can’t make him appear only on mornings or midday….I am sure there is a way because i’ve seen that at other games.
Now my guess ( but i haven’t tried it yet) is that maybe is best to create instead 4 separate events/variables and name them after the period of the day and maybe that will fix it but i am not sure how that would work with the other event where the player can progress the day pressing the event button ( i made a clock as a event)

Any tip on how i could improve this system please?

Also a second issue i will have in the future is the lighting….i want to have lamp little lights around the map on evenings and night but i guess the tint screed command would allow it or idk, i am kinda new on rpg maker…any tips on that too?
Thank you for your time

in case thiz help
Generally, when you want to have an event page that appears whenever a variable is between two values, you can add another empty page after it that will be set to activate above the maximum value.

More specifically for time systems, you'd probably want to have a switch for each time of day, and have whatever event is responsible for changing time also adjust those switches.

For the lamps - do you want them to actually provide light? Then you'd need some form of a lighting plugin. Otherwise, handle them with events, or if there are a lot of changes between day and night, with separate maps or tilesets.
Generally, when you want to have an event page that appears whenever a variable is between two values, you can add another empty page after it that will be set to activate above the maximum value.

More specifically for time systems, you'd probably want to have a switch for each time of day, and have whatever event is responsible for changing time also adjust those switches.

For the lamps - do you want them to actually provide light? Then you'd need some form of a lighting plugin. Otherwise, handle them with events, or if there are a lot of changes between day and night, with separate maps or tilesets.
Thank you for answering!
Hmm so you say that i should “translate” the system i’ve made into a switch , more precisely 4 switches?
Then make an interactive event where the player can handle those switches?
I never used them si ce i am new but i saw them.

I will try to do something with what you told me thx.

As for the lighting… I really have no idea wich is the best way because if i use tint screen command, the evenings and night get very dark and while i don’t mind that too much, i have lamp around the maps wich they are dark too and looks ugly.
I only want to look the maps when they are dark that there is other light source too

Generally, when you want to have an event page that appears whenever a variable is between two values, you can add another empty page after it that will be set to activate above the maximum value.

More specifically for time systems, you'd probably want to have a switch for each time of day, and have whatever event is responsible for changing time also adjust those switches.

For the lamps - do you want them to actually provide light? Then you'd need some form of a lighting plugin. Otherwise, handle them with events, or if there are a lot of changes between day and night, with separate maps or tilesets.
If you don’t mind too much, could you tell me more precisely how to do with the switches? Thx
if you use switches, then you make one event page for each switch and have it do whatever the event should be at the time that switch is active - which can be a no sprite event page to pretend the event isn't there at that time.
Well thx for answering... I tried it but i think i am not doing it correctly...can you have a look?
What does "I think I am not doing it correctly" mean? What is happening instead of what you want?

At first glance, the logic looks fine.
What does "I think I am not doing it correctly" mean? What is happening instead of what you want?

At first glance, the logic looks fine.
Well, it doesn’t work, the screen doesn’t tint. When I was using a variable, it worked fine.
That event doesn't look like it would work fine in the first place because it's a parallel event with no off condition.

So it's going to be continuously trying to tint the screen every second.

You should almost never have parallel events without a way to turn off, or a Wait.

In this case, your parallel event should turn on a switch at the bottom of the page, like Time Checked On. Then give the event a second page with the condition of Time Checked that has no commands in it.

Your time advancing dude turns on whatever time of day switch and also turns off Time Checked so that parallel event will run once more.

Or just stick those tint commands right into the time advancing event - why do they need to be separate? Is there a different way for time to advance?

You don't show all of your time advancing event this time, but I notice in the first one there's an Exit Event Processing at the bottom - that's useless. There are already no commands beneath it, so there's no reason to say "exit this event before doing the rest of the empty lines".
That event doesn't look like it would work fine in the first place because it's a parallel event with no off condition.

So it's going to be continuously trying to tint the screen every second.

You should almost never have parallel events without a way to turn off, or a Wait.

In this case, your parallel event should turn on a switch at the bottom of the page, like Time Checked On. Then give the event a second page with the condition of Time Checked that has no commands in it.

Your time advancing dude turns on whatever time of day switch and also turns off Time Checked so that parallel event will run once more.

Or just stick those tint commands right into the time advancing event - why do they need to be separate? Is there a different way for time to advance?

You don't show all of your time advancing event this time, but I notice in the first one there's an Exit Event Processing at the bottom - that's useless. There are already no commands beneath it, so there's no reason to say "exit this event before doing the rest of the empty lines".
I understand, that first 2 photos are from the first Day cycle i made but from a tutorial from youtube. It did worked perfectly but since i am a beginner, i can’t tell if is the best way or not. From what i remember , the dude from that video put it that way that when u press action button on the clock (time progression event) it would ask you if you want to progress the day and if u say yes, then screen tints and you could say that you passed from morgning to evening, but if you say “no” then does nothing. However that system is a little useless somewhat because i need to make npc appear at a period of the day and when i create a new event as an npc, on the left size i can only select an equal or bigger value from the “Time of the day” variable wich is not efficient.
I tried it but i think i am not doing it correctly...can you have a look?
that event has absolutely nothing to do with what I was writing about.
I was writing about using multiple event pages and the conditions, you placed conditional branches on a single event page.

conditions are top left and are NOT condiotional branches.
And multiple event pages need the button "new event page" in the top line

I strongly suggest that you work through the build-in tutorials to get the basics of eventing
you need 2 switches to spawn events by day/night.
events spawning during the day shall appear when DAY == ON.
events spawning at night shall appear when NIGHT == ON.
an event spawning not-when-DAY==ON doesn't mean it will appear during night, as per the program's view, DAY doesn't inherently imply NOT-NIGHT (!NIGHT) and viceversa, because both are independent variables.
you must establish that one is the opposite of the other by making them both positive and flipping them around as the cycle changes.

using more than 2 switches is messy.
use a variable counting hours (or, fractions of day: 4, 6, 8, etc) and reset when VAR>X within your clock system

don't use nested conditionals whenever possible.
if VAR == N inherently implies VAR != M, all conditionals will prove False except one.
nesting only helps when preventing a double validation when the value is tested against an interval, not discreet values.
that event has absolutely nothing to do with what I was writing about.
I was writing about using multiple event pages and the conditions, you placed conditional branches on a single event page.

conditions are top left and are NOT condiotional branches.
And multiple event pages need the button "new event page" in the top line

I strongly suggest that you work through the build-in tutorials to get the basics of eventing
Thank you for answering and sorry for the confusion of the last 2 photos,
I understood the part of settinp up the days with switches on separate events pages
However i felt like the info you gave me was a little incomplete, i know that if i had more experience i would know what to do from doing what you said but after i set up the periods of the day on 4 pages…then what? 🙂) so after i did what you said i didn’t know how to set the other event where the player can change from morning to midday an so on. If you really want: can you explain into a simple tutorial:
Make 1 event+ 4 pages, add 4 switches with separate day periods then add tint command etc etc etc…
I hoped for this kind of mini tutorial hahaha.
However thank you for your time
you need 2 switches to spawn events by day/night.
events spawning during the day shall appear when DAY == ON.
events spawning at night shall appear when NIGHT == ON.
an event spawning not-when-DAY==ON doesn't mean it will appear during night, as per the program's view, DAY doesn't inherently imply NOT-NIGHT (!NIGHT) and viceversa, because both are independent variables.
you must establish that one is the opposite of the other by making them both positive and flipping them around as the cycle changes.

using more than 2 switches is messy.
use a variable counting hours (or, fractions of day: 4, 6, 8, etc) and reset when VAR>X within your clock system

don't use nested conditionals whenever possible.
if VAR == N inherently implies VAR != M, all conditionals will prove False except one.
nesting only helps when preventing a double validation when the value is tested against an interval, not discreet values.
Hi, thx for your time
So let’s see if my little begginner brain understands this.
Shorts words
2 switches:
1 day with 2 variables ( morning and midday)
1 night ( evening and night)
Is that right?
However i kinda understood the port on how tho make my npc appear on the periods of the day using switches.
I am having trouble understanding how to make the day periods change on the player will.
Short story:
The player want to speak to a certain npc(quest giver) in evening. Then he goes to the bedroom and interacts with a clock (event) and then he will change from morning to midday then again to evening and then the npc appear. This is what i am trying to accomplish

As for variables, i did try that with a tutorial from youtube and the result are in the first comment i posted, the system work as intended but i can’t or don’t know how to make certain npc appear according those variables.
When making a new event on top left, i can only select a bigger or equal variable value .
that event has absolutely nothing to do with what I was writing about.
I was writing about using multiple event pages and the conditions, you placed conditional branches on a single event page.

conditions are top left and are NOT condiotional branches.
And multiple event pages need the button "new event page" in the top line

I strongly suggest that you work through the build-in tutorials to get the basics of eventing
The condition on top left are the ones who once are met ( switch 001=on) they then become active is that right?
Ilso i know ho to make events in general, the only thing I incredibly lack is the knowledge of variables/ switches/ conditions. But your are right i should follow an tutorial about these to understand better. It would be even better if i could find a tutorial with exact same way of setting day periods but i couldn’t find one
Double-post notice: @Mr_Blvck
how to make the day periods change on the player will
make a common event with the counter for each hour, resetting on > 23.
use that global variable to drive the system.
within that common event, upon increase OR reset of the variable, check for either DAY or NIGHT.
when Hour checks within 6 and 18, it's DAY. NIGHT is then NOT-DAY.
when Hour checks NOT within 6 and 18, it's NOT-DAY, therefore NIGHT is NOT-(NOT-DAY)

fix one consideration, and work with the fact that every other consideration is NOT-this, or this + X.
make a common event with the counter for each hour, resetting on > 23.
use that global variable to drive the system.
within that common event, upon increase OR reset of the variable, check for either DAY or NIGHT.
when Hour checks within 6 and 18, it's DAY. NIGHT is then NOT-DAY.
when Hour checks NOT within 6 and 18, it's NOT-DAY, therefore NIGHT is NOT-(NOT-DAY)

fix one consideration, and work with the fact that every other consideration is NOT-this, or this +
Thanks for answering, looks like a option for a simple Day and Night day period amd i will consider it, however i have a plugin wich goes with seconds/minutes/hours/days/months/years wich is wayyy to complicated for what i need, and I also have one similar for what you just said wich is also good.
But I was hoping for something in between these 2 Like Morning-Midday-Evening-Night.
Maybe is possible to do the same with the way you proposed or with switches but i just don’t know how to set them up
Like step by step haha
instead of cycling after 23, have the variable cycle at 3 - and then handle it with moring =0, midday =1, evening =2 and night =3
instead of cycling after 23, have the variable cycle at 3 - and then handle it with moring =0, midday =1, evening =2 and night =3
This is exactly what i did. But variables
The problem is, when i create an npc on top left where the condition are , if i am not wrong, i can only select the variable value bigger or equal.
Meaning that if i select 2 then it will appear on 2 and 1 and 0. This is where idk how to handle
I just don’t know how to make them appear only on those variable values or to select multiple values
As said above, you need multiple event pages. and higher page numbers have higher priority.
so make the first page on 0 or higer, second page on 1 or higher, third page on 2 or higher and so on.
and as a result each page will only be active on exactly that number, because if the number goes higher the next page will have priority and become acctive

Original thread: https://forums.rpgmakerweb.com/threads/tips-about-making-npc-appear-on-the-day-night-cycle-and-light.165186/