Are all of the functions in _G\GameCore Accessible and useable by Mods?


Nov 1, 2019
I am using the Firetuner to browse _G.

I have included the contents of the _G\GameCore and _G\GameCore\Players as an example of what is in there. I do recognize functions in the Players table as functions a mod can use. Does anyone know if all of GameCore is useable?

There are also many other tables under _G and a few more are named as game related tables. There are the tables GameEventFactory, GameEvents, GameInfo, GameInfoData. Are these outside of the scope that a mod can use?

I assume that the entire LUA side of the game is in _G, but I am not sure about that. If it isn't the entire LUA engine, then it still appears to contain many functions.

Spoiler Contents of _G\GameCore :

ActionTypestable: 0000000082BBDE00
ActivityTypestable: 0000000082BBE120
AdjacencyBonusTypestable: 0000000082BBE170
AreaBuildertable: 0000000082BB96C0
Areastable: 0000000082BBA890
Automationtable: 00000000844A5FE0
AutoplayManagertable: 00000000844A57C0
Citiestable: 0000000082BB9940
CityCommandResultstable: 0000000082BBEEE0
CityCommandTypestable: 0000000082BBF700
CityDestroyDirectivestable: 0000000082BBE620
CityManagertable: 00000000844A4870
CityOperationResultstable: 0000000082BBF4D0
CityOperationTypestable: 0000000082BBF160
CityProductionDirectivestable: 0000000082BBF7F0
CityTransferTypestable: 0000000082BBE580
CivilizationLevelTypestable: 0000000082BBEB70
CombatManagertable: 00000000844A54F0
CombatResultParameterstable: 0000000082BBF520
ComponentTypetable: 0000000082BBEF30
DealAgreementTypestable: 0000000082BBE990
DealDirectiontable: 0000000082BBF020
DealItemSubTypestable: 0000000082BBE940
DealItemTypestable: 0000000082BBF890
DealManagertable: 00000000844A5540
DealProposalActiontable: 0000000082BBE8A0
DealValidationResulttable: 0000000082BBF840
DefenseTypestable: 0000000082BBEE90
DefinitionTypestable: 0000000082BBF750
DiplomacyActionTypestable: 0000000082BBEAD0
DiplomacyInitiatorTypestable: 0000000082BBF200
DiplomacyMoodTypestable: 0000000082BBF250
DiplomacyRelationshipTypestable: 0000000082BBEA30
DiplomacyResponseTypestable: 0000000082BBE9E0
DiplomaticStatestable: 0000000082BBF390
DirectionTypestable: 0000000082BBD630
DomainTypestable: 0000000082BBD860
EndTurnBlockingTypestable: 0000000082BBD360
EraTypestable: 0000000082BBDF40
EspionageResultTypestable: 0000000082BBF3E0
EventSubTypestable: 0000000082BBE530
FlowDirectionTypestable: 0000000082BBD1D0
Fractaltable: 0000000082BB9D00
Gametable: 0000000082BBD810
GameCapabilitiestable: 00000000844A6120
GameClimatetable: 00000000844A5A90
GameConfigurationtable: 00000000844A2160
GameCoreStatetable: 0000000082BBA070
GameDefinestable: 0000000082BBE080
GameEffectstable: 0000000082BBD130
GameRandomEventstable: 00000000844A68A0
GameSummarytable: 0000000082BBD5E0
GovernmentBonusTypestable: 0000000082BBD8B0
IdentityConversionOutcometable: 0000000082BBEDF0
ImprovementBuildertable: 0000000082BBA4D0
Maptable: 0000000082BBA0C0
MapConfigurationtable: 00000000844A21B0
MapFeatureManagertable: 00000000844A62B0
MapLayerstable: 0000000082BBF8E0
MapModDatatable: 0000000082BBA610
MapRoutestable: 00000000844A5D60
MilitaryFormationTypestable: 0000000082BBEFD0
MomentDataTypestable: 0000000082BBDFE0
NotificationGroupstable: 0000000082BBE710
NotificationManagertable: 00000000844A55E0
NotificationParameterTypestable: 0000000082BBE760
NotificationTypestable: 0000000082BBF340
OperationResultsTypestable: 0000000082BBEE40
ParameterTypestable: 0000000082BBEF80
Playertable: 0000000082BBA5C0
PlayerComponentTypestable: 0000000082BBE7B0
PlayerConfigurationtable: 00000000844A2480
PlayerConfigurationstable: 00000000844A2AC0
PlayerManagertable: 00000000844A54A0
PlayerOperationResultstable: 0000000082BBEDA0
PlayerOperationstable: 0000000082BBEBC0
Playerstable: 0000000082BBA7A0
PlayersVisibilitytable: 0000000082BBFED0
PlayerTypestable: 0000000082BBE1C0
PlayerVisibilitytable: 0000000082BBFD40
PlayerVisibilityManagertable: 00000000844A2110
PromiseTypestable: 0000000082BBFD90
QueueInsertModetable: 0000000082BBF070
ReportingEventstable: 00000000844A44B0
ReportingStatusTypestable: 0000000082BBECB0
ResourceBuildertable: 0000000082BBA110
ResultFormattable: 0000000082BBFA20
RevealedStatetable: 0000000082BBFBB0
RiverManagertable: 00000000844A5810
RouteBuildertable: 0000000082BBA520
RouteTypestable: 0000000082BBE030
StartPositionertable: 0000000082BB9BC0
Teamstable: 0000000082BBD4A0
TerrainBuildertable: 0000000082BB99E0
TerrainManagertable: 00000000844A5F40
Territoriestable: 00000000844A5F90
UnitCommandResultstable: 0000000082BBF6B0
UnitCommandTypestable: 0000000082BBF430
UnitManagertable: 00000000844A5450
UnitOperationMoveModifierstable: 0000000082BBE3A0
UnitOperationResultstable: 0000000082BBF0C0
UnitOperationTypestable: 0000000082BBE210
Unitstable: 0000000082BB9850
VisibilityLayerTypestable: 0000000082BBF110
WorldBuildertable: 00000000844A4460
WorldBuilderModestable: 0000000082BBF5C0
WorldBuilderSignalstable: 0000000082BBF9D0
YieldTypestable: 0000000082BBF660
WarTypestable: 0000000082BBF2A0

