Home › Community Extension

Needs the Community Extension. Not available in the unmodified game; works while the Community Extension mod is active (its own functions, or raw memory access with Mem/ObjMem).

Lua API added by the Community Extension

The Community Extension (CE) is a mod that replaces the game's GameCore library loader and adds Lua functions the unmodified game does not have. Everything in this section only works while the CE mod is active. It also lets Lua read and write raw game memory (Mem, ObjMem), which is how the class layouts and globals in this reference can be used.

The CE documents its own API on its wiki. This page lists the same functions with signatures and links each one to the engine function it calls, so you can see what is wrapped and, in the native functions section, what is not. Descriptions are on the CE wiki (links in the last column); they are not copied here.

Object Functions Kind
CityTradeManager 1 static functions
CultureManager 2 static functions
EconomicManager 4 static functions
EmergencyManager 1 static functions
GameDiplomacy 1 methods on an object
Globals 4 static functions
GovernorManager 3 static functions
NationalParks 3 static functions
PlayerCities 1 methods on an object
PlayerGovernors 6 methods on an object
PlayerInfluence 3 methods on an object
Plot 2 methods on an object
UnitManager 2 static functions