Home › Lua API › GameConfiguration
Available out of the box. Usable from Lua in the unmodified game.
GameConfiguration
9 methods. Symbol/current columns are function addresses (RVA) of the native wrapper.
Community reference for this object: GameConfiguration (Sukrit Tan, external).
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 |
| GetGameSpeedType |
GameConfiguration.GetGameSpeedType() → number returns: Key of a row of the GameSpeeds table: the scripts look it up with GameInfo.GameSpeeds[result]. (inferred) |
gameplay |
yes ↗ |
0x6d7cd0 |
0x6d8370 |
| GetMaxTurns |
GameConfiguration.GetMaxTurns() → number |
gameplay |
yes ↗ |
0x6d7d20 |
0x6d83c0 |
| GetStartEra |
GameConfiguration.GetStartEra() → number |
gameplay |
yes ↗ |
0x6d7d70 |
0x6d8410 |
| GetStartTurn |
GameConfiguration.GetStartTurn() → number returns: A turn number (the scripts name the result turn). (inferred) |
gameplay |
yes ↗ |
0x6d7dc0 |
0x6d8460 |
| GetStartYear |
GameConfiguration.GetStartYear() → number |
gameplay |
yes ↗ |
0x6d7e10 |
0x6d84b0 |
| GetTurnTimerType |
GameConfiguration.GetTurnTimerType() → number |
gameplay |
yes ↗ |
0x6d7e60 |
0x6d8500 |
| GetValue ★ |
GameConfiguration.GetValue(arg1?: number) → 1 values (or nothing) ⚠ args: arg1 — A string. |
gameplay |
yes ↗ |
0x6d7eb0 |
0x6d8550 |
| IsAnyMultiplayer |
GameConfiguration.IsAnyMultiplayer() → boolean |
gameplay |
yes ↗ |
0x6d7fa0 |
0x6d8640 |
| IsNetworkMultiplayer |
GameConfiguration.IsNetworkMultiplayer() → boolean |
gameplay |
yes ↗ |
0x6d7ff0 |
0x6d8690 |
Notes (★)
GetValue
Reads a stored game-configuration value. Only getters are registered on the gameplay state: GetValue and eight read-only queries.
- The gameplay-state GameConfiguration registers 9 methods (GetGameSpeedType, GetMaxTurns, GetStartEra, GetStartTurn, GetStartYear, GetTurnTimerType, GetValue, IsAnyMultiplayer, IsNetworkMultiplayer). There is no SetValue, so gameplay scripts cannot write to it.
[verified; evidence: dll-registration — method list of the gameplay registration table for GameConfiguration]
- Civ6-GCO reports the same from the script side ('GameConfiguration.SetValue is nil in scripts context') and persists its mod state by calling SetValue from an InGame UI context, serialising Lua tables into string slots that end up in the savegame. SetValue is therefore a UI-state method outside this registration table. How large a value the save accepts was not tested.
[inferred; evidence: community-reference — Civ6-GCO InGame/GCO_SaveLoad.lua:9-10, 78-82; third-party mod Civ6-GCO (Gedemon, 2021), not a Firaxis script]