Module:UnitData/doc

From Zero-K
< Module:UnitData
Revision as of 07:07, 11 May 2024 by Histidine (talk | contribs) (Created page with "This module is used to autogenerate unit infoboxes by drawing data from Module:UnitData/data. The intent is to ease updating of unit infoboxes on the wiki; ideally, only t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the documentation page for Module:UnitData

This module is used to autogenerate unit infoboxes by drawing data from Module:UnitData/data. The intent is to ease updating of unit infoboxes on the wiki; ideally, only the one data page needing to be changed every release. The concept is taken from e.g. the Combat Card Data module on the Library of Ruina Wiki.

This module is currently used with Template:Autoinfobox zkunit as follows:

{{Autoinfobox zkunit
|defname=striderdetriment
|name=Name override
}}

Data page

Module:UnitData/data is a central store of data used by Module:UnitData to automatically populate unit infoboxes.

The page is a Lua table written to the local file temp/unitStats.lua by the Wiki Data Export (dbg_wiki_export.lua) widget in Zero-K. This widget should be run once each update and the data page on the wiki replaced accordingly. It should not be necessary to edit the data manually.