Module:Iteminfo/datagen/doc

From Terraria Wiki
Jump to navigation Jump to search

Lua.svgThis is the documentation page for Module:Iteminfo/datagen.


This helper module is used for generating the item database, Module:Iteminfo/data. See that page for instructions on how to invoke this helper module.

The code of this module reproduces the Terraria.Item.SetDefaults method and its siblings from Terraria's source code, ported from C# to Lua. Various other methods or snippets of methods needed to generate item information are also included. The code is based on version 1.4.4.9.

Some of the data generation functionality is offloaded to submodules of this module. Notably, the SetDefaults<n> methods are each reproduced here in their own submodule, e.g. Module:Iteminfo/datagen/2 for SetDefaults2.

  • As this is a helper module which is only invoked manually, it is not needed in language wikis (and the submodules are not needed either). Only the final item database (Module:Iteminfo/data) is required there.