Module docs

Here is a list of all the modules on the wiki. There are two types of modules:
 * data modules: their name ends in data. Except for the reference data all the other ones are generated from the game files. You will find a link to the script used to generate them at the top of the module.
 * all the other modules: these expose functions that can be used in pages. For example, the Template:Book template invokes just such a function to generate most of the content on a book page. The content is almost always generated by aggregating the data from the data modules.

The reference manual documents the language and the functions you can use in your modules.

It is important to note that it is more tricky to use templates in your modules. These would need to be expanded using the frame object. Debugging is made unnecessarily difficult because of this so it is generally recommended to write a function in your module to generate the content that would otherwise be generated by the usage of the template.

If you did a change that impacts a lot of modules, you can see if you broke any pages by checking Category:Pages_with_script_errors. Please note that it may take a while for all the pages to be rerendered after you save your changes. Usually this should be in the range of 1-2 minutes.

If you want to get a list of pages that depend on a module, you can use the "What links here" tool from the side bar. It should redirect you to something like Special:WhatLinksHere/Module:Vaults.

Debugging
You don't have to save the module to see if your changes are as expected. There is a debug console at the bottom of the page. Here is an example on how to use it:
 * let's assume you are editing Module:Books
 * type =p.byName({args={name="A Second Glory"}}) in order to test the p.byName function. Most of the functions also have a default value used for debug purposes. This way you can use =p.byName to test it. After you press enter, if everything is correct you will see the wiki text that this function call generated.
 * you can now go to any other page, edit source and replace everything with the output of the function. Clicking preview will show you how the wikitext will be rendered.