Checking Time Outside of Game

I was wondering if there is an easy way to keep track of time passing outside of the game? For example, 'The Stanley Parable' has an achievement that requires you to not play for 5 years.


Now that I give it a bit more thought, I imagine it might check the year of your last saved game, or even have a script to log the last time it was closed and store it as a variable, then when you open the game again, it would use basic math to check the difference between the two. Any ideas?
I never knew this until I looked just now but apparently there is a Time library in Ruby that includes such useful commands as Time.now and Time.utc!  I don't know whether they work in Ace or not but I imagine it would.  So yeah, if this works, you could theoretically have a global variable in the game that updates every few moments with the current time, or make it part of your Save method.


It definitely works in MV, where Time is even used by the default scripts rather than frames.
Yes, the ruby libraries Time class works fine in vx ace.

Code:
Time.now

Is the method i would recommend.


Keep in mind, it will use the local time on the users computer. (which is easily manipulated by the user)
Keep in mind, it will use the local time on the users computer. (which is easily manipulated by the user)

Yes, that is what I was looking for, but am saddened that it can be manipulated by the user (which I have actually done in another game to advance the time).

I never knew this until I looked just now but apparently there is a Time library in Ruby that includes such useful commands as Time.now and Time.utc!  I don't know whether they work in Ace or not but I imagine it would.  So yeah, if this works, you could theoretically have a global variable in the game that updates every few moments with the current time, or make it part of your Save method.

Thanks, I will definitely check this stuff out.
You could use my vx ace http scripts, to perform a simple get request to some server that returns a timestamp. 🙂
That way it could not easily be forged by the user. 😀

Original thread: https://forums.rpgmakerweb.com/threads/checking-time-outside-of-game.61285/