Difference between revisions of "User:Jh34ghu43gu/Template:Sandbox template"

From Team Fortress Wiki
Jump to: navigation, search
(i hate template testing)
(wah)
Line 1: Line 1:
 
{{#expr:{{#switch: {{lc:{{{1|}}}}}
 
{{#expr:{{#switch: {{lc:{{{1|}}}}}
   | c | cosmetics = {{PAGESINCATEGORY:Cosmetic items|pages|R}} - 12
+
   | c | cosmetics = {{PAGESINCATEGORY:Cosmetic items|pages|R}} - 12 <!--Edit summary 3487082-->
   | t | taunts = {{PAGESINCATEGORY:Taunts|pages|R}} -{{PAGESINCATEGORY:Weapon Taunts|pages|R}} -10
+
   | t | taunts = {{PAGESINCATEGORY:Taunts|pages|R}} - {{PAGESINCATEGORY:Weapon Taunts|pages|R}} - 10 <!-- 10 list pages -->
   | w | weapons = {{PAGESINCATEGORY:Weapons|pages|R}} -4
+
   | w | weapons = {{PAGESINCATEGORY:Weapons|pages|R}} - 4 <!-- 4 list pages -->
   | str | strange = {{PAGESINCATEGORY:Strange items|pages|R}} -2
+
   | str | strange = {{PAGESINCATEGORY:Strange items|pages|R}} - {{#ifeq:{{{2|}}}|cosmetic|163|0}} - 1 <!-- 1 list page -->
   | v | vintage = {{PAGESINCATEGORY:Vintage items|pages|R}} - {{#ifeq:cosmetic|cosmetic|61|1}}
+
   | v | vintage = {{PAGESINCATEGORY:Vintage items|pages|R}} - {{#ifeq:{{{2|}}}|cosmetic|50|0}}
   | g | genuine = {{PAGESINCATEGORY:Genuine items|pages|R}} -1
+
   | g | genuine = {{PAGESINCATEGORY:Genuine items|pages|R}} - {{#ifeq:{{{2|}}}|cosmetic|33|0}}
   | h | haunted = {{PAGESINCATEGORY:Haunted items|pages|R}} -1
+
   | h | haunted = {{PAGESINCATEGORY:Haunted items|pages|R}} - {{#ifeq:{{{2|}}}|cosmetic|2|0}} + 8 <!--add 8 for hween masks)
   | u | unusual = {{PAGESINCATEGORY:Unusual items|pages|R}} -1
+
   | u | unusual = {{PAGESINCATEGORY:Unusual items|pages|R}} - {{#ifeq:{{{2|}}}|cosmetic|2 - {{PAGESINCATEGORY:Taunts|pages|R}} + {{PAGESINCATEGORY:Weapon Taunts|pages|R}} + 10<!--10 List pages-->|0}}
   | col | collectors = {{PAGESINCATEGORY:Collector's items|pages|R}}
+
   | col | collectors = {{PAGESINCATEGORY:Collector's items|pages|R}} - {{#ifeq:{{{2|}}}|cosmetic|136|0}}
 
   | s | styles = {{PAGESINCATEGORY:Items with styles|pages|R}} -1
 
   | s | styles = {{PAGESINCATEGORY:Items with styles|pages|R}} -1
 
   | p | paintable = {{PAGESINCATEGORY:Paintable items|pages|R}}
 
   | p | paintable = {{PAGESINCATEGORY:Paintable items|pages|R}}
Line 28: Line 28:
 
*'''w''' or '''weapons''' - Total count of [[weapons]], including [[reskins]]. Count taken from [[:Category:Weapons]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|w}})
 
*'''w''' or '''weapons''' - Total count of [[weapons]], including [[reskins]]. Count taken from [[:Category:Weapons]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|w}})
 
*'''str''' or '''strange''' - Total count of items that can be obtained in [[Strange]] quality. Count taken from [[:Category:Strange items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|str}})
 
*'''str''' or '''strange''' - Total count of items that can be obtained in [[Strange]] quality. Count taken from [[:Category:Strange items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|str}})
*'''v''' or '''vintage''' - Total count of items that can be obtained in [[Vintage]] quality. Count taken from [[:Category:Vintage items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|v|cosmetic}})
+
**Optional second argument '''cosmetic''' to get the total count of cosmetic items obtainable in Strange quality: ({{User:Jh34ghu43gu/Template:Sandbox_template|str|cosmetic}})
 +
*'''v''' or '''vintage''' - Total count of items that can be obtained in [[Vintage]] quality. Count taken from [[:Category:Vintage items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|v}})
 +
**Optional second argument '''cosmetic''' to get the total count of cosmetic items obtainable in Vintage quality: ({{User:Jh34ghu43gu/Template:Sandbox_template|v|cosmetic}})
 
*'''g''' or '''genuine''' - Total count of items that can be obtained in [[Genuine]] quality. Count taken from [[:Category:Genuine items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|g}})
 
*'''g''' or '''genuine''' - Total count of items that can be obtained in [[Genuine]] quality. Count taken from [[:Category:Genuine items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|g}})
 +
**Optional second argument '''cosmetic''' to get the total count of cosmetic items obtainable in Genuine quality: ({{User:Jh34ghu43gu/Template:Sandbox_template|g|cosmetic}})
 
*'''h''' or '''haunted''' - Total count of items that can be obtained in [[Haunted]] quality. Count taken from [[:Category:Haunted items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|h}})
 
*'''h''' or '''haunted''' - Total count of items that can be obtained in [[Haunted]] quality. Count taken from [[:Category:Haunted items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|h}})
 +
**Optional second argument '''cosmetic''' to get the total count of cosmetic items obtainable in Haunted quality: ({{User:Jh34ghu43gu/Template:Sandbox_template|h|cosmetic}})
 
*'''u''' or '''unusual''' - Total count of items that can be obtained in [[Unusual]] quality. Count taken from [[:Category:Unusual items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|u}})
 
*'''u''' or '''unusual''' - Total count of items that can be obtained in [[Unusual]] quality. Count taken from [[:Category:Unusual items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|u}})
 +
**Optional second argument '''cosmetic''' to get the total count of cosmetic items obtainable in Unusual quality: ({{User:Jh34ghu43gu/Template:Sandbox_template|u|cosmetic}})
 
*'''col''' or '''collectors''' - Total count of items that can be obtained in [[Collector's]] quality. Count taken from [[:Category:Collector's items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|col}})
 
*'''col''' or '''collectors''' - Total count of items that can be obtained in [[Collector's]] quality. Count taken from [[:Category:Collector's items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|col}})
 +
**Optional second argument '''cosmetic''' to get the total count of cosmetic items obtainable in Collector's quality: ({{User:Jh34ghu43gu/Template:Sandbox_template|col|cosmetic}})
 
*'''s''' or '''styles''' - Total count of items with [[styles]]. Count taken from [[:Category:Items with styles]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|s}})
 
*'''s''' or '''styles''' - Total count of items with [[styles]]. Count taken from [[:Category:Items with styles]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|s}})
 
