Home › Lua API › Calendar

Available out of the box. Usable from Lua in the unmodified game.

Calendar

4 methods. Symbol/current columns are function addresses (RVA) of the native wrapper.

Signatures are recovered from the game code. ⚠ = partly understood (arguments may be missing or approximate). ? after a name = optional argument. Types: integer/number are Lua numbers, enum-typed arguments show the C++ type in brackets. Two signatures mean the method is registered separately for the UI and the gameplay state and each wrapper was decoded on its own. "same code as" in the Symbol column means the compiler merged identical functions: those methods share one wrapper and cannot be told apart by address.

Method Signature Where Reference Symbol Current
GetTurnMonthForGame Calendar.GetTurnMonthForGame(iGameTurn?: number, eCalendar?: integer[CalendarTypes], eSpeed?: integer[GameSpeedTypes], eStartEra?: number) → number
args: eCalendar — Value of the CalendarTypes enum (a type index).; eSpeed — Value of the GameSpeedTypes enum (a type index).
✓ exists at runtime (not called)
ui-cache — 0x6867e0 0x686dc0
GetTurnYearForGame ★ Calendar.GetTurnYearForGame(iGameTurn?: number, eCalendar?: integer[CalendarTypes], eSpeed?: integer[GameSpeedTypes], eStartEra?: number) → number
args: eCalendar — Value of the CalendarTypes enum (a type index).; eSpeed — Value of the GameSpeedTypes enum (a type index).
✓ exists at runtime (not called)
ui-cache — 0x686910 0x686ef0
MakeDateStr Calendar.MakeDateStr(arg1?: number, eCalendar?: integer[CalendarTypes], eSpeed?: integer[GameSpeedTypes], arg4?: number) → string
args: eCalendar — Value of the CalendarTypes enum (a type index).; eSpeed — Value of the GameSpeedTypes enum (a type index).; arg4 — A boolean flag (true/false).
✓ exists at runtime (not called)
ui-cache — 0x686a40 0x687020
MakeYearStr Calendar.MakeYearStr(arg1?: number, eCalendar?: integer[CalendarTypes], eSpeed?: integer[GameSpeedTypes], arg4?: number) → string
args: eCalendar — Value of the CalendarTypes enum (a type index).; eSpeed — Value of the GameSpeedTypes enum (a type index).
✓ exists at runtime (not called)
ui-cache — 0x686bc0 0x6871a0

Notes (★)

GetTurnYearForGame

Returns the calendar year for a game turn.