Module:State trait/List/doc

< Module:State trait‎ | List
天津风不是天津的风讨论 | 贡献2025年6月2日 (一) 11:29的版本 (merge from official wiki)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

这是Module:State trait/List的文档页面

This module is a list of state traits for use with Module:State trait.

To add a new entry to this list, copy the template below and fill in the information. Note that single or double quotes must be used as in the template

p['<name>'] = {
 icon = '<icon>',
 effect = { '<color>_<amount>_<text>' }
}

Or

p['<name>'] = {
 icon = '<icon>',
 effect = { { '<color>', '<amount>', '<text>' } }
}
Template element Description/Use
<name> The English localized state trait name
<icon> The icon image file. See Category:State trait icons for available list on the wiki; note that the wiki images are all prefixed with "state trait", which must be left off here
effect <color> Color effect for the <amount>: use "green", "red", or "inherit" for good, bad, or neutral effects respectively
effect <amount> Size of the modifier, include + − and % as well as the number
effect <text> Localized modifier effect text. Images can be included by including wikitext such as [[File:State status construction.png|link=Construction|24px]].

Effect is a comma separated table; each effect must be listed as its own table value separately. The underscores must separate each effect element and underscores cannot be used within any of the effect elements. The effect can alternatively be listed as a sub-table, which then allows underscores to be used in elements if needed.

Traits with the same icon and effects as another trait can copy from it by assigning the old trait to the new trait with p['New Trait'] = p['Old Trait']