*'''p''' or '''paintable''' - Total count of items that can be painted. Count taken from [[:Category:Paintable items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|p}})
 
*'''p''' or '''paintable''' - Total count of items that can be painted. Count taken from [[:Category:Paintable items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|p}})
 
*'''pv''' or '''paint variants''' - Total count of [[paint]] colors. Count taken from [[:Category:Paint images]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|pv}})
 
*'''pv''' or '''paint variants''' - Total count of [[paint]] colors. Count taken from [[:Category:Paint images]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|pv}})
*'''uc''' or '''unusual cosmetics''' - Total count of cosmetic items that can be obtained in Unusual quality. Count taken from [[:Category:Unusual items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|uc}})
+
<s>*'''uc''' or '''unusual cosmetics''' - Total count of cosmetic items that can be obtained in Unusual quality. Count taken from [[:Category:Unusual items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|uc}})<s> Use {{tlx|Itemcount|u|cosmetic}} for unusual cosmetics count.
 
*'''ut''' or '''unusual taunts''' - Total count of taunts that can be obtained in Unusual quality. Count taken from [[:Category:Unusual taunts]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|ut}})
 
*'''ut''' or '''unusual taunts''' - Total count of taunts that can be obtained in Unusual quality. Count taken from [[:Category:Unusual taunts]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|ut}})
 
*'''uw''' or '''unusual weapons''' - Total count of weapons that can be obtained in Unusual quality. Count taken from [[:Category:Decorated items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|uw}})
 
*'''uw''' or '''unusual weapons''' - Total count of weapons that can be obtained in Unusual quality. Count taken from [[:Category:Decorated items]]: ({{User:Jh34ghu43gu/Template:Sandbox_template|uw}})

Revision as of 08:18, 11 November 2024

0}}

Documentation for Jh34ghu43gu/Template:Sandbox template

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.

) ) ) )
    • Optional second argument cosmetic to get the total count of cosmetic items obtainable in Strange quality: (
) )
    • Optional second argument cosmetic to get the total count of cosmetic items obtainable in Vintage quality: (
) )
    • Optional second argument cosmetic to get the total count of cosmetic items obtainable in Genuine quality: (
) )
    • Optional second argument cosmetic to get the total count of cosmetic items obtainable in Haunted quality: (
) )
    • Optional second argument cosmetic to get the total count of cosmetic items obtainable in Unusual quality: (
) )
    • Optional second argument cosmetic to get the total count of cosmetic items obtainable in Collector's quality: (
) ) ) )

*uc or unusual cosmetics - Total count of cosmetic items that can be obtained in Unusual quality. Count taken from Category:Unusual items: (

) Use {{Itemcount|u|cosmetic}} for unusual cosmetics count.
  • ut or unusual taunts - Total count of taunts that can be obtained in Unusual quality. Count taken from Category:Unusual taunts: (
)
  • uw or unusual weapons - Total count of weapons that can be obtained in Unusual quality. Count taken from Category:Decorated items: (
) ) ) )

Example

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

cosmetic items.