Spoiler Contents of _G\GameCore\Player :

__instancestable: 0000000082BBA6B0
AttachModifierByIDfunction: 000000008399ECB0
ChangeScoringScenario1function: 000000008399F670
ChangeScoringScenario2function: 000000008399EAF0
ChangeScoringScenario3function: 000000008399F530
GetAi_Diplomacyfunction: 000000008399DEF0
GetAi_Militaryfunction: 000000008399DDF0
GetAi_Religionfunction: 000000008399F3B0
GetCitiesfunction: 000000008399E6F0
GetComponentIDfunction: 000000008399E0B0
GetCulturefunction: 000000008399DFF0
GetDiplomacyfunction: 000000008399DB30
GetDistrictsfunction: 000000008399DF70
GetErafunction: 000000008399F6F0
GetErasfunction: 000000008399DBF0
GetGovernorsfunction: 000000008399ED70
GetGreatPeoplePointsfunction: 000000008399DEB0
GetIDfunction: 000000008399E430
GetInfluencefunction: 000000008399DB70
GetPropertyfunction: 000000008399E930
GetReligionfunction: 000000008399DC70
GetResourcesfunction: 000000008399DBB0
GetScorefunction: 000000008399E7B0
GetScoringScenario1function: 000000008399EBF0
GetScoringScenario2function: 000000008399F370
GetScoringScenario3function: 000000008399F230
GetStartingPlotfunction: 000000008399EF30
GetStatsfunction: 000000008399DA30
GetTeamfunction: 000000008399E230
GetTechsfunction: 000000008399E1B0
GetTradefunction: 000000008399E270
GetTreasuryfunction: 000000008399E4F0
GetUnitsfunction: 000000008399D9F0
GetWMDsfunction: 000000008399E9F0
GrantWMDsfunction: 000000008399E9B0
GrantYieldfunction: 000000008399EAB0
IsBarbarianfunction: 000000008399F170
IsHumanfunction: 000000008399EA70
IsInitializedfunction: 000000008399F6B0
IsMajorfunction: 000000008399EC30
IsTurnActivefunction: 000000008399F1B0
IsTurnActiveCompletefunction: 000000008399E830
SetPropertyfunction: 000000008399EBB0
SetScoringScenario1function: 000000008399EE30
SetScoringScenario2function: 000000008399F4F0
SetScoringScenario3function: 000000008399F770
SetStartingPlotfunction: 000000008399F5F0
WasEverAlivefunction: 000000008399F570
IsAlivefunction: 000000008399F070
Last edited:
I wanted to be able to browse through these files more easily so I started to make a browser. Unfortunately, I don't know how to make it.

