Difference between revisions of "Template:Infobox Item/combattype"
J McKalling (Talk | contribs) (Created page with "<includeonly> {{#switch: {{lc:{{{1|}}}}} | none = {{categorizer|category=Noncombat items|label=None|display=infobox|nocat={{{nocat|false}}}}} | enemies = {{categorizer|categor...") |
J McKalling (Talk | contribs) (added infobox) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#switch: {{lc:{{{1|}}}}} | {{#switch: {{lc:{{{1|}}}}} | ||
− | | none = {{categorizer|category=Noncombat items|label=None | + | | none = {{categorizer|category=Noncombat items|label=None|nocat={{{nocat|false}}}}} |
− | | enemies = {{categorizer|category=Enemy targeting items|label=Enemy Targets | + | | enemies = {{categorizer|category=Enemy targeting items|label=Enemy Targets|nocat={{{nocat|false}}}}} |
− | | area = {{categorizer|category=Area effect items|label=Area Effect | + | | area = {{categorizer|category=Area effect items|label=Area Effect|nocat={{{nocat|false}}}}} |
− | | special = {{categorizer|category=Special combat items|label=Special | + | | special = {{categorizer|category=Special combat items|label=Special|nocat={{{nocat|false}}}}} |
| {{maintenance task|nocat={{{nocat|false}}} | | {{maintenance task|nocat={{{nocat|false}}} | ||
|category=Items of unknown combattype | |category=Items of unknown combattype | ||
Line 10: | Line 10: | ||
|label=''unknown'' | |label=''unknown'' | ||
|reason=The '''combattype''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }} | |reason=The '''combattype''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }} | ||
− | }}</includeonly><noinclude> | + | }}</includeonly><noinclude>{{Infobox Template |
+ | |purpose=infobox | ||
+ | |singletag=no | ||
+ | |multiline=no | ||
+ | |gamerelated=yes | ||
+ | |suppressible=recursively | ||
+ | |choice=single | ||
+ | |cat1=Noncombat items!none | ||
+ | |cat2=Enemy targeting items!enemies | ||
+ | |cat3=Area effect items!area | ||
+ | |cat4=Special combat items!special | ||
+ | |cat5=Items of unknown combattype!''unknown''!maintenance | ||
+ | |var1= | ||
+ | }} | ||
+ | |||
This template offers a multiple choice for defining the combattype category of an (item) article. It can also automatically categorize a page under that category. | This template offers a multiple choice for defining the combattype category of an (item) article. It can also automatically categorize a page under that category. | ||
Line 70: | Line 84: | ||
This would render the same result as the first example above, but would not automatically categorize under [[:Category:Noncombat items]]. This feature works both on valid values and the maintenance task mentioned above. | This would render the same result as the first example above, but would not automatically categorize under [[:Category:Noncombat items]]. This feature works both on valid values and the maintenance task mentioned above. | ||
− | |||
</noinclude> | </noinclude> |
Latest revision as of 17:19, 6 June 2014
Infobox Item/combattype | |
---|---|
Purpose |
Infobox [list all] |
Single tag |
No [list all] |
Multi-line |
No [list all] |
Protected |
No [list all] |
Game related |
Yes [list all] |
Categorization | |
Suppressible |
Recursively [list all] |
Choice |
Single category [list all] |
Categories |
Multiple: [list all] |
|
|
Variables | |
Names |
none [list all] |
Subpages |
This template offers a multiple choice for defining the combattype category of an (item) article. It can also automatically categorize a page under that category.
Parameters
- The selected combattype from the following values (no parameter name and values are case insensitive):
- none
- enemies
- area
- special
- any other (non)empty value defaults to: unknown
- nocat: Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization).
Note: more category values should be discussed on the discussion page.
Syntax
{{Infobox Item/combattype|value}}
Examples
Any of the above values may be used like this:
{{Infobox Item/combattype|none}} {{Infobox Item/combattype|enemies}} {{Infobox Item/combattype|area}}
Some items don't actually cause harm to enemies (in a normal way), but can be used during combat nevertheless. In that case, use this value:
{{Infobox Item/combattype|special}}
- Special [list all]
The case of the value is not important, so these all have the same result:
{{Infobox Item/combattype|eneMIES}} {{Infobox Item/combattype|ENEMies}} {{Infobox Item/combattype|eNeMiEs}} {{Infobox Item/combattype|ENEMIES}}
- Enemy Targets [list all]
You may leave the "combattype" undefined (which would raise the Items of unknown combattype maintenance task) by not specifying any valid value, so these all have the same result:
{{Infobox Item/combattype}} {{Infobox Item/combattype|}} {{Infobox Item/combattype|fists}} {{Infobox Item/combattype|mortal}} {{Infobox Item/combattype|headbang}} {{Infobox Item/combattype|multi-way}}
- unknown [list all]
The nocat parameter may be used to suppress automatic categorization like this (any value will do):
{{Infobox Item/combattype|none|nocat=true}}
This would render the same result as the first example above, but would not automatically categorize under Category:Noncombat items. This feature works both on valid values and the maintenance task mentioned above.