Difference between revisions of "Template:Infobox Item/effect"

From Twinsuniverse
Jump to: navigation, search
m
(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=Effectless items|display=emptyinfobox|nocat={{{nocat|false}}}}}
+
| none = {{categorizer|category=Effectless items|display=none|nocat={{{nocat|false}}}}}
| grants access = {{categorizer|category=Access granting items|label=Grants Access|display=infobox|nocat={{{nocat|false}}}}}
+
| grants access = {{categorizer|category=Access granting items|label=Grants Access|nocat={{{nocat|false}}}}}
| uses magic = {{categorizer|category=Magic using items|label=Uses Magic|display=infobox|nocat={{{nocat|false}}}}}
+
| uses magic = {{categorizer|category=Magic using items|label=Uses Magic|nocat={{{nocat|false}}}}}
| restores life = {{categorizer|category=Restorative items|label=Restores Life|display=infobox|nocat={{{nocat|false}}}}}
+
| restores life = {{categorizer|category=Restorative items|label=Restores Life|nocat={{{nocat|false}}}}}
| restores magic = {{categorizer|category=Restorative items|label=Restores Magic|display=infobox|nocat={{{nocat|false}}}}}
+
| restores magic = {{categorizer|category=Restorative items|label=Restores Magic|nocat={{{nocat|false}}}}}
| restores both = {{categorizer|category=Restorative items|label=Restores Life and Magic|display=infobox|nocat={{{nocat|false}}}}}
+
| restores both = {{categorizer|category=Restorative items|label=Restores Life and Magic|nocat={{{nocat|false}}}}}
| stores clover = {{categorizer|category=Bonus storage items|label=Stores Clover|display=infobox|nocat={{{nocat|false}}}}}
+
| stores clover = {{categorizer|category=Bonus storage items|label=Stores Clover|nocat={{{nocat|false}}}}}
| stores life = {{categorizer|category=Bonus storage items|label=Stores Life|display=infobox|nocat={{{nocat|false}}}}}
+
| stores life = {{categorizer|category=Bonus storage items|label=Stores Life|nocat={{{nocat|false}}}}}
| stores magic = {{categorizer|category=Bonus storage items|label=Stores Magic|display=infobox|nocat={{{nocat|false}}}}}
+
| stores magic = {{categorizer|category=Bonus storage items|label=Stores Magic|nocat={{{nocat|false}}}}}
| stores money = {{categorizer|category=Bonus storage items|label=Stores Money|display=infobox|nocat={{{nocat|false}}}}}
+
| stores money = {{categorizer|category=Bonus storage items|label=Stores Money|nocat={{{nocat|false}}}}}
| unique = {{categorizer|category=Unique effect items|label=Unique|display=infobox|nocat={{{nocat|false}}}}}
+
| unique = {{categorizer|category=Unique effect items|label=Unique|nocat={{{nocat|false}}}}}
 
| {{maintenance task|nocat={{{nocat|false}}}
 
| {{maintenance task|nocat={{{nocat|false}}}
 
     |category=Items of unknown effect
 
     |category=Items of unknown effect
Line 28: Line 28:
 
     |label=''unknown''
 
     |label=''unknown''
 
     |reason=The '''effectamount''' parameter specifies {{#if:{{{amount|}}}|'{{lc:{{{amount|}}}}}' (unknown)| no value}} }}
 
     |reason=The '''effectamount''' parameter specifies {{#if:{{{amount|}}}|'{{lc:{{{amount|}}}}}' (unknown)| no value}} }}
}}</includeonly><noinclude>
+
}}</includeonly><noinclude>{{Infobox Template
 +
|purpose=infobox
 +
|singletag=no
 +
|multiline=no
 +
|gamerelated=yes
 +
|suppressible=recursively
 +
|choice=single
 +
|cat1=Effectless items!none
 +
|cat2=Access granting items!grants access
 +
|cat3=Magic using items!uses magic
 +
|cat4=Restorative items!restores life/magic/both
 +
|cat5=Bonus storage items!stores clover/life/magic/money
 +
|cat6=Unique effect items!unique
 +
|cat7=Items of unknown effect!''unknown'' (effect)!maintenance
 +
|cat8=Items of unknown effectamount!''unknown'' (amount)!maintenance
 +
|var1=
 +
}}
 +
 
 
This template offers a multiple choice for defining the effect category of an (item) article. It can also automatically categorize a page under that category.
 
This template offers a multiple choice for defining the effect category of an (item) article. It can also automatically categorize a page under that category.
  
Line 111: Line 128:
 
This would render the same result as the first example above, but would not automatically categorize under [[:Category:Magic using 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:Magic using items]]. This feature works both on valid values and the maintenance task mentioned above.
  
[[Category:Categorizers|item]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 17:19, 6 June 2014

Infobox Item/effect
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 effect category of an (item) article. It can also automatically categorize a page under that category.

Parameters

  1. The selected effect from the following values (no parameter name and values are case insensitive):
    • none
    • grants access
    • uses magic
    • restores life
    • restores magic
    • restores both
    • stores clover
    • stores life
    • stores magic
    • stores money
    • unique
    • any other (non)empty value defaults to: unknown
  • amount: The amount this item applies the above effect per use from the following values (case insensitive):
    • one
    • some
    • all
    • any other (non)empty value defaults to nothing displayed
  • nocat: Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization).


Syntax

{{Infobox Item/effect|value|amount=value}}

Examples

Commun use includes both parameters, like this:

{{Infobox Item/effect|uses magic|amount=some}}
{{Infobox Item/effect|grants access|amount=one}}
{{Infobox Item/effect|restores life|amount=some}}
{{Infobox Item/effect|stores life|amount=all}}
Uses Magic [list all] (some)
Grants Access [list all] (one)
Restores Life [list all] (some)
Stores Life [list all] (all)


You may also leave the "amount" undefined (which would not raise any maintenance task) by not specifying any valid values, so these all have the same result (no specific amount displayed):

{{Infobox Item/effect|stores magic}}
{{Infobox Item/effect|stores magic|}}
{{Infobox Item/effect|stores magic|amount=}}
{{Infobox Item/effect|stores magic|amount=seven}}
{{Infobox Item/effect|stores magic|amount=19}}
{{Infobox Item/effect|stores magic|amount=needle}}
{{Infobox Item/effect|stores magic|amount=none}}
Stores Magic [list all]


Some or most items don't have any effect, in which case the effect could specify "none", so these all have the same effect (nothing displayed, categorized under Category:Effectless items):

{{Infobox Item/effect|none}}
{{Infobox Item/effect|none|amount=}}
{{Infobox Item/effect|none|amount=some}}
{{Infobox Item/effect|none|amount=a lot}}


Lastly, there may be some items that have their own unique effect, in which case the effect could specify "unique":

{{Infobox Item/effect|unique}}
Unique [list all]


You may also leave the "effect" undefined (which would raise the Items of unknown effect maintenance task) by not specifying any valid values, so these all have the same result:

{{Infobox Item/effect}}
{{Infobox Item/effect|}}
{{Infobox Item/effect|1=}}
{{Infobox Item/effect|1=hungry}}
{{Infobox Item/effect|hungry}}
{{Infobox Item/effect|nausea}}
{{Infobox Item/effect|restores money}}
unknown [list all]


The nocat parameter may be used to suppress automatic categorization like this (any value will do):

{{Infobox Item/effect|uses magic|amount=some|nocat=true}}

This would render the same result as the first example above, but would not automatically categorize under Category:Magic using items. This feature works both on valid values and the maintenance task mentioned above.