Overwatch Wiki
m (Do not show "Details" header if there are no details.)
(Overhaul ability details look)
Line 1: Line 1:
  +
<includeonly>{{anchor|{{{ability_name|}}}}}<!--
<noinclude>A template for creating elements containing all possible information about abilities that can be added to any page, by construction, especially to the Hero Pages. This template currently uses quite a bit of inline css.</noinclude>
 
<includeonly>
 
{{anchor|{{{ability_name|}}}}}<div class="ability_details" style="width:80%; max-width:1000px; min-height:200px; clear:all; overflow:hidden;">
 
{| style="border-collapse: collapse; box-sizing: border-box; width:100%"
 
{{#if: {{{ability_name|}}}{{{ability_type|}}} |
 
{{!}}-style="clear:all; overflow:hidden;"
 
{{!}} colspan="2" style="overflow:hidden; margin-bottom:10px;" {{!}} <h3 class="header1" style="padding:0px; margin:0px;">{{{ability_name}}}</h3>
 
{{!}} colspan="2" align="right" {{!}} <p class="header2">{{{ability_type}}}</p> }}
 
|-
 
! style="border: 1px solid #0198ca; width:100px"| {{lang|en=Icon|zh-hans=图标}}
 
! style="border: 1px solid #0198ca; width:{{{statwidth|300}}}px"| {{lang|en=Stats|zh-hans=数据}}
 
! style="border: 1px solid #0198ca;"| {{lang|en=Official Description|zh-hans=官方描述}}
 
|-
 
| style="border: 1px solid #0198ca;" | {{#if: {{{ability_image|}}} | <div style="float:left;">[[File:{{{ability_image}}}|{{#if: {{{size|}}} | {{{size}}}|100x100px}}]] </div> }}
 
| style="border: 1px solid #0198ca;" |
 
<table class="infoboxtable" style="clear:all; top:0%">
 
{{#if: {{{shot_type|}}} | <tr><td width="45%"><div>{{lang|en=Type|zh-hans=种类}}</div></td> <td>{{{shot_type}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{health|}}} | <tr><td width="45%"><div>{{lang|en=Health|zh-hans=生命值}}</div></td> <td>{{{health}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{damage|}}} | <tr><td width="45%"><div>{{lang|en={{tt|Damage|Single value: No damage falloff based on distance. Two values: Damage at close range and damage at maximum damage falloff.}}|zh-hans={{tt|伤害|一个数据:伤害不会因距离不同而改变。两个数据:伤害随距离变远而减弱}}}}</div></td> <td>{{{damage}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{damage_falloff_range|}}} | <tr><td width="45%"><div>{{lang|en={{tt|Falloff range|Distances at which damage falloff starts, and when it stops.}}|zh-hans={{tt|伤害减弱距离|伤害开始减弱的距离以及何时结束}}}}</div></td> <td>{{{damage_falloff_range}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{spread|}}} | <tr><td width="45%"><div>{{lang|en={{tt|Spread angle|Inaccuracy of the weapon, or angle of area-of-effect abilities (if applicable).}}}}</div></td> <td>{{{spread}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{heal|}}} | <tr><td width="45%"><div>{{lang|en=Healing|zh-hans=治疗量}}</div></td> <td>{{{heal}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{damage_reduction|}}} | <tr><td width="45%"><div>{{lang|en=Dmg. reduction|zh-hans=Dmg. reduction}}</div></td> <td>{{{damage_reduction}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{mspeed|}}} | <tr><td width="45%"><div>{{lang|en=Move. speed|zh-hans=Movement speed}}</div></td> <td>{{{mspeed}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{pspeed|}}} | <tr><td width="45%"><div>{{lang|en=Projectile speed|zh-hans=Projectile speed}}</div></td> <td>{{{pspeed}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{range|}}} | <tr><td width="45%"><div>{{lang|en=Max. range|zh-hans=最大距离}}</div></td> <td>{{{range}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{radius|}}} | <tr><td width="45%"><div>{{lang|en=Area of effect}}</div></td> <td>{{{radius}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{pellets|}}} | <tr><td width="45%"><div>{{lang|en=Num. of pellets|zh-hans=子弹数量}}</div></td> <td>{{{pellets}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{fire_rate|}}} | <tr><td width="45%"><div>{{lang|en=Rate of fire|zh-hans=射速}}</div></td> <td>{{{fire_rate}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{ammo|}}} | <tr><td width="45%"><div>{{lang|en=Ammo|zh-hans=弹药}}</div></td> <td>{{{ammo}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{ammo_drain|}}} | <tr><td width="45%"><div>{{lang|en=Ammo usage|zh-hans=弹药用法}}</div></td> <td>{{{ammo_drain}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{reload_time|}}} | <tr><td width="45%"><div>{{lang|en=Reload time|zh-hans=重装所需时间}}</div></td> <td>{{#replace:{{#replace:{{{reload_time}}}| seconds |{{lang|en=seconds|zh-hans=秒}}}}| second |{{lang|en=second|zh-hans=秒}}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{cast_time|}}} | <tr><td width="45%"><div>{{lang|en={{tt|Casting time|Time after ability use before starting to take effect, or total duration of ability.}}}}</div></td> <td>{{{cast_time}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{duration|}}} | <tr><td width="45%"><div>{{lang|en=Duration|zh-hans=持续时间}}</div></td> <td>{{#replace:{{#replace:{{{duration}}}| seconds |{{lang|en=seconds|zh-hans=秒}}}}| second |{{lang|en=second|zh-hans=秒}}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{cooldown|}}} | <tr><td width="45%"><div>{{lang|en=Cooldown|zh-hans=冷却时间}}</div></td> <td>{{#replace:{{#replace:{{{cooldown}}}| seconds |{{lang|en=seconds|zh-hans=秒}}}}| second |{{lang|en=second|zh-hans=秒}}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{headshot|}}} | <tr><td width="45%"><div>{{lang|en=Headshot|zh-hans=爆头}}</div></td> <td>{{{headshot}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{ult_gain|}}} | <tr><td width="45%"><div>{{lang|en=Ult. charge gain}}</div></td> <td>{{{ult_gain}}}</td> </tr> }}<nowiki/>
 
{{#if: {{{ult_req|}}} | <tr><td width="45%"><div>{{lang|en=Ultimate cost}}</div></td> <td>{{{ult_req}}}</td> </tr> }}<nowiki/>
 
</table>
 
   
  +
These values can be used in the ability_details section to reference a value in the table.
| style="border: 1px solid #0198ca;" |
 
  +
<div style="margin:1em">
 
{{#if: {{{official_description|}}} | ''{{{official_description}}}'' }}
+
-->{{#vardefine:{{{ability_name}}} image|{{{ability_image|}}} }}<!--
 
-->{{#vardefine:{{{ability_name}}} ammo|{{{ammo|}}} }}<!--
</div>
 
  +
-->{{#vardefine:{{{ability_name}}} ammo_drain|{{{ammo_drain|}}} }}<!--
|}
 
{{#if: {{{ability_details|}}}{{{ability_video}}} |
+
-->{{#vardefine:{{{ability_name}}} cooldown|{{{cooldown|}}} }}<!--
  +
-->{{#vardefine:{{{ability_name}}} damage|{{{damage_falloff_range|}}} }}<!--
<div class="mw-collapsible" style="clear:left;">
 
  +
-->{{#vardefine:{{{ability_name}}} spread|{{{spread|}}} }}<!--
{{#if: {{{ability_details|}}}|<p class="header2">{{lang|en=Details|zh-hans=详情}}</p>}}
 
  +
-->{{#vardefine:{{{ability_name}}} heal|{{{heal|}}} }}<!--
<div class="mw-collapsible-content">
 
{{#if: {{{ability_details|}}} | {{{ability_details}}} }}
+
-->{{#vardefine:{{{ability_name}}} damage_reduction|{{{damage_reduction|}}} }}<!--
  +
-->{{#vardefine:{{{ability_name}}} speed|{{{speed|}}} }}<!--
{{#if: {{{ability_video|}}} | <p class="header2">{{lang|en=Video|zh-hans=饰品}}</p>{{#ev:youtube|{{{ability_video}}}}} }}
 
  +
-->{{#vardefine:{{{ability_name}}} cast_time|{{{cast_time|}}} }}<!--
</div></div>}}</div>
 
  +
-->{{#vardefine:{{{ability_name}}} duration|{{{duration|}}} }}<!--
{{#switch: {{{structure|main}}}
 
  +
-->{{#vardefine:{{{ability_name}}} fire_rate|{{{fire_rate|}}} }}<!--
  +
-->{{#vardefine:{{{ability_name}}} health|{{{health|}}} }}<!--
  +
-->{{#vardefine:{{{ability_name}}} pellets|{{{pellets|}}} }}<!--
  +
-->{{#vardefine:{{{ability_name}}} range|{{{range|}}} }}<!--
  +
-->{{#vardefine:{{{ability_name}}} reload_time|{{{reload_time|}}} }}<!--
  +
-->{{#vardefine:{{{ability_name}}} shot_type|{{{shot_type|}}} }}<!--
  +
-->{{#vardefine:{{{name}}} key|{{{key|{{#ifeq:{{{type|}}}|Ultimate|ultimate|{{#ifeq:{{{type|}}}|Weapon|primary fire}} }} }}} }}<!-- Infer ultimate key for ultimates and primary fire for weapons
  +
  +
--><div class="ability_details_main" style="display: flex; flex-wrap: wrap; align-items: flex-start;><!-- Allows notes to be on the side of the infobox if there is space.
  +
--><div class="ability_box" style="width:450px; background-color:#2f4362;"><!--
  +
--><div class="abilityHeader" style="font-weight:bold; font-size:140%; border:1px solid #2f4362; border-bottom: 1px solid white; padding:3px 5px; background:rgba(0,0,0,0.4);"><!--Begin box header
  +
-->{{{ability_name|No Name}}}<!--
  +
--><div style="float:right;"><!--
  +
-->{{#if:{{#var:{{{name}}} key}}|<div class="abilityIcons" style="display:inline-block; margin-left:5px; color:orange; padding-left:0.2em; padding-right:0.25em; text-align:center; background-color:rgba(8,27,43,0.3);">{{Tooltip|{{key|{{#var:{{{name}}} key}}}}|Hotkey}}</div>}}<!--Key
  +
--></div><!--
  +
--></div><!-- End box header
  +
--><div class="summaryInfoAndImage" style="display:inline-block; background:rgba(0,0,0,0.15);"><!--Begin summary info and image
  +
--><div class="abilityImage" style="display:inline-block; margin:5px 5px; width:128px; height:128px;"><!--
  +
-->{{#if:{{{ability_image|}}}|<!--
  +
--><div style="position:absolute;"><!--
  +
-->[[File:hero-ability-circle.svg|128x128px|link=]]<!--
  +
--></div><!--
  +
--><div style="width:100%; height:100%; display:flex; flex-direction:column; justify-content:center;"><!--
  +
-->[[File:{{{ability_image}}}|link=|100x100px|middle|center]]<!--
  +
--></div><!--
  +
-->}}<!--
  +
--><div style="width:128px; text-align:center;"><!--
  +
-->{{#ifeq:{{{ability_type|}}}|Ultimate|{{Tooltip|{{{ult_req|?}}} points|Passively gain 100% in {{#time: i "minutes" s "seconds"| @{{#expr:{{{ult_req|0}}} / 5 round 0}}}}}}}}<!--
  +
-->{{#ifeq:{{{ability_type|Ability}}}|Ability|{{Tooltip|{{{cooldown|?}}}|Ability cooldown}}}}<!--
  +
--></div><!--Show ultimate cost or cooldown
  +
--></div><!--
  +
--><div style="width:312px; display:inline-block; float:right;"><!--Begin summary info
  +
--><div style="padding:5px 5px; font-size:85%; text-align:center; border-bottom:1px solid white;"><!--
  +
--><div style="display:inline-block; width:50%; vertical-align:top;">'''<u>Type</u>'''<!--
  +
--><div style="display:block; padding-top:5px;">{{{ability_type|Ability}}}</div><!--
  +
--></div><!--
  +
--><div style="display:inline-block; width:50%; vertical-align:top;">'''<u>Type</u>'''<!--
  +
--><div style="display:block; padding-top:5px;">{{{shot_type|}}}</div><!--
  +
--></div><!--
  +
--></div><!--
  +
--><div style="vertical-align:top; font-size:85%;"><!--
  +
-->'' {{{official_description|}}} ''<!--
  +
--></div><!--
  +
--></div><!--End summary info
  +
--></div><!--End summary info and icon
  +
--><div style="padding:5px;"><!-- START main content
 
-->{{#if:{{{health|}}}|{{Ability details/Data row|name={{lang|en=Health|zh-hans=生命值}}|value={{{health}}} }} }}<!--
 
-->{{#if:{{{damage|}}}|{{Ability details/Data row|name={{lang|en={{tt|Damage|Single value: No damage falloff based on distance. Two values: Damage at close range and damage at maximum damage falloff.}}|zh-hans={{tt|伤害|一个数据:伤害不会因距离不同而改变。两个数据:伤害随距离变远而减弱}}}}|value={{{damage}}} }} }}<!--
 
-->{{#if:{{{damage_falloff_range|}}}|{{Ability details/Data row|name={{lang|en={{tt|Falloff range|Distances at which damage falloff starts, and when it stops.}}|zh-hans={{tt|伤害减弱距离|伤害开始减弱的距离以及何时结束}}}}|value={{{damage_falloff_range}}} }} }}<!--
 
-->{{#if:{{{spread|}}}|{{Ability details/Data row|name={{lang|en={{tt|Spread angle|Inaccuracy of the weapon, or angle of area-of-effect abilities (if applicable).}}}}|value={{{spread}}} }} }}<!--
 
-->{{#if:{{{heal|}}}|{{Ability details/Data row|name={{lang|en=Healing|zh-hans=治疗量}}|value={{{heal}}} }} }}<!--
 
-->{{#if:{{{damage_reduction|}}}|{{Ability details/Data row|name={{lang|en=Dmg. reduction|zh-hans=Dmg. reduction}}|value={{{damage_reduction}}} }} }}<!--
 
-->{{#if:{{{mspeed|}}}|{{Ability details/Data row|name={{lang|en=Move. speed|zh-hans=Movement speed}}|value={{{mspeed}}} }} }}<!--
 
-->{{#if:{{{pspeed|}}}|{{Ability details/Data row|name={{lang|en=Projectile speed|zh-hans=Projectile speed}}|value={{{pspeed}}} }} }}<!--
 
-->{{#if:{{{range|}}}|{{Ability details/Data row|name={{lang|en=Max. range|zh-hans=最大距离}}|value={{{range}}} }} }}<!--
 
-->{{#if:{{{radius|}}}|{{Ability details/Data row|name={{lang|en=Area of effect}}|value={{{radius}}} }} }}<!--
 
-->{{#if:{{{pellets|}}}|{{Ability details/Data row|name={{lang|en=Num. of pellets|zh-hans=子弹数量}}|value={{{pellets}}} }} }}<!--
 
-->{{#if:{{{fire_rate|}}}|{{Ability details/Data row|name={{lang|en=Rate of fire|zh-hans=射速}}|value={{{fire_rate}}} }} }}<!--
 
-->{{#if:{{{ammo|}}}|{{Ability details/Data row|name={{lang|en=Ammo|zh-hans=弹药}}|value={{{ammo}}} }} }}<!--
 
-->{{#if:{{{ammo_drain|}}}|{{Ability details/Data row|name={{lang|en=Ammo usage|zh-hans=弹药用法}}|value={{{ammo_drain}}} }} }}<!--
 
-->{{#if:{{{reload_time|}}}|{{Ability details/Data row|name={{lang|en=Reload time|zh-hans=重装所需时间}}|value={{#replace:{{#replace:{{{reload_time}}}| seconds |{{lang|en=seconds|zh-hans=秒}}}}| second |{{lang|en=second|zh-hans=秒}}}} }} }}<!--
 
-->{{#if:{{{cast_time|}}}|{{Ability details/Data row|name={{lang|en={{tt|Casting time|Time after ability use before starting to take effect, or total duration of ability.}}}}|value={{{cast_time}}} }} }}<!--
 
-->{{#if:{{{duration|}}}|{{Ability details/Data row|name={{lang|en=Duration|zh-hans=持续时间}}|value={{#replace:{{#replace:{{{duration}}}| seconds |{{lang|en=seconds|zh-hans=秒}}}}| second |{{lang|en=second|zh-hans=秒}} }} }} }}<!--
 
-->{{#if:{{{cooldown|}}}|{{Ability details/Data row|name={{lang|en=Cooldown|zh-hans=冷却时间}}|value={{#replace:{{#replace:{{{cooldown}}}| seconds |{{lang|en=seconds|zh-hans=秒}}}}| second |{{lang|en=second|zh-hans=秒}} }} }} }}<!--
 
-->{{#if:{{{headshot|}}}|{{Ability details/Data row|name={{lang|en=Headshot|zh-hans=爆头}}|value={{{headshot}}} }} }}<!--
 
-->{{#if:{{{ult_gain|}}}|{{Ability details/Data row|name={{lang|en=Ult. charge gain}}|value={{{ult_gain}}} }} }}<!--
 
-->{{#if:{{{ult_req|}}}|{{Ability details/Data row|name={{lang|en=Ultimate cost}}|value={{{ult_req}}} }} }}<!--
  +
--></div><!--END main content
 
--></div><!--
  +
-->{{#if:{{{notes|}}}|<!--
 
--><div style="padding:15px;"><!--
 
-->''{{lang|en=Details|zh-hans=详情}}:''
  +
{{{ability_details}}}<!--
  +
--></div><!--
  +
-->{{#if:{{{ability_video|}}}|<!--
 
--><div class="mw-collapsible"><!--
 
-->{{lang|en=Video|zh-hans=饰品}}<br> {{#ev:youtube|{{{ability_video}}} }} }}<!--
  +
--></div><!--
  +
-->}}<!--
  +
--></div><!--
  +
--></div><!-- End All
  +
--></div><!-- End All
 
-->{{#switch: {{{structure|main}}}
 
|main=
 
|main=
 
{{if lang
 
{{if lang
Line 88: Line 133:
 
|wrapper=
 
|wrapper=
 
|hidden=
 
|hidden=
}}</includeonly>
+
}}</includeonly><noinclude>
 
A template for creating elements containing all possible information about abilities that can be added to any page, by construction, especially to the Hero Pages. This template currently uses quite a bit of inline css.
<noinclude>
 
   
 
== Arguments and Guidelines ==
 
== Arguments and Guidelines ==

Revision as of 22:32, 6 May 2020

A template for creating elements containing all possible information about abilities that can be added to any page, by construction, especially to the Hero Pages. This template currently uses quite a bit of inline css.

Arguments and Guidelines

Fields are to be used when needed. Only fill in those that are relevant for the ability in question. Remember to write units in fields where the unit may not be obvious. Because of the multitude of abilities in the game, you may have to get a little creative using the existing fields and always remember to keep clarity and readability a top priority. New stat fields can be added to this template if needed, but it may in many cases be better to use existing fields.

Field Description
ability_details Detailed ability information that is not contained in the official description or statistics.
ability_image The ability-image representing the ability or weapon. Ex: Ability-torbjorn1.png.
ability_name The name of the ability or weapon. If a weapon as alternative firing modes, add (Primary Fire) or (Alternative Fire) to the weapon name.
ability_type Weapon, Ability, Ultimate Ability, Passive Ability, etc.
ability_video A concise video demonstrating the ability. The value should be the youtube video url code. That is, something like: KBkfGVjdt3c.
ammo How much ammo can be spent before reloading.
ammo_drain How much ammo is drained per shot. Only use if fire rate is not given "per second" and more than 1 ammo is used per shot. Unit: ammo per shot.
cooldown Time from ability going on cooldown to when it can be used again. Unit: seconds.
damage The damage of the weapon or ability. Units: per shot, per second, per pellet.
damage_falloff_range If weapon or ability has damage falloff this is a distance range representing the distances at which the damage is still the same as point blank and when it will not drop down further. Unit: meters
spread Inaccuracy of the weapon, or angle of area-of-effect abilities. If not specified, weapon/ability has perfect accuracy, or for area-of-effect abilities, 360 degrees angle. Units: degrees.
heal Health restored by the ability. Units: per cast, per second.
damage_reduction How much damage reduction an ability grants.
speed General purpose speed field. Recommended usage: For abilities that boosts hero speed, themselves move (a moving turret of some kind), or if their projectile speed is of major importance to the ability.
cast_time Time after ability use/trigger before starting to take effect, or total animation duration of ability, in seconds.
duration For how long the ability is active or the weapon is equipped. Unit: seconds.
fire_rate How many shots per second the weapon or ability fires. Not applicable if damage is given per second. Unit: shots per second.
headshot Whether or not the weapon or ability will headshot if aimed at a characters weak spot. If yes or no is applicable, use ✓ or ✕.
health The hit points of an ability.
official_description The ability description that can be read in-game.
pellets How many pellets are fired per shot. Applicable if of shotgun-type. Units: per shot
range The maximum range of an ability or weapon. Applicable especially if the projectile disappears after a certain distance.
reload_time Time needed to reload. Unit: seconds.
shot_type The "projectile" type. Melee, Hit-Scan, Beam, Projectile, etc.

Empty Template

{{Ability_details
| ability_name = Shell spin
| ability_image = 
| official_description = Terrapin spins around knocking out enemies that come into contact
| ability_type = 
| health =
| shot_type = 
| damage = 60
| damage_falloff_range = 
| spread =
| pspeed = 
| heal =
| damage_reduction =
| mspeed =
| range = 75m
| radius =
| pellets =
| fire_rate = 
| ammo = 
| ammo_drain =
| reload_time = 
| cast_time =
| cooldown = 6s
| duration = 3s
| headshot = <!-- ✓/✕ -->
| ability_video = 
| ability_details = 
}}

Example

{{Ability_details
| ability_name = Shell shooters
| ability_image = 
| official description = Auto machine cannons
| ability_type = Weapon (Primary Fire)
| shot_type = Projectile <!-- Hit-Scan, 
| pellets = 
| damage = 10 damage per shot
| fire_rate = 5 rounds per second
| ammo = 90 rounds
| ammo_drain =
| reload_time = 1 seconds
| cooldown = 
| duration =
| headshot = ✓ <!-- ✓/✕ -->
| ability_details = .
| ability_video = 
}}

Result of Example

Shell shooters
Type
Weapon (Primary Fire)
Type
Projectile
Auto machine cannons
Damage:
10 damage per shot
Rate of fire:
5 rounds per second
Ammo:
90 rounds
Reload time:
1 seconds
Headshot:

This template defines the table "Abilities". View table. A replacement table has been generated for this table; View replacement table.