Difference between revisions of "Template:Ammo tool"

From Team Fortress Wiki
Jump to: navigation, search
m
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#switch: {{#expr: ({{{1}}}/100) mod 10}}
+
<includeonly><span style="font-family:TF2 Build; font-size:64px; color:#3d3923; text-shadow:1px 1px 1px #b0ab9f; position: relative; top: 8px;">{{{1}}}</span>{{#switch: {{{2}}}
  | 1 = [[File:Loaded_1.png]]
+
  | 0 = {{ns:}}
  | 2 = [[File:Loaded_2.png]]
+
  | inf = <span style="font-family:Arial Narrow; font-size:40px; color:#3d3923; text-shadow:1px 1px 1px #b0ab9f; position: relative; top: 8px;">∞</span>
| 3 = [[File:Loaded_3.png]]
+
  | #default = <span style="font-family:tf2; font-size:34px; color:#3d3923; text-shadow:1px 1px 1px #b0ab9f; position: relative; top: 8px;">{{{2}}}</span>}}
| 4 = [[File:Loaded_4.png]]
+
</includeonly><noinclude>{{doc begin}}
| 5 = [[File:Loaded_5.png]]
+
{{tl|Ammo tool}} can display the amount of ammunition carried/loaded in a way resembling the indicator on the in-game HUD. It was designed to be used in weapon charts to improve the aesthetical features of the presentation.
  | 6 = [[File:Loaded_6.png]]
+
 
| 7 = [[File:Loaded_7.png]]
+
=== Parameters ===
| 8 = [[File:Loaded_8.png]]
+
<code><nowiki>{{Ammo tool|''integer value of ammo loaded''|''integer value of ammo carried (including 0 for weapons like Minigun or Flamethrower) OR string "inf" to indicate the carried ammo is unlimited (for weapons like Cow Mangler 5000 or Jarate)''}}</nowiki></code>
| 9 = [[File:Loaded_9.png]]
+
 
}}{{#switch: {{#expr: ({{{1}}}/10) mod 10}}
+
=== Example usages ===
  | 1 = [[File:Loaded_1.png]]
+
* {{tlx|Ammo tool|6|32}} generates:
  | 2 = [[File:Loaded_2.png]]
+
{{Ammo tool|6|32}}
  | 3 = [[File:Loaded_3.png]]
+
* {{tlx|Ammo tool|200|0}} generates:
  | 4 = [[File:Loaded_4.png]]
+
{{Ammo tool|200|0}}
  | 5 = [[File:Loaded_5.png]]
+
* {{tlx|Ammo tool|5|inf}} generates:
  | 6 = [[File:Loaded_6.png]]
+
{{Ammo tool|5|inf}}
  | 7 = [[File:Loaded_7.png]]
+
* {{tlx|Ammo tool|12|200}} generates:
  | 8 = [[File:Loaded_8.png]]
+
{{Ammo tool|12|200}}
  | 9 = [[File:Loaded_9.png]]
+
 
  | 0 = {{#ifexpr: ({{{1}}}/100) mod 10 > 0 | [[File:Loaded_0.png]] }}
+
{| class="wikitable grid" width="100%"
}}{{#switch: {{#expr: {{{1}}} mod 10}}
+
! class="header" width="10%" | Wep
| 1 = [[File:Loaded_1.png]]
+
! class="header" width="5%"  | Frag icon
| 2 = [[File:Loaded_2.png]]
+
! class="header" width="5%"  | {{Tooltip|Ammo|Big digits - loaded; small digits - carried}}
| 3 = [[File:Loaded_3.png]]
+
! class="header" width="10%" | Dmg
| 4 = [[File:Loaded_4.png]]
+
! class="header" width="30%" | Importnt
| 5 = [[File:Loaded_5.png]]
+
|-
| 6 = [[File:Loaded_6.png]]
+
! {{Table icon|Grenade Launcher|Stock}}
| 7 = [[File:Loaded_7.png]]
+
| align="center" | {{Icon killicon|weapon=Grenade Launcher}}
| 8 = [[File:Loaded_8.png]]
+
| align="center" | {{Ammo tool|4|16}}
| 9 = [[File:Loaded_9.png]]
+
| '''Base''': A lot
| 0 = [[File:Loaded_0.png]]
+
'''[[Crit]]''': Much more
}}{{#ifeq: {{{2}}} | 0 | {{ns:}}
+
|
| {{#ifeq: {{{2}}} | inf | [[File:Carried_inf.png]]
+
{{Info}}Shoot
| {{#switch: {{#expr: ({{{2}}}/100) mod 10}}
+
 
| 1 = [[File:Carried_1.png]]
+
{{Info}}Shoot
| 2 = [[File:Carried_2.png]]
+
 
| 3 = [[File:Carried_3.png]]
+
{{Info}}Shoot
| 4 = [[File:Carried_4.png]]
+
 
| 5 = [[File:Carried_5.png]]
+
{{Pro}}Profit!
| 6 = [[File:Carried_6.png]]
+
|-
| 7 = [[File:Carried_7.png]]
+
|}
| 8 = [[File:Carried_8.png]]
+
[[Category:Formatting templates|Ammo tool]]
| 9 = [[File:Carried_9.png]]
+
</noinclude>
}}{{#switch: {{#expr: ({{{2}}}/10) mod 10}}
 
| 1 = [[File:Carried_1.png]]
 
| 2 = [[File:Carried_2.png]]
 
| 3 = [[File:Carried_3.png]]
 
| 4 = [[File:Carried_4.png]]
 
| 5 = [[File:Carried_5.png]]
 
| 6 = [[File:Carried_6.png]]
 
| 7 = [[File:Carried_7.png]]
 
| 8 = [[File:Carried_8.png]]
 
| 9 = [[File:Carried_9.png]]
 
| 0 = {{#ifexpr: ({{{2}}}/100) mod 10 > 0
 
| [[File:Carried_0.png]] }}
 
}}{{#switch: {{#expr: {{{2}}} mod 10}}
 
| 1 = [[File:Carried_1.png]]
 
| 2 = [[File:Carried_2.png]]
 
| 3 = [[File:Carried_3.png]]
 
| 4 = [[File:Carried_4.png]]
 
| 5 = [[File:Carried_5.png]]
 
| 6 = [[File:Carried_6.png]]
 
| 7 = [[File:Carried_7.png]]
 
| 8 = [[File:Carried_8.png]]
 
| 9 = [[File:Carried_9.png]]
 
| 0 = [[File:Carried_0.png]]
 
}}}}}}
 

Latest revision as of 18:59, 17 March 2022

Documentation for Ammo tool

{{Ammo tool}} can display the amount of ammunition carried/loaded in a way resembling the indicator on the in-game HUD. It was designed to be used in weapon charts to improve the aesthetical features of the presentation.

Parameters

{{Ammo tool|''integer value of ammo loaded''|''integer value of ammo carried (including 0 for weapons like Minigun or Flamethrower) OR string "inf" to indicate the carried ammo is unlimited (for weapons like Cow Mangler 5000 or Jarate)''}}

Example usages

632

200

5

12200


Wep Frag icon Ammo Dmg Importnt
Grenade Launcher
Stock
Grenade Launcher
Killicon grenade launcher.png 416 Base: A lot

Crit: Much more

Pictogram info.png Shoot

Pictogram info.png Shoot

Pictogram info.png Shoot

Pictogram plus.png Profit!