Lua for Civilization II: Test of Time

The Test of Time Patch Project, written by TheNamelessOne, has made many fixes and improvements to Civilization II: Test of Time. One of these improvements has been to allow scenario designers to script events using the Lua Programming Language. The primary purpose of this website is to enable scenario designers to take advantage of this power.

Over several years, I have written the Lua Scenario Template to enable scenario designers to more easily take advantage of Lua’s power. This website has two primary purposes. The first is to document how to use the Lua Scenario Template’s functions and features. The second is to provide lessons on how to use these features. The lessons are designed to be followed by someone with no prior programming experience.

Lua Scenario Template Documentation

Function and Data Type Documentation

This is the current state of documentation of functions provided by the Lua Scenario Template. It is mostly generated by program based on Lua Language Server style documentation, but sometimes the program is overridden.

Lua Execution Points

This page explains the concept of “execution points” and lists the available execution points.

Lessons

With these lessons, you can learn to program Civilization II events using Lua, working with the features provided by the Lua Scenario Template. These lessons do not require any prior programming experience.

Lessons Table of Contents

Recent Lessons

External Resources

Get the Lua Scenario Template

Lua Function Reference

This page is The Nameless One’s documentation for the Test of Time Patch Project’s Lua functionality. The Lua Scenario Template builds off of these basics.

Scenario League Forum

Scenario League Wiki

Visual Studio Code

A program that is useful for creating Lua programs. Lua Scenario Template code is being documented using the Lua Language Server, and Visual Studio Code has a plugin for that.

Lua Language Server

A program to interpret Lua comments as documentation. Available as an extension for Visual Studio Code and other programs (like Neovim).