Difference between revisions of "Template:Item infobox/doc"

From Team Fortress Wiki
Jump to: navigation, search
m (Parameters)
Line 209: Line 209:
  
 
:; ''att-<sub>n</sub>-negative''
 
:; ''att-<sub>n</sub>-negative''
:: Positive attributes. Up to 6 basic text parameters.
+
:: Negative attributes. Up to 6 basic text parameters.
  
 
:; ''att-<sub>n</sub>-neutral''
 
:; ''att-<sub>n</sub>-neutral''
:: Positive attributes. Up to 6 basic text parameters. Use {{code|item-description}} for weapon or hat descriptions instead.
+
:: Neutral attributes. Up to 6 basic text parameters. Use {{code|item-description}} for weapon or hat descriptions instead.
  
 
:; ''item-description''
 
:; ''item-description''

Revision as of 16:11, 4 March 2011

This infobox template can be used to display images and basic information pertaining to items. For infoboxes for other uses, see Category:Infobox templates.

Supersession

{{Item infobox}} deprecates the following templates:

Errors

This template places pages with incorrect use into tracking categories.

Usage

Please remove the parameters that are left blank. See Parameters section below for documentation of all parameters.

{{Item infobox
| name = 
| game = (Only use this if the game is TFC)
| type = 

| image = 
| team-colors = 
| two-models = 

| kill-icon-1 = 
...
| kill-icon-6 = 

| used-by = 
| slot = 
| contributed-by = 
| released = 
| availability = 
| medieval = 

| trade = 
| gift  = 
| craft = 
| paint = 
| rename = 

| ammo-loaded = 
| ammo-carried = 
| ammo-type = 
| reload-type = 

| loadout = 
 | level = 
 | att-1-positive = 
 ...
 | att-6-negative = 
 | item-description = 

}}

Parameters

Setup parameters

name
The displayed title of the infobox. Not necessary for most English pages as the title is collected from the page's name itself. This is also the name displayed in the loadout stats if enabled (overridden by loadout-name). The following parameters are also aliases for name, and function in the exact same way:
  • NAME, title, name-override, item-name-override
type[1] [weapon, hat, misc, taunt, action, tool]
Changes the display of information and the categorization of the page based on type. Also accepts other variations:
  • hat: hat, hats, head, headwear
  • weapon: weapons
  • misc: misc item, misc., misc, miscellaneous, miscellaneous item
  • action: action item
unused
Set to anything to mark the item as "unused". This will hide the "Trading", "Crafting", etc, fields that appear by default, and also removes slot categorization. Also sets slot to "Unknown" if one is not defined.
game[1]
Not necessary for the majority of items. Team Fortress Classic weapon pages need to set this parameter to "tfc".

Image parameters

