Guidelines:Modules/Data


 * ''The following guidelines concern  subpages in the module namespace. These are not to be confused with the pages in   namespace.

Some modules rely on configuration data to generate output. By convention, this data is placed on a  subpage of the module. Module:Items/Data is an example of such a page — it contains all the data for generating the item navigation templates. Category:Module Data provides the list of such pages.

pages exist to separate module data from the programmed logic that operates on the data. It is a. pages require less programming knowledge to edit and are meant to be changed more frequently by a wider range of contributors.

Visualization
Some  pages display a tabular view of the data using the Documentation module. See Module:UtilsLanguage/Data and Module:Scale/Data, for example.

Most  pages also provide a schema which describes the format and fields for the data page. Currently it may be easier to understand the general format by looking directly at the data, but the schema can at least help you understand in detail what fields exist and what they are for.

How it Works
pages use a subset of regular Lua syntax. They each return one large Lua table which may contain nested tables, strings, numbers, or booleans. pages resemble JSON files in that regard.

The data is loaded by the base module using. The data is read-only and is loaded only once per wiki page, as opposed to other module code which is loaded each time it is used on a page (usually via a template).

These pages do not necessarily need to be named with a  suffix — this is only a Zelda Wiki convention that is useful for documentation automation and building a common understanding of the wiki's modules work.