GetGameDaysPassed

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns the precise number of game days passed since the specified YYYYMMDD date.

  • If the optional arguments are omitted, the function returns the number of days passed since 10/13/81 (October 13, 2281).
  • Using this function is preferable to using the GameDaysPassed global variable, which is highly unreliable.

Syntax

[help]
(daysPassed:float) GetGameDaysPassed year:int month:int day:int

Example

set fDaysPassed to GetGameDaysPassed
set fDaysPassed to GetGameDaysPassed 2282 2 10 

Notes

  • month uses standard month numbering (1 - 12), but the GameMonth global variable numbers the months from 0 to 11.
  • When using mods that change the start date such as TTW, you need to amend the starting year to 2277 08 17 Otherwise, this function may return negative numbers.