Terraria Wiki:Lua

Lua is a programming language made available at the Terraria Wiki through the Scribunto MediaWiki extension. It is a powerful scripting language that can extend the functionality of wiki templates beyond the capabilities usually ascribed to wiki code alone. It is embedded into wikitext via the #invoke: parser function.

Lua source code is stored on pages called modules which reside in their own namespace (e.g. Module:Bananas, a test script). The documentation for a module is stored at each module's /doc subpage (e.g. Module:Bananas/doc).

The #invoke: parser function is rarely used in articles directly. Instead, it is usually included in templates, a list of which can be found in the Category:Templates using Lua.

Examples

 * Use hello to print the text "Hello, world!".
 * See Module:BananasArgs for extended basic code examples.