Difference between revisions of "Template:Backpack item/doc"

From Team Fortress Wiki
Jump to: navigation, search
m (LOL missed this somehow)
Line 137: Line 137:
  
 
== Examples ==
 
== Examples ==
<pre>
+
{| class="wikitable grid"
{{Backpack item
+
! class="header" width="50%" | Code
 +
! class="header" width="50%" | Output
 +
|-
 +
|<pre>
 +
{{Backpack item/sandbox
 
| item-name = Cloak and Dagger
 
| item-name = Cloak and Dagger
 
| item-level = 5  
 
| item-level = 5  
Line 145: Line 149:
 
| att-2-positive = +80% cloak regen rate
 
| att-2-positive = +80% cloak regen rate
 
| att-3-negative = +60% cloak drain rate
 
| att-3-negative = +60% cloak drain rate
| width = 40%
 
 
}}
 
}}
 
</pre>
 
</pre>
will generate:
+
|{{Backpack item/sandbox
{{Backpack item
 
 
| item-name = Cloak and Dagger
 
| item-name = Cloak and Dagger
 
| item-level = 5  
 
| item-level = 5  
Line 156: Line 158:
 
| att-2-positive = +80% cloak regen rate
 
| att-2-positive = +80% cloak regen rate
 
| att-3-negative = +60% cloak drain rate
 
| att-3-negative = +60% cloak drain rate
| width = 40%
 
 
}}
 
}}
<pre>
+
|-
{{Backpack item
+
|<pre>
 +
{{Backpack item/sandbox
 
| item-name = Rocket Launcher
 
| item-name = Rocket Launcher
 
| custom-name = Rawket Lawnchair
 
| custom-name = Rawket Lawnchair
Line 169: Line 171:
 
| att-3-negative = +50% increase in financial hardship
 
| att-3-negative = +50% increase in financial hardship
 
| custom-description = For those who favour comfort over fiscal stability.
 
| custom-description = For those who favour comfort over fiscal stability.
| width = 40%
 
 
}}
 
}}
 
</pre>
 
</pre>
will generate:
+
|{{Backpack item/sandbox
{{Backpack item
 
 
| item-name = Rocket Launcher
 
| item-name = Rocket Launcher
 
| custom-name = Rawket Lawnchair
 
| custom-name = Rawket Lawnchair
Line 183: Line 183:
 
| att-3-negative = +50% increase in financial hardship
 
| att-3-negative = +50% increase in financial hardship
 
| custom-description = For those who favour comfort over fiscal stability.
 
| custom-description = For those who favour comfort over fiscal stability.
| width = 40%
 
 
}}
 
}}
<pre>
+
|-
{{Backpack item
+
|<pre>
 +
{{Backpack item/sandbox
 
| item-name = Wiki Cap
 
| item-name = Wiki Cap
 
| quality = community
 
| quality = community
Line 194: Line 194:
 
| unusual-effect = Community Sparkle
 
| unusual-effect = Community Sparkle
 
| item-description = Given to valuable Community Contributors<br>Given to valuable contributors to the official TF2 Wiki<br><nowiki>http://wiki.teamfortress.com/</nowiki>
 
| item-description = Given to valuable Community Contributors<br>Given to valuable contributors to the official TF2 Wiki<br><nowiki>http://wiki.teamfortress.com/</nowiki>
| width = 40%
 
 
}}
 
}}
 
</pre>
 
</pre>
will generate:
+
|{{Backpack item/sandbox
{{Backpack item
 
 
| item-name = Wiki Cap
 
| item-name = Wiki Cap
 
| quality = community
 
| quality = community
Line 206: Line 204:
 
| unusual-effect = Community Sparkle
 
| unusual-effect = Community Sparkle
 
| item-description = Given to valuable Community Contributors<br>Given to valuable contributors to the official TF2 Wiki<br><nowiki>http://wiki.teamfortress.com/</nowiki>
 
| item-description = Given to valuable Community Contributors<br>Given to valuable contributors to the official TF2 Wiki<br><nowiki>http://wiki.teamfortress.com/</nowiki>
| width = 40%
 
 
}}
 
}}
<pre>
+
|-
{{Backpack item
+
|<pre>
 +
{{Backpack item/sandbox
 
| item-name = Tux
 
| item-name = Tux
 
| limited = yes
 
| limited = yes
Line 216: Line 214:
 
| item-flags = Not Tradable
 
| item-flags = Not Tradable
 
| item-description = Linux represent!
 
| item-description = Linux represent!
| width = 40%
 
 
}}
 
}}
 
</pre>
 
</pre>
will generate:
+
|{{Backpack item/sandbox
{{Backpack item
 
 
| item-name = Tux
 
| item-name = Tux
 
| limited = yes
 
| limited = yes
Line 227: Line 223:
 
| item-flags = Not Tradable
 
| item-flags = Not Tradable
 
| item-description = Linux represent!
 
| item-description = Linux represent!
| width = 40%
 
 
}}
 
}}
<pre>
+
|-
{{Backpack item
+
|<pre>
 +
{{Backpack item/sandbox
 
| item-name = Citizen Pain
 
| item-name = Citizen Pain
 
| item-kind = Minigun
 
| item-kind = Minigun
 
| grade = Assassin
 
| grade = Assassin
 
| wear = Battle Scarred
 
| wear = Battle Scarred
| width = 40%
 
 
}}
 
}}
 
</pre>
 
</pre>
will generate:
+
|{{Backpack item/sandbox
{{Backpack item
 
 
| item-name = Citizen Pain
 
| item-name = Citizen Pain
 
| item-kind = Minigun
 
| item-kind = Minigun
 
| grade = Assassin
 
| grade = Assassin
 
| wear = Battle Scarred
 
| wear = Battle Scarred
| width = 40%
 
 
}}
 
}}
<pre>
+
|-
{{Backpack item
+
|<pre>
 +
{{Backpack item/sandbox
 
| item-name = A Hat to Kill For
 
| item-name = A Hat to Kill For
 
| item-kind = Hat
 
| item-kind = Hat
 
| grade = Civilian
 
| grade = Civilian
| width = 40%
 
 
}}
 
}}
 
</pre>
 
</pre>
will generate:
+
|{{Backpack item/sandbox
{{Backpack item
 
 
| item-name = A Hat to Kill For
 
| item-name = A Hat to Kill For
 
| item-kind = Hat
 
| item-kind = Hat
 
| grade = Civilian
 
| grade = Civilian
| width = 40%
 
 
}}
 
}}
 
+
|-
 +
|<pre>
 +
{{Backpack item/sandbox
 +
| item-name = Scattergun
 +
| item-kind = Scattergun
 +
| rankson = Kills
 +
| killcount = 1200
 +
| rankson2 = Strange Part Domination Kills
 +
| killcount2 = 100
 +
}}
 +
</pre>
 +
|{{Backpack item/sandbox
 +
| item-name = Scattergun
 +
| item-kind = Scattergun
 +
| rankson = Kills
 +
| killcount = 1200
 +
| rankson2 = Strange Part Domination Kills
 +
| killcount2 = 100
 +
}}
 +
|-
 +
|<pre>
 +
{{Backpack item/sandbox
 +
| item-name = Medigun
 +
| item-kind = Scattergun
 +
| rankson = Ubers
 +
| killcount = 20
 +
| rankson2 = Kill assists
 +
| killcount2 = 300
 +
| rankson3 = Strange Part Allied Healing Done
 +
| killcount3 = 10000
 +
}}
 +
</pre>
 +
|{{Backpack item/sandbox
 +
| item-name = Medigun
 +
| item-kind = Scattergun
 +
| rankson = Ubers
 +
| killcount = 20
 +
| rankson2 = Kill assists
 +
| killcount2 = 300
 +
| rankson3 = Strange Part Allied Healing Done
 +
| killcount3 = 10000
 +
}}
 +
|}
 
