Help:Lua

Lua is available as a templating language on Fandom, helping to provide users with the ability to create more maintainable templates and to improve the page performance. It is provided by the Scribunto extension.

Lua is a different coding experience to basic wikitext templates, resembling a more ‘traditional’ programming syntax. It offers two key advantages:
 * 1) Logical functionality is natively built into the Lua language, making the implementation of basic logic much easier in Lua than via MediaWiki's methods.
 * 2) Because Lua is streamlined for logical operations, it performs better than its wikitext counterparts.

Lua is not intended to replace JavaScript, CSS, or all wikitext templates.

Enabling and support
Lua is enabled by default on all wikis. The general standard Lua libraries along with the specialized Scribunto libraries are also available. Fandom's implementation of Scribunto on the legacy platform uses most standard features, but not all functions are supported. The differences are detailed in the reference manual.

For more background on the tool, read our introduction to Lua.

Lua module repository
Lua modules can also be loaded from the Fandom Developers Wiki using, as opposed to. These "global modules" are available for re-use Fandom-wide and are described in more detail here.

Documentation and further help
Fandom Developers Wiki contains documentation and guides about writing Lua templates.
 * Lua reference manual
 * Standard libraries
 * Scribunto libraries
 * Lua templating
 * Basics
 * Getting started
 * Converting Wikitext templates
 * Debug console
 * Glossary
 * Tips and tricks
 * All pages in Category:Lua

In addition to this documentation, there is a forum board set up to ask questions and get help.