Help with Day/night cycle not based on time "waiting frames"

I need help on day night cycles all of the videos and tutorials I've seen on day/night cycles are based on time aka "wait frames" but I don't want to do day/night cycles based on that. What I want to do is base them on events, example there are 3 time of day morning, midday, night time. When ever your character completes a quest, does a job, or completes a event it turns into midday, then do another quest, job, etc and it turns into night. How would one do that? All the videos out there do 0 justice.
the same way almost.

Create a parallel common event and use this event (improve where needed)

create a variable (call it time cycle or whatever you want to call it)
than use the following

if: variable x = 0 (variable x is the ID you want to use)
tint screen (xxx, xxx, xxx) (day tint) change tint to what you want
end
if: variable x = 1
tint screen (same as above, but for midday)
end
if variablt x = 2
tint screen (night day)
end
if: variable x > 2
controle variable = 0
end

now in your event, when a quest is compleet, add variable x += 1
when a objective is compleet, add variabe x += 1
and so on.

whenever variable x = 2 or higher, it will be 0, meaning, when 2 become 3,
2 becomes 0 so you basicly add + 1 everytime.

if you can sleep to become day, use variable x = 0 to become day time.
Cut out the "time counting" variable and parallel event stuff and simply call the update event at the end of every quest. 🙂
One cool thing to do would be to get the actual system time and then act on that.
I do something similar with dates:
JavaScript:
var d = new Date();
$gameVariables.setValue(1, d.getDay());
$gameVariables.setValue(2, d.getFullYear());

You can get the day, month, year, and so on, and do cool stuff with it.
I haven't tried getting the time but it should be pretty easy. Look online for JS time object.
Is there a video that goes more in depth into this, please. cause I'm having the same problem. I'm still very new to Rpgmaker MV, so I can't make heads out tails of the explanation above.
@Penguin_Pilot Please start a new thread with your full question. As it is, I'm not sure what "this" you are wanting more depth on, as there are several things mentioned in this thread.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-day-night-cycle-not-based-on-time-waiting-frames.122686/