== See also ==
 
== See also ==
 
{{Image insertion templates list}}
 
{{Image insertion templates list}}
  
 
<noinclude>[[Category:Template documentation|Backpack item]]</noinclude>
 
<noinclude>[[Category:Template documentation|Backpack item]]</noinclude>

Revision as of 22:28, 14 February 2016

This template is used to display item stats similar to how they appear in-game.

Parameters

Parameter Example Description
item-name Batter's Helmet Proper item name in English (e.g. Batter's Helmet instead of Casque de Batteur). The item name will be automatically translated on language subpages.
custom-name Spam Hammer Adds a custom name with quotation marks. Still needs item-name to produce the correct image.
no-custom-name-quotes yes Removes quotation marks from custom names if the custom-name field is used.
custom-icon File:User Username my item icon.png Adds a custom icon for users' own purposes. This parameter is independent from item-name parameter.
quality normal Defaults to "unique" (the standard item yellow). See Item quality for a list of accepted values.
prefix none
The Best
Set to "none" to hide the "Vintage" or "Community", etc, prefix but keeping the colour. Can also use a custom value, e.g. "prefix = The Best" will generate "The Best Flare Gun".
suffix none
The Best
Same as 'prefix' for non-en pages. Can also use a custom value, e.g. "suffix = The Best" will generate "Flare Gun The Best".
paint-color 7C6C57 Adds the colored paint 'splat' specified to the top right of the item icon.
unusual-effect Bubbling Adds the Particle Effect icon to the top right of the item's icon. Also adds the "Unusual Effect:" line.
strange-icon yes Adds the Strange/StatTrack icon to the top right of the item's icon.
decal-icon yes Adds this icon to the top right of the item's icon. Only used on the Items page.
Attributes
item-level Level 50 Hat
Wicked Nasty Rocket Launcher - Kills: 500
Item level. Defaults to "Level 0-100". Can also be used to indicate the rank and primary stat tracker on a Strange weapon.
item-kind Hat Item kind. If specified, item-level should be only the level, the word "Level" will be added by the template.
no-level yes Optional attribute. If "yes", item level will not be displayed.
limited yes Optional attribute. If "yes", the item name will be colored yellow, the word "Limited" will be added with a link to Limited Quantity.
grade elite Optional attribute. If specified, the item name will be colored correctly for the grade, and the name of the grade will be added before the name, e.g.: Elite Grade Rocket Launcher. See grade for a full list of valid options.
wear factory new Must be specified if grade is specified. Listed in parenthesis after the item name, e.g.: Rocket Launcher (Factory New). Valid options are battle scarred, well worn, field tested, minimal wear, factory new.
strange-secondary (Kill Assists: 500) Secondary stat tracker for Strange weapons, where applicable.
att-strangerank-n att-strangerank-1=(Heavies Killed: 100) Displays up to 3 additional lines for tracking stats from Strange Parts that may have been applied to a weapon.

