Jump to content


Photo

Timer Information

time timers nearinfinity variables

  • Please log in to reply
No replies to this topic

#1 Anton

Anton
  • Member
  • 4 posts

Posted 01 January 2014 - 09:56 PM

Hello all,

I think I have finally figured out how the various timer variables are measured.  I have not seen this information anywhere else, so thought I'd post it.  Please feel free to add any more info on timers in this thread (or correct me).

 

If you open a save file in Near Infinity (BALDUR.GAM), you see two unitless game times: "game seconds" and "real seconds" (clearly a misnomer, as a quick test shows the units are smaller than real seconds).  Here are the units:

 

Game Seconds: Units are real life seconds.


"Real Seconds":  Units are frames, i.e. 1/30th of a second at 30 fps.

 

Now, in the variables of the save file there are many timer variables.  These are given in yet another unit.


Timer Variables: Units are ticks, i.e. 1/15th of a second at 30 fps.

 

Some other timer-related info accumulated from various websites:

 

SetGlobalTimer takes a time in real life seconds.  Multiply by twelve to get game "seconds".

 

1 game day takes 7200 seconds (12x real life speed)

 

1 round = 6 real life seconds = 90 ticks = 180 frames

1 turn = 60 real life seconds = 900 ticks = 1800 frames

1 game hour = 300 real life seconds (5 minutes) = 4500 ticks = 9000 frames

 

IEDSP on timers: http://gemrb.org/ies...ices/timers.htm

 

From the above link: "To detemine whether timers have expired, the engine subtracts the current clock value from the time value. A negative result means the timer has expired..."

 

Note that since the timer variable is in ticks and the game time is in real life seconds, the game must divide the timer value by 15 before subtracting the game time.  Similarly you must take this into account if you are editing a timer in a save game.

 







Also tagged with one or more of these keywords: time, timers, nearinfinity, variables