Ataros, I see 2 reasons for needing ingame "realtime" as opposed to mission run time.
1. If you want to create timelapse over shorter mission time.
For example: Each hour step forward 3 hours.
So during game play of 2~3hours, you could have morning, mid day, dusk and evening.
2. If you want to reset the day, which is actually how clod works.
In theory you can run 24/7 on one "map" layout, which means either night missions(many can't be arsed with that) or being able to reset the time to mission start or some other time.
Btw I tested tod by entering tod into the console, "Shift-Tab" type tod, enter and the console reports the game real time, as IL2 used to.
But I can't find tod in clod, only the Time(), ITime().
During the IL2 series tod shifted between accessable to alter and not accessable to alter between releases.
So ingame realtime is there as tod(via console), but probably not accessable or alterable by game script.
btw I tested my little code snipet above to enter a new section time and this fails as I predicted.
moggal, another and relatively simple way to establish ingame realtime is to gather the mission time by streamreader, then add runtime to the mission start time, there by infering the realtime.
There is probably a way to check "tod" directly, just don't know the syntax to interigate the host/server for tod.
|