att-n-neutral
att-n-positive
att-n-negative

att-1-neutral = Cloak Type: Feign Death
att-2-positive = +80% cloak regen rate
att-3-negative = +60% cloak drain rate
(See section on examples below)

Displays up to 8 positive, negative and neutral values.
item-description It doesn't matter how much people respect you when they're on fire. For items that have an in-game description. This displays the description in a smaller font in order to distinguish from neutral attributes. Will not display if a custom-description is set.
custom-description This hat is the greatest. For items that have a custom in-game description (from a Description Tag). Displays like a normal description but has quotation marks surrounding it.
gift-from Robin Display the source of a gifted item. Displays the text "Gift from: Robin"
date-received Mar 23, 2011 (06:30:00) Display the date a gifted item was received. Will not appear if no gift-from is defined. Displays the text "Date Received: Mar 23, 2011 (06:30:00)"
item-expiration Dec 31, 2010 (23:00:00) For items that expire. Displays the text "This item will expire on Dec 31, 2010 (23:00:00).".
item-uses 5 For items that have "uses". Displays the text "This is a limited item. Uses: 5".
item-flags Not Tradable or Usable in Crafting For item flags. Displays them inside brackets: "( Not Tradable or Usable in Crafting )".
Styling
width 25% Width parameter. Defaults to 100% in infoboxes, but for other usages, can be any value (%, px, pt, em).
style Style parameter. Can add any valid CSS style to the main div.

Examples

Code Output
{{Backpack item/sandbox
| item-name = Cloak and Dagger
| item-level = 5 
| item-kind = Invis Watch
| att-1-neutral = Cloak Type: Feign Death
| att-2-positive = +80% cloak regen rate
| att-3-negative = +60% cloak drain rate
}}
Template:Backpack item/sandbox
{{Backpack item/sandbox
| item-name = Rocket Launcher
| custom-name = Rawket Lawnchair
| quality = vintage
| item-level = 50
| item-kind = Furniture
| att-1-positive = +20% additional comfort
| att-2-positive = +35% increase in lumbar support
| att-3-negative = +50% increase in financial hardship
| custom-description = For those who favour comfort over fiscal stability.
}}
Template:Backpack item/sandbox
{{Backpack item/sandbox
| item-name = Wiki Cap
| quality = community
| item-kind = Hat
| item-level = 20
| item-flags = Not Tradable or Usable in Crafting
| unusual-effect = Community Sparkle
| item-description = Given to valuable Community Contributors<br>Given to valuable contributors to the official TF2 Wiki<br>http://wiki.teamfortress.com/
}}
Template:Backpack item/sandbox
{{Backpack item/sandbox
| item-name = Tux
| limited = yes
| item-kind = Mascot
| item-level = 1-100
| item-flags = Not Tradable
| item-description = Linux represent!
}}
Template:Backpack item/sandbox
{{Backpack item/sandbox
| item-name = Citizen Pain
| item-kind = Minigun
| grade = Assassin
| wear = Battle Scarred
}}
Template:Backpack item/sandbox
{{Backpack item/sandbox
| item-name = A Hat to Kill For
| item-kind = Hat
| grade = Civilian
}}
Template:Backpack item/sandbox
{{Backpack item/sandbox
| item-name = Scattergun
| item-kind = Scattergun
| rankson = Kills
| killcount = 1200
| rankson2 = Strange Part Domination Kills
| killcount2 = 100
}}
Template:Backpack item/sandbox
{{Backpack item/sandbox
| item-name = Medigun
| item-kind = Scattergun
| rankson = Ubers
| killcount = 20
| rankson2 = Kill assists
| killcount2 = 300
| rankson3 = Strange Part Allied Healing Done
| killcount3 = 10000
}}
Template:Backpack item/sandbox

See also

Image insertion templatesview  edit )