Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Weapon properties: Difference between revisions

Template page
Ratboy Slim (talk | contribs)
Created page with "{| class="wikitable" ! colspan="3" style="text-align: center;font-size: 20px;background-color: #583a31;color: white;" | Properties |- {{#if:{{{shot-type|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Shot type''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{shot-type}}} {{!-}}}} {{#if:{{{damage-type|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Damage type''' {{!!}} style="background-color: #dee8ed; text-alig..."
 
VivaRomania (talk | contribs)
mNo edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{| class="wikitable"
{| class="wikitable"
! colspan="3" style="text-align: center;font-size: 20px;background-color: #583a31;color: white;" | Properties
! colspan="3" style="text-align: center;font-size: 22px;background-color: #583a31;color: white;" | Properties
|-
|-
{{#if:{{{shot-type|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Shot type''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{shot-type}}}
{{#if:{{{shot-type|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Shot type''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{shot-type}}}
Line 12: Line 12:
{{#ifeq:{{{damage-column|}}} | true |{{!}} colspan="3" style="text-align: center;font-size: 20px;background-color: #583a31;color: white;" {{!}} '''Damage'''
{{#ifeq:{{{damage-column|}}} | true |{{!}} colspan="3" style="text-align: center;font-size: 20px;background-color: #583a31;color: white;" {{!}} '''Damage'''
{{!-}}}}
{{!-}}}}
{{#if:{{{maximum-ramp-up|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Maximum ramp-up''' {{!!}} style="text-align: center;" {{!}} {{{maximum-ramp-up-percentage|150%}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{maximum-ramp-up}}}
{{#if:{{{maximum-ramp-up|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Maximum ramp-up''' {{!!}} style="text-align: center; background-color: white;" {{!}} {{{maximum-ramp-up-percentage}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{maximum-ramp-up}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{base-damage|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Base damage''' {{!!}} style="text-align: center;" {{!}} {{{base-damage-percentage|100%}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{base-damage}}}
{{#if:{{{base-damage|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Base damage''' {{!!}} style="text-align: center; background-color: white;" {{!}} {{{base-damage-percentage}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{base-damage}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{charged-damage|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Charged damage''' {{!!}} style="text-align: center;" {{!}} {{{charged-damage-percentage|300%}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{charged-damage}}}
{{#if:{{{charged-damage|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Charged damage''' {{!!}} style="text-align: center; background-color: white" {{!}} {{{charged-damage-percentage}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{charged-damage}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{maximum-fall-off|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Maximum fall-off''' {{!!}} style="text-align: center;" {{!}} {{{maximum-fall-off-percentage|52.8%}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{maximum-fall-off}}}
{{#if:{{{maximum-fall-off|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Maximum fall-off''' {{!!}} style="text-align: center; background-color: white;" {{!}} {{{maximum-fall-off-percentage}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{maximum-fall-off}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{critical|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Critical''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{critical}}}
{{#if:{{{critical|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Critical''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{critical}}}
Line 30: Line 30:
{{#if:{{{mini-crit-charged|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Mini-crit (charged)''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{mini-crit-charged}}}
{{#if:{{{mini-crit-charged|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Mini-crit (charged)''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{mini-crit-charged}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{flame-damage-close|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Flame damage (close)''' {{!!}} style="text-align: center;" {{!}} {{{flame-damage-close-percentage|100%}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{flame-damage-close}}}
{{#if:{{{flame-damage-close|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Flame damage (close)''' {{!!}} style="text-align: center; background-color: white;" {{!}} {{{flame-damage-close-percentage}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{flame-damage-close}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{flame-damage-far|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Flame damage (far)''' {{!!}} style="text-align: center;" {{!}} {{{flame-damage-far-percentage|50%}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{flame-damage-far}}}
{{#if:{{{flame-damage-far|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Flame damage (far)''' {{!!}} style="text-align: center; background-color: white;" {{!}} {{{flame-damage-far-percentage}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{flame-damage-far}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{bullet-count|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Bullet count''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{bullet-count}}}
{{#if:{{{bullet-count|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Bullet count''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{bullet-count}}}
Line 55: Line 55:
{{!-}}}}
{{!-}}}}
{{#if:{{{bleed-duration|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Bleed duration''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{bleed-duration}}}
{{#if:{{{bleed-duration|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Bleed duration''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{bleed-duration}}}
{{!-}}}}
{{#if:{{{tranquilize-duration|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Tranquilize duration''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{tranquilize-duration}}}
{{!-}}}}
{{!-}}}}
{{#ifeq:{{{splash-column|}}} | true |{{!}} colspan="3" style="text-align: center;font-size: 20px;background-color: #583a31;color: white;" {{!}} '''Splash'''
{{#ifeq:{{{splash-column|}}} | true |{{!}} colspan="3" style="text-align: center;font-size: 20px;background-color: #583a31;color: white;" {{!}} '''Splash'''
{{!-}}}}
{{!-}}}}
{{#if:{{{minimum-splash|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Minimum splash''' {{!!}} style="text-align: center;" {{!}} {{{minimum-splash-percentage|50%}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{minimum-splash}}}
{{#if:{{{minimum-splash|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Minimum splash''' {{!!}} style="text-align: center; background-color: white;" {{!}} {{{minimum-splash-percentage}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{minimum-splash}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{damage-reduction|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Damage reduction''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{damage-reduction}}}
{{#if:{{{damage-reduction|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Damage reduction''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{damage-reduction}}}
Line 68: Line 70:
{{#ifeq:{{{healing-column|}}} | true |{{!}} colspan="3" style="text-align: center;font-size: 20px;background-color: #583a31;color: white;" {{!}} '''Healing'''
{{#ifeq:{{{healing-column|}}} | true |{{!}} colspan="3" style="text-align: center;font-size: 20px;background-color: #583a31;color: white;" {{!}} '''Healing'''
{{!-}}}}
{{!-}}}}
{{#if:{{{healing-in-combat|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Healing (in combat)''' {{!!}} style="text-align: center;" {{!}} {{{healing-in-combat-percentage|100%}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{healing-in-combat}}}
{{#if:{{{healing-in-combat|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Healing (in combat)''' {{!!}} style="text-align: center; background-color: white;" {{!}} {{{healing-in-combat-percentage}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{healing-in-combat}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{healing-out-of-combat|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Healing (out of combat)''' {{!!}} style="text-align: center;" {{!}} {{{healing-out-of-combat-percentage|300%}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{healing-out-of-combat}}}
{{#if:{{{healing-out-of-combat|}}} |{{!}} style="background-color: #f1e9cb" {{!}} '''Healing (out of combat)''' {{!!}} style="text-align: center; background-color: white;" {{!}} {{{healing-out-of-combat-percentage}}} {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{healing-out-of-combat}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{healing-self|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Healing (self)''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{healing-self}}}
{{#if:{{{healing-self|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Healing (self)''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{healing-self}}}
Line 109: Line 111:
{{!-}}}}
{{!-}}}}
{{#if:{{{activation-time|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Activation time''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{activation-time}}}
{{#if:{{{activation-time|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Activation time''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{activation-time}}}
{{!-}}}}
{{#if:{{{windup-time|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Windup time''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{windup-time}}}
{{!-}}}}
{{#if:{{{winddown-time|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Winddown time''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{winddown-time}}}
{{!-}}}}
{{!-}}}}
{{#if:{{{spread-recovery|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Spread recovery''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{spread-recovery}}}
{{#if:{{{spread-recovery|}}} |{{!}} colspan="2" style="background-color: #f1e9cb" {{!}} '''Spread recovery''' {{!!}} style="background-color: #dee8ed; text-align: right" {{!}} {{{spread-recovery}}}
Line 142: Line 148:
This is a template for displaying weapon properties on weapon pages.
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.<br>
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.<br>
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 <code>true</code> if you want them to be displayed. Any other value is silently ignored, and the header row will not appear.<br>
Values for header rows (Damage, Status Effects, Splash, Healing, Construction, Ammo, Function Times) must be {{code|true}} if you want them to be displayed. Any other value is silently ignored, and the header row will not appear.


Parameters with "percentage" in their name have a default percentage coded in the template, in case the editor forgets to manually supply one.<br>
Three-column parameters, such as {{code|base-damage}}, require an additional "percentage" parameter to be passed. The percentage parameter is named the same as the first one, but with {{code|-percentage}} at the end. For example, {{code|base-damage-percentage}}.


=== Editing this template ===
=== 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 {{code|#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 {{code|#if}} statement and adjusting the names. When adding properties to this template, also include them in the example table and syntax below.


The basic principle is that the template is a MediaWiki table consisting of a series of rows. Each row is wrapped in an <code>#if</code> 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 <code>#if</code> 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. Do ''not'' include a default percentage, as this promotes lazy editing and can include inaccurate information. Headers use {{code|#ifeq}} statements instead of <code>#if</code> statements, so when adding a header, copy and paste the header code.


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 <code>#ifeq</code> statements instead of <code>#if</code> statements, so when adding a header, copy and paste the header code.
{{tl|!}}, {{tl|!!}}, and {{tl|!-}} are escape templates that represent {{code|{{!}}}}, {{code|{{!!}}}}, and {{code|{{!}}-}}, respectively. Their purpose is to escape those characters in templates that have tables, because MediaWiki syntax does not support a literal {{code|{{!}}}} symbol in templates that have tables.
 
{{tl|!}}, {{tl|!!}}, and {{tl|!-}} are escape templates that represent <code>|</code>, <code>||</code>, and <code>|-</code>, respectively. Their purpose is to escape those characters in templates that have tables, because MediaWiki syntax does not support a literal <code>|</code> symbol in templates that have tables.


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


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


Line 191: Line 195:
| status-effects-column = true
| status-effects-column = true
  | effect = Bleed
  | effect = Bleed
| effect-duration = 10 s
  | afterburn = 4 / tick
  | afterburn = 4 / tick
  | afterburn-mini-crit = 5/ tick
  | afterburn-mini-crit = 5/ tick
Line 197: Line 202:
  | bleed-mini-crit =  5 /tick
  | bleed-mini-crit =  5 /tick
  | bleed-duration = 8 s
  | bleed-duration = 8 s
| tranquilize-duration = 5 s
| splash-column = true
| splash-column = true
  | minimum-splash = 2.8m
  | minimum-splash = 2.8 m
  | minimum-splash-percentage = 50%
  | minimum-splash-percentage = 50%
  | damage-reduction = 1% / 2.88
  | damage-reduction = 1% / 2.88
Line 222: Line 228:
  | reload-type = Clip
  | reload-type = Clip
| function-times-column = true
| function-times-column = true
  | attack-interval = 0.5s
  | attack-interval = 0.5 s
  | reload = 1.133 s
  | reload = 1.133 s
  | first-reload = 1.09 s
  | first-reload = 1.09 s
  | further-reloads = 0.67 s
  | further-reloads = 0.67 s
  | activation-time = 0.7 s
  | activation-time = 0.7 s
| windup-time = 1 s
| winddown-time = 0.5 s
  | spread-recovery = 1.25 s
  | spread-recovery = 1.25 s
  | consumption-time = 4.3 s
  | consumption-time = 4.3 s
Line 269: Line 277:
| status-effects-column = true
| status-effects-column = true
  | effect = Bleed
  | effect = Bleed
| effect-duration = 10 s
  | afterburn = 4 / tick
  | afterburn = 4 / tick
  | afterburn-mini-crit = 5/ tick
  | afterburn-mini-crit = 5/ tick
Line 275: Line 284:
  | bleed-mini-crit =  5 /tick
  | bleed-mini-crit =  5 /tick
  | bleed-duration = 8 s
  | bleed-duration = 8 s
| tranquilize-duration = 5 s
| splash-column = true
| splash-column = true
  | minimum-splash = 2.8m
  | minimum-splash = 2.8 m
  | minimum-splash-percentage = 50%
  | minimum-splash-percentage = 50%
  | damage-reduction = 1% / 2.88
  | damage-reduction = 1% / 2.88
Line 300: Line 310:
  | reload-type = Clip
  | reload-type = Clip
| function-times-column = true
| function-times-column = true
  | attack-interval = 0.5s
  | attack-interval = 0.5 s
  | reload = 1.133 s
  | reload = 1.133 s
  | first-reload = 1.09 s
  | first-reload = 1.09 s
  | further-reloads = 0.67 s
  | further-reloads = 0.67 s
  | activation-time = 0.7 s
  | activation-time = 0.7 s
| windup-time = 1 s
| winddown-time = 0.5 s
  | spread-recovery = 1.25 s
  | spread-recovery = 1.25 s
  | consumption-time = 4.3 s
  | consumption-time = 4.3 s