image
The main infobox image to be displayed directly underneath the title.
Example: File name.png
imagewidth
The width of the image, defaults to 250px. Use this only if the image does not display well at the default size.
Example: 96px
team-colors
Set to "yes" if the item has team-based color variations. The images will be displayed using the syntax "File:RED <Item Name>.png" (where <Item Name> is collected from the page's actual name). This can be overridden with different filenames using skin-image-blu and skin-image-red (see below).
two-models
On QTF and TFC pages this needs to be defined as "yes". The individual filenames can be defined using QTF-model and TFC-model respectively.
skin-image-blu and skin-image-red
The filenames for team-color images. Overrides defaults (see above).

Kill icon parameters

Main templates: {{Icon killicon}} and {{Kill notice}}

The following parameters can only be used if type has been set to weapon or taunt (see above). Up to 6 of each are allowed.

kill-icon-n
The weapon's kill icons. See {{Icon killicon}} for exact naming. By default, kill-icon-1 will be displayed using the page's name; thus in most circumstances, defining kill-icon parameters is not necessary unless the weapon has additional kill icons (e.g. backstab or flaming arrow).
kill-text-n
The kill text displayed within the kill notice. If it does not display properly (i.e. the text is too big), wrap the text in tags.
Example: FISH KILL!

Information parameters

used-by
The class or classes that can use the item. Basic text parameter.
slot[1] [primary, secondary, melee, pda1, pda2]
Can only be defined when type is set to weapon or taunt (see above). Other variations:
  • primary: slot1, slot 1, 1
  • secondary: slot2, slot 2, 2
  • melee: slot3, slot 3, 3
  • pda1: pda1, pda 1, disguise kit
  • pda2: pda2, pda 2, watch, cloak
This template will also categorize based on these values.
The default text displayed by these values can also be overridden by setting slot to any other specified value.
Example: Secondary
Primary (Crafting)
Note: this behaviour will disable the automatic categorization based on slot types. Categories will need to be applied to the bottom of the article manually.
The custom-slot parameter can also be used when the slot type is non-standard (e.g. if the weapon has both Primary and Secondary slots).
crafting-slot [primary, secondary]
For weapons that have a different crafting slot to their loadout slot.
  • primary: slot1, slot 1, 1
  • secondary: slot2, slot 3, 3
contributed-by
The person(s) who contributed the item to the game. Basic text parameter. Not displayed unless defined specifically. Categorizes the pages into Category:Community-contributed items.
released
When the item was released. Basic text parameter. Not displayed unless defined specifically.
availability
The means of obtaining the item. Basic text parameter. Not displayed unless defined specifically.
show-price
Used to disable the display of the price if in error. Prices themselves are stored inside {{Item price/core}}.
Example: off
trade[1] [yes, no]
If the item can obtained through Trading. Items are marked as tradable by default. Pages with trade set to no are categorized into Category:Untradeable items.
gift[1] [yes, no]
If the item can be wrapped using the Gift Wrap. Items are marked like this by default.
craft[1] [yes, no]
If the item can be obtained through Crafting. Items are marked as craftable by default.
paint[1] [yes, no]
If the item can be used with the Paint Can. Only displayed if type is set to hat. Hats are marked as paintable by default.
rename[1] [yes, no]
If the item can be used with the Name Tag or Description Tag.
medieval[1] [yes, no]
If the item can be used in Medieval Mode. All melee weapons default to yes.

Ammo parameters

These parameters are only available if type is set to weapon or taunt (see above).

ammo-loaded
The amount of ammo available in the clip (or magazine?). Basic text parameter. Hidden if set to "N/A" or "".
ammo-carried
The amount of additional ammo carried by the player. Basic text parameter. Hidden if set to "N/A" or "".
ammo-type
The ammo's type. Optional basic text parameter.
reload-type
The reloading type. Basic text parameter.
Common uses: Single, No Reload
show-ammo
Set to off to disable the display of ammunition stats. Some example uses would be the Razorback, Darwin's Danger Shield, or the Electro Sapper.

Loadout parameters

Main template: {{Backpack item}}
loadout
Set to yes to display loadout information as it is displayed in the backpack. Is not displayed by default.
quality[1] [normal, unique, community, unusual, self-made, valve]
Item quality. Defaults to "unique" yellow. (See Rarity#Colors and documentation of {{Backpack item}} for full list of parameters).
loadout-name
The name displayed. Defaults to either the page's name itself or the displayed name (set by name, see above). Use this parameter when the infobox name differs to the loadout name (for example, adding the rarity prefix on non-English pages):
Example: Необычный Призрачный Металлолом (Unusual Haunted Metal Scrap)
loadout-prefix
English pages will have their loadout name preceded by "The" unless this parameter is set to "none". This will be overridden if 'loadout-name' above is defined.
level
The level and type of the item. Basic text parameter. Defaults to "Level 1-100".
att-n-positive
Positive attributes. Up to 6 basic text parameters.
att-n-negative
Negative attributes. Up to 6 basic text parameters.
att-n-neutral
Neutral attributes. Up to 6 basic text parameters. Use item-description for weapon or hat descriptions instead.
item-description
The item's description. Basic text parameter. Displays the description with a smaller font size and lower line height so it fits neatly and stands out from the item's other attributes.
item-uses
The amount of uses the item has. Basic text parameter.
item-flags
The flags attached to the item. Basic text parameter.

Non-article maintenance parameters

These parameters should only be used in certain circumstances.

cat
Disables all automatic categorization (i.e. slot categorization, etc). Does not disable maintenance tracking categories.
override
Overrides Polycount Pack categorization. Will not be around for much longer.

Notes

  1. a b c d e f g h i j This parameter's value is used by the template internally and is not displayed; thus it should not be translated and should remain as-is in English.

See also