Knights: Lua Documentation

Introduction

Knights allows modding using Lua scripts. Mods can customise many aspects of the game, including items, monsters, dungeon rooms, and many other things. In the Steam version of Knights, mods can also be shared with other players using Steam Workshop. This page contains the documentation for the Knights modding system.

General notes

Global functions

"kts" namespace

"mod" namespace

Lua version used

The Steam version of Knights currently uses Lua 5.4.8.

Lua 5.5 is now out (see changes), and we may upgrade to it at some point.

Note that other versions of Knights (e.g. the open source version downloaded directly from knightsgame.org.uk) might use a different Lua version.