Introduction

There is quite a lot to say about Lua as a language, but in essence we will focus on its use in the gaming world and more specifically in Civ VI.

There are quite a few games which choose to use Lua as a scripting language, largely as it is easy to embed within the application, has fast execution, and a relatively short learning curve.

The Lua environment can also be customized to give access to as little or as much as desired allowing game developers to provide a language for scripting but pulling out certain things like file system access for example.

Focus

We are going to focus on the core aspects of the language in this section, we will keep things simple and easy to use for reference and copy and paste examples.

With Thanks ๐Ÿ™

I pulled much of this section as an exercise to paraphrase this excellent guide provided by the Lua maintainers. If you wanted to read deeper into any aspects then I recommend taking a look.

https://www.lua.org/pil/contents.html