Template:Weapon properties

From TF2 Classic Wiki
Revision as of 20:56, 28 May 2023 by Ratboy Slim (talk | contribs)
Jump to navigation Jump to search
Properties
All values are approximate.

Documentation for Weapon properties

This is a template for displaying weapon properties on weapon pages.

By default, the only rows that will show up are the "Properties" header row and the "All values are approximate" footer row.

To make a row appear in the template, pass any string to its parameter. If no parameter is passed, the row will not show up. The passed parameter will show up in its right-most column.

Values for header rows (Damage, Status Effects, Splash, Healing, Construction, Ammo, Function Times) must be true if you want them to be displayed. Any other value is silently ignored, and the header row will not appear.

Three-column parameters, such as base-damage, require an additional "percentage" parameter to be passed. The percentage parameter is named the same as the first one, but with -percentage at the end. For example, base-damage-percentage. The default percentages for most weapons are provided in the example table.

Editing this template

The basic principle is that the template is a MediaWiki table consisting of a series of rows. Each row is wrapped in an #if statement for each parameter name, which says that if a parameter with that name is given, that row appears and the parameter given is inserted into the row's rightmost column as a variable. This means more properties can be added to this template by copy and pasting the #if statement and adjusting the names. When adding properties to this template, also include them in the example table and syntax below.

Rows with percentages have three columns instead of two, so copy and paste from those instead of any two-columned row. Be sure to provide a default percentage instead of leaving it blank. Headers use #ifeq statements instead of #if statements, so when adding a header, copy and paste the header code.

{{!}}, {{!!}}, and {{!-}} are escape templates that represent |, ||, and |-, respectively. Their purpose is to escape those characters in templates that have tables, because MediaWiki syntax does not support a literal | symbol in templates that have tables.

See Wikipedia for more details: https://en.wikipedia.org/wiki/Help:Template#Creating_and_editing_templates

Example Table

The following is an example table with every parameter (currently) supported by the template.

Properties
Shot type Hitscan
Damage type Bullet
Ranged or Melee? Ranged
Taunt Hadouken
Damage
Maximum ramp-up 150% 60
Base damage 100% 40
Charged damage 300% 120
Maximum fall-off 52.8% 21
Critical 120
Critical (charged) 360
Mini-crit 54
Mini-crit (ramp-up) 81
Mini-crit (charged) 162
Flame damage (close) 100% 6.5-13 / tick
Flame damage (far) 50% 3.25-6.5 / tick
Bullet count 1
Spread 80:1
Status Effects
Effect Bleed
Afterburn 4 / tick
Afterburn (mini-crit) 5/ tick
Afterburn duration 4-10 s
Bleed 4 / tick
Bleed (mini-crit) 5 /tick
Bleed duration 8 s
Tranquilize duration 5 s
Splash
Minimum splash 50% 2.8 m
Damage reduction 1% / 2.88
Self-damage 27-89
Self-damage (rocket jump) 27-46
Healing
Healing (in combat) 100% 24 / s
Healing (out of combat) 300% 72 / s
Healing (self) 300
Healing (others) 50% of max health
Beam connect distance 450 HU
Beam disconnect distance 540 HU
Construction
Repair per hit 102
Upgrade per hit 25
Cost per repair damage / 3
Cost per ammo 1 / bullet, 40 / hit
2 / rocket, 16 / hit
Ammo
Loaded 6
Carried 24
Reload type Clip
Function Times
Attack interval 0.5 s
Reload 1.133 s
First reload 1.09 s
Further reloads 0.67 s
Activation time 0.7 s
Spread recovery 1.25 s
Consumption time 4.3 s
Cloak fade 1.0 s
Uncloak fade 1.8 s
Charge fill speed 2.5% / s (1.25% / s)
Charge fill time 40 s (80 s)
Recharge time 12 s
Drop expiry 30 s
Airblast interval 0.75 s
Scoped charge delay 1.3 s
Scoped headshot delay 0.2 s
Aim fatigue 5 s
Taunt duration 3.8 s
All values are approximate.
{{Weapon properties
 | shot-type = Hitscan
 | damage-type = Bullet
 | ranged-type = Ranged
 | taunt = Hadouken
| damage-column = true
 | maximum-ramp-up = 60
 | maximum-ramp-up-percentage = 150%
 | base-damage = 40
 | base-damage-percentage = 100%
 | charged-damage = 120
 | charged-damage-percentage = 300%
 | maximum-fall-off = 21
 | maximum-fall-off-percentage = 52.8%
 | critical = 120
 | critical-charged = 360
 | mini-crit = 54
 | mini-crit-ramp-up = 81
 | mini-crit-charged = 162
 | flame-damage-close = 6.5-13 / tick
 | flame-damage-close-percentage = 100%
 | flame-damage-far = 3.25-6.5 / tick
 | flame-damage-far-percentage = 50%
 | bullet-count = 1
 | spread = 80:1
| status-effects-column = true
 | effect = Bleed
 | afterburn = 4 / tick
 | afterburn-mini-crit = 5/ tick
 | afterburn-duration = 4-10 s
 | bleed = 4 / tick
 | bleed-mini-crit =  5 /tick
 | bleed-duration = 8 s
 | tranquilize-duration = 5 s
| splash-column = true
 | minimum-splash = 2.8 m
 | minimum-splash-percentage = 50%
 | damage-reduction = 1% / 2.88
 | self-damage = 27-89
 | self-damage-rocket-jump = 27-46
| healing-column = true
 | healing-in-combat = 24 / s
 | healing-in-combat-percentage = 100%
 | healing-out-of-combat = 72 / s
 | healing-out-of-combat-percentage = 300%
 | healing-self = 300
 | healing-others = 50% of max health
 | beam-connect-distance = 450 HU
 | beam-disconnect-distance = 540 HU
| construction-column = true
 | repair-per-hit = 102
 | upgrade-per-hit = 25
 | cost-per-repair = damage / 3
 | cost-per-ammo = 1 / bullet, 40 / hit<br>2 / rocket, 16 / hit
| ammo-column = true
 | loaded = 6
 | carried = 24
 | reload-type = Clip
| function-times-column = true
 | attack-interval = 0.5 s
 | reload = 1.133 s
 | first-reload = 1.09 s
 | further-reloads = 0.67 s
 | activation-time = 0.7 s
 | spread-recovery = 1.25 s
 | consumption-time = 4.3 s
 | cloak-fade = 1.0 s
 | uncloak-fade = 1.8 s
 | charge-fill-speed = 2.5% / s (1.25% / s)
 | charge-fill-time = 40 s (80 s)
 | recharge-time = 12 s
 | drop-expiry = 30 s
 | airblast-interval = 0.75 s
 | scoped-charge-delay = 1.3 s
 | scoped-headshot-delay = 0.2 s
 | aim-fatigue = 5 s
 | taunt-duration = 3.8 s
|}}