Sid Meier's Civilization VI
0 of 0

File information

Last updated

Original upload

Created by

Arkathorn

Uploaded by

Arkathorn

Virus scan

Safe to use

About this mod

Adds a drop-down Lua console to the panel on the top of the screen.
NOTE: Lua access severely limited!

Permissions and credits
Donations
This mod adds a drop-down Lua console to the panel at the top of the HUD. The console supports text entry, and will execute the text entered as Lua statements. If the statement is not valid, but is when encapsulated by a 'print' statement, it will be interpreted as such (eg. a variable name). If the statement has return values, these will be outputted.

Note that the usual versatility of Lua has been somewhat restricted by the game.
  • The '_G' global variable is not present.
  • The 'debug' library is not present.
  • 'getfenv' and 'setfenv' are not present.
  • 'pairs' does not provide any targets when used with core libraries (eg. 'math' or 'os').

The Lua operates from the context of the console panel. The precise implications of this in terms of restrictions are unknown, but likely significant.

NOTE: Backslashes ('\') are not rendered by the console. However, they are still valid when included in statements.

Please note that this is a very rudimentary console, and is not expected to be overly useful in its current state. I will revisit this project at a later date, and attempt to improve upon it. Planned (but not necessarily possible) features include:
  • Entry history with navigation (using the up and down keys to navigate between previous entries)
  • Clipboard access (likely impossible)
  • Backslash rendering