I have attached the panel I created in the Firetuner. I need to coordinate the components together and I wanted to use them to navigate.

Spoiler Picture of the function browser :

Function Browser Picture.png

The left group of controls are selection list controls. These controls separate the contents of the _G table into groups of pairs. The top, left control contains pairs which are neither table nor function. The two controls below that contain the tables and functions.

I want to be able to select either a table or a function of _G. If I select a table, it's contents would load in the same format (other files, tables, functions) into the middle panels which are empty at the moment. If I select a function, I was hoping to display the function body and the function's definition in the right most control (a Data View control, I think), so I could easily view the functions.

If I go deeper into the sub-tables, the middle set of controls would always show the deeper "directory" and the left set of controls would show the next level up. The back buttons would all do the same thing, which is to go up a level. I was just putting a bunch of the back buttons there so it would be easier to click to go back. I probably would want to add a control that displays the \path to the user.

I admit, I am in over my head. I don't know how to make these panels look at the same variable which would contain the \path. I don't know if the Data View control is the correct type of control for the function viewer control. I think I can use the "on selection" event to update the appropriate things, if I could make each panel coordinated to the current \path, for example "_G : GameCore : Player". However, I am not sure how to do that or whether I can access more that _G from a panel. My LUA skills are of a beginner level so I might even be using the wrong syntax to attempt to dereference sub-tables in _G.

I know it is probably a long shot to ask, but can anyone help me figure this out. I have attached the "panel file".
Last edited:
Out of curiousity have you looked at the Civ 6 Modding Companion?

No, I think I have the original version bookmarked, but it has been awhile since I looked at it. I play the game more than I ever tried to mod it, but I keep getting tempted to learn how to.

Yes, this 2.0 version is very nicely formatted. From the looks of what is in here, it probably contains everything. Certainly has a lot in it. Thanks for showing me that.
It turns out that they have a table viewer already built in. It appears to show the live data. That makes sense. So for anyone that didn't know, you can place this table viewer in a new panel and look straight at the tables. It doesn't show the functions in string form, though. I think it defaults to _G, but you can type a name into the box.

Spoiler Picture of Table Viewer :


edit: It may not have been live data. I think it was ENUMs I was seeing. I had to restart my game + tuner and now this table viewer doesn't seem to do anything. I am confused now. Right before it displayed the directory, I was playing with this code below. I copied something from the internet to try and parse out the function and I was just playing with the code and I don't even think the code made any sense and it didn't seem to do anything. I was learning that I could use the print command to print out to the main console. Then the table viewer started working, but I didn't think it was the code I was changing so I deleted it and I thought I had reopened the whole panel and it still worked. That is why I thought it was the default for the table viewer. I just happened to have this code still in the clipboard and it must be pretty close to what was in there when it the viewer started working.

    local listItems = {};
    local myfunction = _G.GameCore.Map.IsPlot;
    local t = debug.getinfo (myfunction)
         if t.linedefined >= 0 then
              local name = t.source:gsub("^@","")
              for line in io.lines(name) do
                 listItems[i] = line
  return listItems;
Last edited:
Top Bottom