Difference between revisions of "Template:Itemcount"

From Team Fortress Wiki
Jump to: navigation, search
(more fixing)
m
 
(35 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{#expr:{{#switch: {{lc:{{{1|}}}}}
 
{{#expr:{{#switch: {{lc:{{{1|}}}}}
   | v | vintage = {{PAGESINCATEGORY:Vintage items|pages}} -1 <!-- extra page -->
+
   | c | cosmetics = {{PAGESINCATEGORY:Cosmetic items|pages|R}} - 12
   | g | genuine = {{PAGESINCATEGORY:Genuine items|pages}} -1 <!-- extra page -->
+
  | t | taunts = {{PAGESINCATEGORY:Taunts|pages|R}} -{{PAGESINCATEGORY:Weapon Taunts|pages|R}} -10
   | strange = {{PAGESINCATEGORY:Strange items|pages}} -2 <!-- extra pages -->
+
   | w | weapons = {{PAGESINCATEGORY:Weapons|pages|R}} -4
   | u | unusual= {{PAGESINCATEGORY:Unusual items|pages}} -1 <!-- extra page -->
+
   | str | strange = {{PAGESINCATEGORY:Strange items|pages|R}} -2
   | c | cosmetics = {{PAGESINCATEGORY:Cosmetic items|pages|R}} -1 <!-- extra page -->
+
  | v | vintage = {{PAGESINCATEGORY:Vintage items|pages|R}} -1
   | w | weapons = {{PAGESINCATEGORY:Weapons|pages|R}} -1 <!-- extra page -->
+
   | g | genuine = {{PAGESINCATEGORY:Genuine items|pages|R}} -1
   | pv | paint variants = 29 <!-- up to date as of Nov 3, 2014 -->
+
   | h | haunted = {{PAGESINCATEGORY:Haunted items|pages|R}} -1
   | s | styles = {{PAGESINCATEGORY:Items with styles|pages}} -1 <!-- extra page -->
+
   | u | unusual = {{PAGESINCATEGORY:Unusual items|pages|R}} -1
   | p | paintable = {{PAGESINCATEGORY:Paintable items|pages}}
+
   | col | collectors = {{PAGESINCATEGORY:Collector's items|pages|R}}
   | h | haunted = {{PAGESINCATEGORY:Haunted items|pages}}
+
   | s | styles = {{PAGESINCATEGORY:Items with styles|pages|R}} -1
   | t | taunts = {{PAGESINCATEGORY:Taunts|pages}} -26 <!-- extra pages -->
+
   | p | paintable = {{PAGESINCATEGORY:Paintable items|pages|R}}
 
+
   | pv | paint variants = {{PAGESINCATEGORY:Paint images|files|R}} -{{PAGESINCATEGORY:Custom paint colors|files|R}} -(({{PAGESINCATEGORY:Paint images|files|R}} -{{PAGESINCATEGORY:Custom paint colors|files|R}})/2)
 +
  | uc | unusual cosmetics = {{PAGESINCATEGORY:Unusual items|pages|R}} -{{PAGESINCATEGORY:Unusual taunts|pages|R}} -3
 +
   | ut | unusual taunts = {{PAGESINCATEGORY:Unusual taunts|pages|R}}
 +
  | uw | unusual weapons = {{PAGESINCATEGORY:Decorated items|pages|R}} -1
 +
  | uce | unusual cosmetic effects = {{PAGESINCATEGORY:Cosmetic Unusuals|files|R}} -({{PAGESINCATEGORY:Team-colored cosmetic Unusuals|files|R}}/2)
 +
  | ute | unusual taunt effects = {{PAGESINCATEGORY:Taunt Unusuals|files|R}} -({{PAGESINCATEGORY:Team-colored taunt Unusuals|files|R}}/2)
 +
  | uwe | unusual weapon effects = {{PAGESINCATEGORY:Weapon Unusuals|files|R}}
 
}}}}<noinclude>
 
}}}}<noinclude>
 
{{doc begin}}
 
{{doc begin}}
 
== Usage ==
 
