Home › Engine executable › Developer tools and crash reports
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.
Developer tools and crash reports
The exe contains the remote tools Firaxis used to develop the game and the code that writes crash reports. They are off in a normal game; the tuner needs the EnableTuner option of the Debug section. This page lists the command words the tuner listeners accept, the asset hot-load commands, the automation hooks, the elements of the bug submission header and the exception names the crash handler prints. Verified: the command words (read from the exe), the dispatch order, handler addresses and strings. Inferred: what each command does (from the handler names and reply strings). Nothing here was tried against a running tuner.
FireTuner (AppTuner2) commands
The listener Tuner::AppTuner2::Listener::ProcessInput (0x4f5bf0) receives text messages with an 8-byte header followed by COMMAND:arguments. The application commands are compared first. Any other message is read as <state index>:COMMAND:arguments: the number picks one of the registered Lua states (the main state and threads, AddLuaState) and the command is one of the Lua state commands. HOTLOAD takes a kind as its first argument (ARTDEF, UI, anything else is a blueprint reload).
Application commands
| Command |
Handler |
Address |
Strings of the handler |
Meaning (inferred) |
LSQ |
0x4f6d10 |
0x4f6d10 |
— |
handler not named; the command word suggests a query for the list of Lua states (guess) |
APP |
0x4f13c0 |
0x4f13c0 |
— |
handler is RegisterTree in the function map (low confidence): registers the value tree of the tuner and then sends application information (guess) |
CLOSE |
0x4efee0 |
0x4efee0 |
— |
close the tuner connection |
TREE |
HandleTreeRequest |
0x4f4e00 |
D%s = %s |
request a tree of values (reply lines D<name> = <value>) |
STRACKERS |
HandleStatTrackersListRequest |
0x4f43c0 |
TrackerList |
list the statistic trackers (reply TrackerList) |
START_TRACKER |
0x4f4380 |
0x4f4380 |
— |
start a statistic tracker (name; handler not named) |
STOP_TRACKER |
0x4f4420 |
0x4f4420 |
— |
stop a statistic tracker (name; handler not named) |
LOAD |
0x4f2650 |
0x4f2650 |
— |
handler not named; the word suggests a load request (guess) |
HOTLOAD |
ProcessInput (kind dispatch) |
0x4f5bf0 |
— |
reload assets while the game runs: HOTLOAD:ARTDEF:<name>, HOTLOAD:UI:<name> or HOTLOAD:<other>:<name> (blueprint reload) |
Lua state commands
| Command |
Handler |
Address |
Strings of the handler |
Meaning (inferred) |
CMD |
RunConsoleCommand |
0x4f6b70 |
ERR:Invalid Lua State |
run a console command in the Lua state (RunConsoleCommand; error ERR:Invalid Lua State) |
HELP |
HandleHelpRequest |
0x4f1ee0 |
BaseType, ExposedMembers, __index |
help for an object or table: BaseType, ExposedMembers, __index lookups |
HELPT |
0x4f5070 |
0x4f5070 |
Function, String, Table |
help for a table / array (HandleArrayHelpRequest, reply %s (%s)) |
VAL |
HandleSetValueRequest |
0x4f3dc0 |
ERR:No Query Found, ERR:SET:, ERR:SET:Bad lua state, string |
set a value (ERR:SET:, ERR:SET:Bad lua state, ERR:No Query Found) |
QRY |
HandleQueryRequest |
0x4f3890 |
Attempt to call a Lua::Function with an invalid function, ERR:Bad lua state |
run a query function (ERR:Bad lua state) |
KILLQRY |
0x4f1750 |
0x4f1750 |
— |
cancel a running query |
TABLE |
HandleTableInfoRequest |
0x4f4960 |
* Metatable *, Attempt to call a Lua::Function with an invalid function, function(k) return "* " .. tostring(k) .. " *"; end |
list the contents of a Lua table (marks the metatable as * Metatable *) |
CUSTOM_TABLE |
HandleCustomTableRequest |
0x4f1d10 |
Populate Table Error |
populate a custom table (Populate Table Error) |
CUSTOM_TABLE_SEL |
HandleCustomTableSelectionRequest |
0x4f2cd0 |
OnSelection Error, StateName |
selection in a custom table (OnSelection Error) |
LIST |
HandlePopulateListRequest |
0x4f2f10 |
Attempt to call a Lua::Function with an invalid function, Populate List Error, Populate List Success, Populate List Success;Selected=%d |
populate a list (Populate List Success, Populate List Success;Selected=%d, Populate List Error) |
LISTSEL |
HandleCustomTableSelectionRequest |
0x4f2cd0 |
OnSelection Error, StateName |
selection in a list (same handler as the custom table selection) |
MLIST |
HandlePopulateMultiselectListRequest |
0x4f32f0 |
Attempt to call a Lua::Function with an invalid function, Populate List Error, Populate List Success, Selected |
populate a multiselect list (Populate List Success) |
Asset hot loading (AssetCloud)
A second listener, AssetCloud::Listener::ProcessInput (0x4ef4f0), accepts CLOSE and HOTLOAD and logs to AssetCloudTuner.log. The hot loader keeps a queue of ARTDEF: and DEPENDENCY: entries and a temporary workspace folder that it removes when it closes.
| Command |
Meaning |
CLOSE |
close the asset cloud connection (log: "Received close request.") |
HOTLOAD |
hot load a file (log: "Received Hotload request: '%s'." then "HotLoad complete."); queue entries are ARTDEF: and DEPENDENCY: (log: "Adding ArtDef/BLP '%s' to the hot load queue") |
Automation hooks
The automation manager (switches -autoscript, -autoparams, -autojson on the command line; Lua table Automation) raises these events and uses these tags in output file names:
| Name |
Meaning |
AutomationAppInitComplete |
raised when the app finished initialising (Automation::Manager::OnAppInitComplete) |
AutomationMainMenuStarted |
raised when the main menu started |
AutomationPostGameInitialization |
raised after game initialisation (Automation::Manager::PostGameInitialization) |
$(Automation) |
file name tag replaced by the automation folder in output file names |
$(ID) |
file name tag replaced by the run id |
Automation_%04d_%02d_%02d__%02d_%02d_%02d |
default automation output name pattern (date and time) |
Bug submission header
AppHost::BugSubmissionPackager::GenerateHeaderInSubmissionFolder (0x705e70) writes a header document into the submission folder (a folder with the log, the dump and attachments). Elements in the order they are written (the grouping under a parent is inferred from the order of repeated names):
| # |
Element |
Notes |
| 1 |
GUID |
|
| 2 |
Application |
|
| 3 |
SubmissionType |
|
| 4 |
Host |
|
| 5 |
Time |
formatted %04d-%02d-%02d %02d:%02d:%02d |
| 6 |
File |
|
| 7 |
Line |
|
| 8 |
Message |
|
| 9 |
Callstack |
|
| 10 |
Catalog |
|
| 11 |
Log |
child File, MD5 |
| 12 |
Dump |
child File, MD5 |
| 13 |
Attachments |
child File, MD5 |
| 14 |
Exception |
children Message, StackTrace, ModuleInfo |
| 15 |
ModuleInfo |
attributes file, baseAddr, size, guid1, guid2, guid3, guid4, age, pdbPath |
| 16 |
Version |
children Major, Minor, Rev, Build, Changelist |
| 17 |
Session |
children Hash, Time |
Collection is switched by the EnableBugCollection option and the -NoAssertCollection switch (see the options and command line pages).
Exception names
FDebugHelperNS::GetExceptionDescription (0x986d20) turns a Windows exception code into the text of the crash dialog (Unhandled Exception / Code: <name>, Error reading|writing address 0x..., followed by Call Stack). Code values are the documented Windows constants.
| Name |
Code |
EXCEPTION_ACCESS_VIOLATION |
0xC0000005 |
EXCEPTION_ARRAY_BOUNDS_EXCEEDED |
0xC000008C |
EXCEPTION_BREAKPOINT |
0x80000003 |
EXCEPTION_DATATYPE_MISALIGNMENT |
0x80000002 |
EXCEPTION_FLT_DENORMAL_OPERAND |
0xC000008D |
EXCEPTION_FLT_DIVIDE_BY_ZERO |
0xC000008E |
EXCEPTION_FLT_INEXACT_RESULT |
0xC000008F |
EXCEPTION_FLT_INVALID_OPERATION |
0xC0000090 |
EXCEPTION_FLT_OVERFLOW |
0xC0000091 |
EXCEPTION_FLT_STACK_CHECK |
0xC0000092 |
EXCEPTION_FLT_UNDERFLOW |
0xC0000093 |
EXCEPTION_GUARD_PAGE |
0x80000001 |
EXCEPTION_ILLEGAL_INSTRUCTION |
0xC000001D |
EXCEPTION_INT_DIVIDE_BY_ZERO |
0xC0000094 |
EXCEPTION_INT_OVERFLOW |
0xC0000095 |
EXCEPTION_INVALID_DISPOSITION |
0xC0000026 |
EXCEPTION_INVALID_HANDLE |
0xC0000008 |
EXCEPTION_IN_PAGE_ERROR |
0xC0000006 |
EXCEPTION_NONCONTINUABLE_EXCEPTION |
0xC0000025 |
EXCEPTION_PRIV_INSTRUCTION |
0xC0000096 |
EXCEPTION_SINGLE_STEP |
0x80000004 |
EXCEPTION_STACK_OVERFLOW |
0xC00000FD |