How to make time pass with every step in overworld?

Basically, I'm creating a parallel event in the overworld that adds +1 to a time variable with every step the player takes. This time variable cannot reset when the player enters an area, but it has to be reset at the beginning of every day. Furthermore, events like sleeping at an inn can also reset the time variable to morning. Basic day-night cycle stuff. I'm pretty sure it can be done because I've done it before, but my old computer died so I've lost my old data. I'm losing my mind trying to recreate what should be a simple event. Any ideas on what can be done?
Thank you for reading.
So you don't want it to be dependent at all on the actual time passing, but literally measured by steps?

It's a little hard to give you exact instructions because you don't say what you want your increments of step-time to be. But basically you'd:
Set variable A equal to steps
See if variable A is greater than variable B.
If yes, do time stuff.
Set variable B equal to variable A.
Wait 6.
So you don't want it to be dependent at all on the actual time passing, but literally measured by steps?

It's a little hard to give you exact instructions because you don't say what you want your increments of step-time to be. But basically you'd:
Set variable A equal to steps
See if variable A is greater than variable B.
If yes, do time stuff.
Set variable B equal to variable A.
Wait 6.
Sorry about that. I want the time increments to be 1-6. Here's a common event of the time effecting the screen tint.
◆If:travel time = 1
◆Tint Screen:(-68,-68,0,68), 60 frames (Wait)
◆Exit Event Processing
◆
:End
◆If:travel time = 2
◆Tint Screen:(68,-34,-34,0), 60 frames (Wait)
◆Exit Event Processing
◆
:End
◆If:travel time ≤ 4
◆Tint Screen:(0,0,0,0), 60 frames (Wait)
◆Exit Event Processing
◆
:End
◆If:travel time = 5
◆Tint Screen:(68,-34,-34,0), 60 frames (Wait)
◆Exit Event Processing
◆
:End
◆If:travel time = 6
◆Tint Screen:(-68,-68,0,68), 60 frames (Wait)
◆Exit Event Processing
◆
:End
◆If:travel time = 7
◆Tint Screen:(-68,-68,0,68), 60 frames (Wait)
◆Control Variables:#0004 travel time = 1
◆Exit Event Processing
◆
:End
I've tried doing the following:
◆Control Variables:#0003 stepbasedtime = Steps
◆If:stepbasedtime > travel time
◆Control Variables:#0004 travel time += 1
◆Common Event:time
◆
:End
◆Wait:6 frames
The problem with this is that the number of steps is always going to be greater than the time variable, so this leads to the screen tinting itself in an infinite loop.

And for the record, when I say measured by steps, I mean I want the value to go up when the player moves. It doesn't literally have to be the in-game value "Steps" that controls the value of time.
I've tried doing the following:
◆Control Variables:#0003 stepbasedtime = Steps
◆If:stepbasedtime > travel time
◆Control Variables:#0004 travel time += 1
◆Common Event:time
◆
:End
◆Wait:6 frames
The problem with this is that the number of steps is always going to be greater than the time variable, so this leads to the screen tinting itself in an infinite loop.
This doesn't look like what I described to you above.

Yes, obviously, if you're comparing the number of steps which will be up in the hundreds or more, that will be higher than your time going from 1-6.

That's why you need a second variable that's storing what the steps were the last time you checked.

And for the record, when I say measured by steps, I mean I want the value to go up when the player moves. It doesn't literally have to be the in-game value "Steps" that controls the value of time.
Well, Steps are the way to keep track of whether the player has moved, right? If you want it based on movement, not actual time, then that's what you incorporate into your calculations.

So if you want, say, every 10 steps to increment your time...
1698110184787.png
This doesn't look like what I described to you above.

Yes, obviously, if you're comparing the number of steps which will be up in the hundreds or more, that will be higher than your time going from 1-6.

That's why you need a second variable that's storing what the steps were the last time you checked.


Well, Steps are the way to keep track of whether the player has moved, right? If you want it based on movement, not actual time, then that's what you incorporate into your calculations.

So if you want, say, every 10 steps to increment your time...
View attachment 281190
This worked! Thanks so much!
Late to the party but there is a Japanese plugin for this

This is a plugin that introduces a classic time passing system where time passes every time you walk.
The time periods can be Morning, Noon, Evening, Night, LateNight, and Dawn.

@AquaEcho If it wouldn't exceed the character limit, I'd give you a dollar to change your title to "There's a Japanese plugin for this" 😉
@AquaEcho If it wouldn't exceed the character limit, I'd give you a dollar to change your title to "There's a Japanese plugin for this" 😉
They have their own parallel plugin ecosystem over there and don't use Yanfly/VisuStella for everything like we do here. It's kinda impressive .
@AquaEcho Oh I'm not knocking it at all. Keep spreading the love.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-time-pass-with-every-step-in-overworld.162315/