Page 1 of 1

Real time vs Game time

Posted: 17 Sep 2017, 11:05
by kuyondo
Is there a way to keep track of morrowind's game time seconds using scripts? GetSecondsPassed is real time afaik..

Re: Real time vs Game time

Posted: 17 Sep 2017, 11:18
by DestinedToDie
"Set Timescale To value Changes the speed of the day/night cycle. A value of 1 makes the day go at real-time speed; an in-game day would last 24 hours in real life. A value of 10 will make it ten times as fast as real-time (i.e., one in-game day lasts 2.4 hours), etc. The default timescale is 30 (1 in-game day = 48 real minutes)."

In other words, you can base your time counting script on the assumption that 48 minutes = 24 hours. This works, unless the player uses a mod that sets a different timescale.

Re: Real time vs Game time

Posted: 17 Sep 2017, 12:12
by kuyondo
DestinedToDie wrote: 17 Sep 2017, 11:18 "Set Timescale To value Changes the speed of the day/night cycle. A value of 1 makes the day go at real-time speed; an in-game day would last 24 hours in real life. A value of 10 will make it ten times as fast as real-time (i.e., one in-game day lasts 2.4 hours), etc. The default timescale is 30 (1 in-game day = 48 real minutes)."
Thats a useful info. So in that case, 2880 real time seconds = 86400 game time seconds, 1 real time second = 30 game time seconds.

But I think its not possible to keep track of the game time seconds when the player rest. Since time accelerates when resting, its not easy to keep track of it. We would need a complex math script to calculate.

Would be nice to have an extra function like, getgamesecondspassed which returns float. The future of omw will make this feasible.

Re: Real time vs Game time

Posted: 17 Sep 2017, 13:30
by Chris
There's also the case to consider of menus and dialog, where game time is paused. Hopefully at some point, an option for real-time menus can be done, so assuming menus are paused won't necessarily always be reliable.