Nookipedia:Lua

Lua is a programming language that is available on Nookipedia via the Scribunto MediaWiki extension. Lua code is hosted in Module pages and can be invoked by using the  function, with the ability to pass in parameters similar to templates. Lua is powerful, with the ability to render templates and HTML output, and perform many things that wikitext cannot.

On Nookipedia, we generally try to reserve Lua for cases in which a wikitext solution is impossible or very complex. Since most editors are familiar with wikitext and not Lua, wikitext is the preferred solution for simple templates.

Help

 * Lua for beginners on the English Wikipedia
 * Scribunto/Lua reference manual on MediaWiki
 * Programming in Lua (official book)

List of modules

 * Module:Sandbox - used for testing and experiments.
 * Module:Formatnum - format and localize numbers.
 * Module:Items - utility functions for item-related topics (sorting furniture and generating availability templates from a list).
 * Module:Availability - used in the Availability template to output source.
 * Module:Materials - used in the Material and PC Material templates to output material.
 * Module:Currency - used in the Currency template to output currency.
 * Module:NHVillagerItemOutput - used to output the list of villagers that may feature or wear a item.
 * Module:PC Prose - generates prose for our item pages.
 * Module:Plain text - strips simple wikitext (text formatting, links, etc.) and select templates from a string.