Difference between revisions of "Template:Weapon Stats Table/Ranged/Row"
(copy paste from Template:Weapon Quality Table/Ranged. Moving the repetitive stuff in a template) |
(generalized) |
||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly><!-- |
+ | -->{{#vardefine:accuracyQualityFactor | {{#switch: {{{1|}}} | ||
+ | | Awful = 0.8 | ||
+ | | Poor = 0.9 | ||
+ | | Normal = 1 | ||
+ | | Good = 1.1 | ||
+ | | Excellent = 1.2 | ||
+ | | Masterwork = 1.35 | ||
+ | | Legendary = 1.5 | ||
+ | | #default = 1 | ||
+ | }} }}<!-- | ||
+ | -->{{#vardefine:damageQualityFactor | {{#switch: {{{1|}}} | ||
+ | | Awful = 0.9 | ||
+ | | Poor | Normal | Good | Excellent = 1 | ||
+ | | Masterwork = 1.25 | ||
+ | | Legendary = 1.5 | ||
+ | | #default = 1 | ||
+ | }} }} | ||
|- | |- | ||
− | ! style="text-align:right;" | | + | ! style="text-align:right;" | {{{1|}}} {{#var:name}} |
− | | {{#var:damage}} | + | | {{#expr: {{#var:damage}}*{{#var:damageQualityFactor}} round 2}} |
− | | {{#if: {{#var:avgAP}} | {{%|{{#var:avgAP}} round 4}} | -}} | + | | {{#if: {{#var:avgAP}} | {{%|{{#var:avgAP}}*{{#var:damageQualityFactor}} round 4}} | -}} |
{{#if: {{#var:missRadius}} || | {{#if: {{#var:missRadius}} || | ||
− | {{!}} {{#if: {{#var:accTouch}} | {{#ifexpr: {{#var:accTouch}} | + | {{!}} {{#if: {{#var:accTouch}} | {{#ifexpr: {{#var:accTouch}} *{{#var:accuracyQualityFactor}} > 1 | 100% | {{%| {{#var:accTouch}} *{{#var:accuracyQualityFactor}} }} }} | -}} |
− | {{!}} {{#if: {{#var:accShort}} | {{#ifexpr: {{#var:accShort}} | + | {{!}} {{#if: {{#var:accShort}} | {{#ifexpr: {{#var:accShort}} *{{#var:accuracyQualityFactor}} > 1 | 100% | {{%| {{#var:accShort}} *{{#var:accuracyQualityFactor}} }} }} | -}} |
− | {{!}} {{#if: {{#var:accMedium}} | {{#ifexpr: {{#var:accMedium}} > 1 | 100% | {{%| {{#var:accMedium}} }} }} | -}} | + | {{!}} {{#if: {{#var:accMedium}} | {{#ifexpr: {{#var:accMedium}}*{{#var:accuracyQualityFactor}} > 1 | 100% | {{%| {{#var:accMedium}}*{{#var:accuracyQualityFactor}} }} }} | -}} |
− | {{!}} {{#if: {{#var:accLong}} | {{#ifexpr: {{#var:accLong}} | + | {{!}} {{#if: {{#var:accLong}} | {{#ifexpr: {{#var:accLong}} *{{#var:accuracyQualityFactor}} > 1 | 100% | {{%| {{#var:accLong}} *{{#var:accuracyQualityFactor}} }} }} | -}} |
}} | }} | ||
− | | {{#var:avgDPS}} | + | | {{#expr: {{#var:avgDPS}}*{{#var:damageQualityFactor}} round 2}} |
{{#if: {{#var:missRadius}} || | {{#if: {{#var:missRadius}} || | ||
{{#if: {{#var:accTouch}} | | {{#if: {{#var:accTouch}} | | ||
− | {{!}} {{#ifexpr:{{#var:range}}>= 0|{{#ifexpr:{{#var:range}}< 3| | + | {{!}} {{#ifexpr:{{#var:range}}>= 0|<span {{#ifexpr:{{#var:range}} <3|style="color:firebrick; font-weight:bold;"}}>{{#expr: {{#ifexpr: {{#var:accTouch}}*{{#var:accuracyQualityFactor}} > 1 | 1 | {{#expr: {{#var:accTouch}} *{{#var:accuracyQualityFactor}} round 2}} }} * {{#var:avgDPS}}*{{#var:damageQualityFactor}} round 2}}</span>| - }} |
− | {{!}} {{#ifexpr:{{#var:range}}>= 3|{{#ifexpr:{{#var:range}}<12| | + | {{!}} {{#ifexpr:{{#var:range}}>= 3|<span {{#ifexpr:{{#var:range}}<12|style="color:firebrick; font-weight:bold;"}}>{{#expr: {{#ifexpr: {{#var:accShort}}*{{#var:accuracyQualityFactor}} > 1 | 1 | {{#expr: {{#var:accShort}} *{{#var:accuracyQualityFactor}} round 2}} }} * {{#var:avgDPS}}*{{#var:damageQualityFactor}} round 2}}</span>| - }} |
− | {{!}} {{#ifexpr:{{#var:range}}>=12|{{#ifexpr:{{#var:range}}<25| | + | {{!}} {{#ifexpr:{{#var:range}}>=12|<span {{#ifexpr:{{#var:range}}<25|style="color:firebrick; font-weight:bold;"}}>{{#expr: {{#ifexpr: {{#var:accMedium}}*{{#var:accuracyQualityFactor}} > 1 | 1 | {{#expr: {{#var:accMedium}}*{{#var:accuracyQualityFactor}} round 2}} }} * {{#var:avgDPS}}*{{#var:damageQualityFactor}} round 2}}</span>| - }} |
− | {{!}} {{#ifexpr:{{#var:range}}>=25|{{#ifexpr:{{#var:range}}<40| | + | {{!}} {{#ifexpr:{{#var:range}}>=25|<span {{#ifexpr:{{#var:range}}<40|style="color:firebrick; font-weight:bold;"}}>{{#expr: {{#ifexpr: {{#var:accLong}}*{{#var:accuracyQualityFactor}} > 1 | 1 | {{#expr: {{#var:accLong}} *{{#var:accuracyQualityFactor}} round 2}} }} * {{#var:avgDPS}}*{{#var:damageQualityFactor}} round 2}}</span>| - }} |
| {{!!}} - {{!!}} - {{!!}} - {{!!}} - | | {{!!}} - {{!!}} - {{!!}} - {{!!}} - | ||
}} }} | }} }} | ||
− | | {{Market Value Calculator|{{#var:name}}|| | + | | {{Market Value Calculator|{{#var:name}}||{{{1|}}} }} {{Icon Small|silver}}</includeonly><noinclude> |
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 21:36, 17 April 2023
Summary
This template is part of the following system generating tables for all weapons:
- Template:Weapon Stats Table - Usually the template that should be called on normal pages. Creates the headers.
- Template:Weapon Stats Table/Ranged - Creates the table for ranged combat.
- Template:Weapon Stats Table/Ranged/Row - Creates the rows for the ranged combat table.
- Template:Weapon Stats Table/Melee - Creates the table for melee attacks.
- Template:Weapon Stats Table/Melee/Row - Creates the rows for the melee attacks table.
- Template:True Melee DPS Calculator - Does a lot of the calculations and defines essential variables for the /Melee/Row template.
- Template:Weapon Stats Table/Melee/Row - Creates the rows for the melee attacks table.
- Template:Weapon Stats Table/Ranged - Creates the table for ranged combat.
This template relies on a lot of variables defined in Template:Weapon Stats Table/Ranged. If you want to use this template separately, you'll have to define them as well.
Usage
You can call this template simply with:
{{Weapon Stats Table/Ranged/Row}}
Optionally you can give a quality as the first parameter:
{{Weapon Stats Table/Ranged/Row|Legendary}}
Examples
Sniper rifle
A weapon with quality, no AOE, and range greater than long
{{Weapon Stats Table/Ranged|Sniper rifle}}
For the full effects of qualities, see Quality. Values shown in Red indicate the weapon is out of range at the reference point for this range band.
The value is provided due to the interpolated nature of accuracy between range points.
Chain shotgun
A weapon with quality, no AOE, and range below long
{{Weapon Stats Table/Ranged|Chain shotgun}}
For the full effects of qualities, see Quality. Values shown in Red indicate the weapon is out of range at the reference point for this range band.
The value is provided due to the interpolated nature of accuracy between range points.
Incendiary launcher
A weapon with quality and AOE
{{Weapon Stats Table/Ranged|Incendiary launcher}}
For the full effects of qualities, see Quality.
Frag grenades
A weapon with no quality and AOE
{{Weapon Stats Table/Ranged|Frag grenades}}
Charge blaster turret
A weapon with no quality and no AOE
{{Weapon Stats Table/Ranged|Charge blaster turret}}
Values shown in Red indicate the weapon is out of range at the reference point for this range band.
The value is provided due to the interpolated nature of accuracy between range points.
The above documentation is transcluded from Template:Weapon Stats Table/Ranged/Row/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |