Home › Engine Lua tables › Global functions

Engine executable. Settings and tools of the game program (CivilizationVI.exe), usable without a mod. Mostly undocumented debug and configuration functionality; descriptions come from analysis of the executable and have not all been tried in the running game.

Global functions

Static table with 10 methods. functions the exe adds to the global Lua environment (print, clamp, fill, count, where, GetLuaMemoryUsage ...). Registering function 0x973790.

Methods are called with a dot (Global functions.Method(...)).

Method Returns In game scripts Example Status
Global functions.CollectLuaMemoryUsage() — not called — inferred
Global functions.GetLuaMemoryUsage([arg1], …) -> table, number, number, number, number, number table, number, number, number, number, number not called — inferred
Global functions._CreateThread([arg1], …) -> table, boolean, boolean table, boolean, boolean not called — inferred
Global functions._DestroyThread() — not called — inferred
Global functions.clamp(arg1: number, arg2: number, arg3: number) -> number number not called — inferred
Global functions.count(arg1: table) -> 1 value 1 value not called — inferred
Global functions.fill([arg1], arg2: integer, arg3: integer) -> table table not called — inferred
Global functions.ipairs(arg1: table) -> 3 values 3 values not called — inferred
Global functions.print([arg1], …) — not called — inferred
Global functions.where([arg1: integer]) -> 1 value 1 value not called — inferred