Home › Lua API
Available out of the box. Usable from Lua in the unmodified game.
Lua API
Methods registered by GameCore, grouped by object. Where says which registration table lists the method (ui-cache = the UI-side cache interface, gameplay = the gameplay interface). It is not proof of which Lua state can call it; the community reference is more reliable for that.
In reference counts the methods that also appear in the community Lua reference by Sukrit Tan (external, ↗ links to it). Each method row links to its page there when it has one; methods without a link are registered by the game but undocumented there.
| Object |
Methods |
Where |
In reference |
| AiCityBuild |
3 |
ui-cache |
3 — ↗ |
| AiDiplomacy |
11 |
gameplay, ui-cache |
11 — ↗ |
| AiGrandStrategic |
3 |
ui-cache |
3 — ↗ |
| AiMilitary |
11 |
gameplay |
11 — ↗ |
| AiReligious |
1 |
gameplay |
1 — ↗ |
| Area |
14 |
gameplay |
14 — ↗ |
| AutoplayManager |
10 |
gameplay |
0 |
| BarbarianTribes |
4 |
gameplay |
0 |
| Barbarians |
15 |
ui-cache |
3 — ↗ |
| Calendar |
4 |
ui-cache |
0 |
| Cities |
5 |
gameplay, ui-cache |
5 — ↗ |
| City |
52 |
gameplay, ui-cache |
52 — ↗ |
| CityBuildQueue |
40 |
gameplay, ui-cache |
40 — ↗ |
| CityBuildings |
20 |
gameplay, ui-cache |
20 — ↗ |
| CityCitizens |
7 |
gameplay, ui-cache |
7 — ↗ |
| CityCulturalIdentity |
15 |
ui-cache |
15 — ↗ |
| CityCulture |
7 |
ui-cache |
7 — ↗ |
| CityDistricts |
19 |
gameplay, ui-cache |
19 — ↗ |
| CityGold |
5 |
ui-cache |
5 — ↗ |
| CityGrowth |
40 |
gameplay, ui-cache |
40 — ↗ |
| CityManager |
19 |
gameplay, ui-cache |
19 — ↗ |
| CityPlots |
6 |
ui-cache |
6 — ↗ |
| CityPower |
12 |
ui-cache |
0 |
| CityReligion |
15 |
gameplay, ui-cache |
15 — ↗ |
| CityTrade |
6 |
ui-cache |
6 — ↗ |
| CombatManager |
8 |
gameplay |
8 — ↗ |
| CongressManager |
9 |
ui-cache |
9 — ↗ |
| Deal |
23 |
gameplay |
0 |
| DealItem |
37 |
gameplay |
0 |
| DealManager |
11 |
gameplay, ui-cache |
11 — ↗ |
| Definitions |
2 |
ui-cache |
0 |
| DiplomacyManager |
15 |
ui-cache |
15 — ↗ |
| District |
30 |
gameplay, ui-cache |
30 — ↗ |
| EmergencyManager |
3 |
ui-cache |
0 |
| Fractal |
5 |
gameplay |
0 |
| FreeCities |
6 |
gameplay |
0 |
| Game |
63 |
gameplay, ui-cache |
63 — ↗ |
| GameCapabilities |
1 |
gameplay |
0 |
| GameClimate |
50 |
gameplay |
50 — ↗ |
| GameConfiguration |
9 |
gameplay |
9 — ↗ |
| GameCulture |
1 |
ui-cache |
1 — ↗ |
| GameDiplomacy |
7 |
gameplay, ui-cache |
7 — ↗ |
| GameEconomicManager |
13 |
ui-cache |
0 |
| GameEffects |
39 |
gameplay |
39 — ↗ |
| GameEras |
28 |
gameplay, ui-cache |
28 — ↗ |
| GameFalloutManager |
13 |
gameplay, ui-cache |
13 — ↗ |
| GameGossipManager |
1 |
ui-cache |
0 |
| GameGreatPeople |
14 |
gameplay, ui-cache |
14 — ↗ |
| GameHeroesManager |
9 |
gameplay, ui-cache |
0 |
| GameHistoryManager |
6 |
ui-cache |
0 |
| GameNationalParks |
7 |
ui-cache |
0 |
| GameRandomEvents |
5 |
gameplay |
5 — ↗ |
| GameReligion |
15 |
gameplay, ui-cache |
15 — ↗ |
| GameSummary |
9 |
gameplay |
0 |
| GameTechs |
1 |
ui-cache |
1 — ↗ |
| Governor |
14 |
ui-cache |
0 |
| HallofFame |
20 |
gameplay |
0 |
| ImprovementBuilder |
3 |
gameplay |
3 — ↗ |
| InfluenceMap |
1 |
ui-cache |
1 — ↗ |
| Map |
33 |
gameplay, ui-cache |
33 — ↗ |
| MapAreaBuilder |
2 |
gameplay |
0 |
| MapAreaPortal |
5 |
gameplay |
0 |
| MapAreas |
6 |
gameplay |
0 |
| MapConfiguration |
1 |
gameplay |
1 — ↗ |
| MapFeature |
3 |
gameplay |
3 — ↗ |
| MapFeatureManager |
17 |
gameplay |
17 — ↗ |
| MapPlotUnitList |
3 |
gameplay, ui-cache |
0 |
| MapResourceBuilder |
5 |
gameplay |
0 |
| MapRouteBuilder |
3 |
gameplay |
0 |
| MapRoutes |
2 |
gameplay |
0 |
| MapStartPositioner |
13 |
gameplay |
0 |
| MemoryIStream |
3 |
gameplay |
0 |
| NotificationInstance |
28 |
gameplay |
0 |
| NotificationManager |
9 |
gameplay |
9 — ↗ |
| Player |
65 |
gameplay, ui-cache |
65 — ↗ |
| PlayerCities |
12 |
gameplay, ui-cache |
12 — ↗ |
| PlayerConfiguration |
16 |
gameplay |
0 |
| PlayerCulture |
80 |
gameplay, ui-cache |
78 — ↗ |
| PlayerDistricts |
3 |
gameplay, ui-cache |
3 — ↗ |
| PlayerEras |
3 |
gameplay |
3 — ↗ |
| PlayerGovernors |
22 |
gameplay, ui-cache |
22 — ↗ |
| PlayerGreatPeoplePoints |
6 |
gameplay, ui-cache |
6 — ↗ |
| PlayerImprovements |
1 |
ui-cache |
1 — ↗ |
| PlayerInfluence |
20 |
gameplay, ui-cache |
20 — ↗ |
| PlayerManager |
32 |
gameplay, ui-cache |
32 — ↗ |
| PlayerReligion |
16 |
gameplay, ui-cache |
16 — ↗ |
| PlayerResources |
18 |
gameplay, ui-cache |
18 — ↗ |
| PlayerStats |
26 |
gameplay, ui-cache |
26 — ↗ |
| PlayerTechs |
23 |
gameplay, ui-cache |
23 — ↗ |
| PlayerTrade |
7 |
gameplay, ui-cache |
6 — ↗ |
| PlayerTreasury |
14 |
gameplay, ui-cache |
14 — ↗ |
| PlayerUnits |
11 |
gameplay, ui-cache |
11 — ↗ |
| PlayerVisibility |
11 |
gameplay, ui-cache |
0 |
| PlayerVisibilityManager |
2 |
gameplay, ui-cache |
2 — ↗ |
| PlayerWMDs |
3 |
gameplay, ui-cache |
3 — ↗ |
| Plot |
90 |
gameplay |
90 — ↗ |
| QuestsManager |
4 |
gameplay, ui-cache |
4 — ↗ |
| ReportingEvents |
2 |
gameplay |
0 |
| RiverManager |
18 |
gameplay |
18 — ↗ |
| TeamDiplomacy |
67 |
gameplay, ui-cache |
48 — ↗ |
| TerrainBuilder |
21 |
gameplay |
21 — ↗ |
| TerrainManager |
7 |
gameplay |
7 — ↗ |
| Territories |
5 |
gameplay |
5 — ↗ |
| Territory |
14 |
gameplay |
14 — ↗ |
| TradeManager |
24 |
gameplay, ui-cache |
24 — ↗ |
| TunerManager |
1 |
gameplay |
0 |
| Unit |
92 |
gameplay, ui-cache |
92 — ↗ |
| UnitAbility |
7 |
gameplay, ui-cache |
0 |
| UnitArchaeology |
7 |
ui-cache |
0 |
| UnitExperience |
13 |
gameplay, ui-cache |
13 — ↗ |
| UnitGreatPerson |
11 |
gameplay, ui-cache |
11 — ↗ |
| UnitManager |
45 |
gameplay, ui-cache |
45 — ↗ |
| UnitReligion |
26 |
gameplay |
26 — ↗ |
| UnitRockBand |
7 |
ui-cache |
0 |
| UnitTrade |
2 |
ui-cache |
2 — ↗ |
| Units |
12 |
gameplay, ui-cache |
12 — ↗ |
| WorldBuilderCityManager |
15 |
gameplay |
0 |
| WorldBuilderConfigurationManager |
3 |
gameplay |
0 |
| WorldBuilderManager |
21 |
gameplay |
0 |
| WorldBuilderManager_Inactive |
1 |
gameplay |
0 |
| WorldBuilderMapManager |
24 |
gameplay |
0 |
| WorldBuilderModManager |
6 |
gameplay |
0 |
| WorldBuilderPlayerManager |
25 |
gameplay |
0 |
| WorldBuilderUnitManager |
4 |
gameplay |
0 |