== Usage ==
 +
{{Note|Some counts are not directly taken from the categories, but rather use calculations to exclude certain pages. Please see template's source for specifics.}}
 +
 
This template was created for easier changing count of items in lots of articles.  
 
This template was created for easier changing count of items in lots of articles.  
*'''c''' or '''cosmetics''' - Count of cosmetic items.
+
*'''c''' or '''cosmetics''' - Total count of [[cosmetic items]]. Count taken from [[:Category:Cosmetic items]]: ({{Itemcount|c}})
*'''v''' or '''vintage''' - Count of vintage cosmetics/weapons.
+
*'''t''' or '''taunts''' - Total count of [[taunts]], minus any default ones. Count taken from [[:Category:Taunts]]: ({{Itemcount|t}})
*'''g''' or '''genuine''' - Count of genuine cosmetics/weapons.
+
*'''w''' or '''weapons''' - Total count of [[weapons]], including [[reskins]]. Count taken from [[:Category:Weapons]]: ({{Itemcount|w}})
*'''strange''' - Count of strange cosmetics/weapons
+
*'''str''' or '''strange''' - Total count of items that can be obtained in [[Strange]] quality. Count taken from [[:Category:Strange items]]: ({{Itemcount|str}})
*'''u''' or '''unusual''' - Count of unusual cosmetics.
+
*'''v''' or '''vintage''' - Total count of items that can be obtained in [[Vintage]] quality. Count taken from [[:Category:Vintage items]]: ({{Itemcount|v}})
*'''h''' or '''haunted''' - Count of haunted cosmetics.
+
*'''g''' or '''genuine''' - Total count of items that can be obtained in [[Genuine]] quality. Count taken from [[:Category:Genuine items]]: ({{Itemcount|g}})
*'''p''' or '''paintable''' - Count of paintable cosmetic items.
+
*'''h''' or '''haunted''' - Total count of items that can be obtained in [[Haunted]] quality. Count taken from [[:Category:Haunted items]]: ({{Itemcount|h}})
*'''pv''' or '''painted variants''' - Count of paint variants.
+
*'''u''' or '''unusual''' - Total count of items that can be obtained in [[Unusual]] quality. Count taken from [[:Category:Unusual items]]: ({{Itemcount|u}})
*'''s''' or '''styles''' - Count of items with alternate styles.
+
*'''col''' or '''collectors''' - Total count of items that can be obtained in [[Collector's]] quality. Count taken from [[:Category:Collector's items]]: ({{Itemcount|col}})
 +
*'''s''' or '''styles''' - Total count of items with [[styles]]. Count taken from [[:Category:Items with styles]]: ({{Itemcount|s}})
 +
*'''p''' or '''paintable''' - Total count of items that can be painted. Count taken from [[:Category:Paintable items]]: ({{Itemcount|p}})
 +
*'''pv''' or '''paint variants''' - Total count of [[paint]] colors. Count taken from [[:Category:Paint images]]: ({{Itemcount|pv}})
 +
*'''uc''' or '''unusual cosmetics''' - Total count of cosmetic items that can be obtained in Unusual quality. Count taken from [[:Category:Unusual items]]: ({{Itemcount|uc}})
 +
*'''ut''' or '''unusual taunts''' - Total count of taunts that can be obtained in Unusual quality. Count taken from [[:Category:Unusual taunts]]: ({{Itemcount|ut}})
 +
*'''uw''' or '''unusual weapons''' - Total count of weapons that can be obtained in Unusual quality. Count taken from [[:Category:Decorated items]]: ({{Itemcount|uw}})
 +
*'''uce''' or '''unusual cosmetic effects''' - Total count of Unusual cosmetic effects. Count taken from [[:Category:Cosmetic Unusuals]]: ({{Itemcount|uce}})
 +
*'''ute''' or '''unusual taunt effects''' - Total count of Unusual taunt effects. Count taken from [[:Category:Taunt Unusuals]]: ({{Itemcount|ute}})
 +
*'''uwe''' or '''unusual weapon effects''' - Total count of Unusual weapon effects. Count taken from [[:Category:Weapon Unusuals]]: ({{Itemcount|uwe}})
  
 
== Example ==
 
== Example ==

Latest revision as of 21:24, 2 February 2024

Documentation for Itemcount

Usage

Pictogram comment.png Some counts are not directly taken from the categories, but rather use calculations to exclude certain pages. Please see template's source for specifics.

This template was created for easier changing count of items in lots of articles.

Example

There are {{Itemcount|c}} cosmetic items. generates: There are 1820 cosmetic items.