Difference between revisions of "Template:Weapon Stats Table/Ranged/Row"

From RimWorld Wiki
Jump to navigation Jump to search
(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;" | Normal {{#var:name}}
+
! 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}} > 1 | 100% | {{%| {{#var:accTouch}} }} }} | -}}
+
   {{!}} {{#if: {{#var:accTouch}}  | {{#ifexpr: {{#var:accTouch}} *{{#var:accuracyQualityFactor}} > 1 | 100% | {{%| {{#var:accTouch}} *{{#var:accuracyQualityFactor}} }} }} | -}}
   {{!}} {{#if: {{#var:accShort}}  | {{#ifexpr: {{#var:accShort}} > 1 | 100% | {{%| {{#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}}   > 1 | 100% | {{%| {{#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|<span style="color:firebrick; font-weight:bold>|<span>}}{{#expr: {{#ifexpr: {{#var:accTouch}}  > 1 | 1 | {{#var:accTouch}} }} * {{#var:avgDPS}} round 2}}</span>| - }}
+
     {{!}} {{#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|<span style="color:firebrick; font-weight:bold>|<span>}}{{#expr: {{#ifexpr: {{#var:accShort}}  > 1 | 1 | {{#var:accShort}} }} * {{#var:avgDPS}} round 2}}</span>| - }}
+
     {{!}} {{#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|<span style="color:firebrick; font-weight:bold>|<span>}}{{#expr: {{#ifexpr: {{#var:accMedium}} > 1 | 1 | {{#var:accMedium}} }} * {{#var:avgDPS}} round 2}}</span>| - }}
+
     {{!}} {{#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|<span style="color:firebrick; font-weight:bold>|<span>}}{{#expr: {{#ifexpr: {{#var:accLong}}  > 1 | 1 | {{#var:accLong}}   }} * {{#var:avgDPS}} round 2}}</span>| - }}
+
     {{!}} {{#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}}||Normal}} {{Icon Small|silver}}</includeonly><noinclude>
+
| {{Market Value Calculator|{{#var:name}}||{{{1|}}} }} {{Icon Small|silver}}</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 21:36, 17 April 2023

Documentation icon Template documentation[view] [edit] [history] [purge]

Summary

This template is part of the following system generating tables for all weapons:

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}}
  • Sniper rifle Sniper rifle Accuracy
    (Touch)
    Accuracy
    (Short)
    Accuracy
    (Medium)
    Accuracy
    (Long)
    DPS
    (Optimal)
    DPS
    (Touch)
    DPS
    (Short)
    DPS
    (Medium)
    DPS
    (Long)
    Market
    value
    Quality Dam. AP
    Awful Sniper rifle 22.5 34.2% 40% 56% 68.8% 70.4% 3.88 1.55 2.17 2.68 2.72 265 Silver
    Poor Sniper rifle 25 38% 45% 63% 77.4% 79.2% 4.31 1.94 2.72 3.32 3.4 395 Silver
    Normal Sniper rifle 25 38% 50% 70% 86% 88% 4.31 2.16 3.02 3.71 3.79 530 Silver
    Good Sniper rifle 25 38% 55% 77% 94.6% 96.8% 4.31 2.37 3.32 4.09 4.18 660 Silver
    Excellent Sniper rifle 25 38% 60% 84% 100% 100% 4.31 2.59 3.62 4.31 4.31 795 Silver
    Masterwork Sniper rifle 31.25 47.5% 67.5% 94.5% 100% 100% 5.39 3.66 5.12 5.39 5.39 1325 Silver
    Legendary Sniper rifle 37.5 57% 75% 100% 100% 100% 6.47 4.85 6.47 6.47 6.47 2650 Silver

    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}}
  • Chain shotgun Chain shotgun Accuracy
    (Touch)
    Accuracy
    (Short)
    Accuracy
    (Medium)
    Accuracy
    (Long)
    DPS
    (Optimal)
    DPS
    (Touch)
    DPS
    (Short)
    DPS
    (Medium)
    DPS
    (Long)
    Market
    value
    Quality Dam. AP
    Awful Chain shotgun 16.2 12.6% 45.6% 51.2% 44% 36% 16.86 7.75 8.6 7.42 - 200 Silver
    Poor Chain shotgun 18 14% 51.3% 57.6% 49.5% 40.5% 18.73 9.55 10.86 9.37 - 305 Silver
    Normal Chain shotgun 18 14% 57% 64% 55% 45% 18.73 10.68 11.99 10.3 - 405 Silver
    Good Chain shotgun 18 14% 62.7% 70.4% 60.5% 49.5% 18.73 11.8 13.11 11.43 - 505 Silver
    Excellent Chain shotgun 18 14% 68.4% 76.8% 66% 54% 18.73 12.74 14.42 12.36 - 605 Silver
    Masterwork Chain shotgun 22.5 17.5% 76.95% 86.4% 74.25% 60.75% 23.41 18.03 20.13 17.33 - 1010 Silver
    Legendary Chain shotgun 27 21% 85.5% 96% 82.5% 67.5% 28.1 24.16 26.97 23.32 - 2025 Silver

    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}}
  • Incendiary launcher Incendiary launcher DPS
    (Optimal)
    Market
    value
    Quality Dam. AP
    Awful Incendiary launcher 9 0% 1.29 170 Silver
    Poor Incendiary launcher 10 0% 1.43 255 Silver
    Normal Incendiary launcher 10 0% 1.43 340 Silver
    Good Incendiary launcher 10 0% 1.43 425 Silver
    Excellent Incendiary launcher 10 0% 1.43 510 Silver
    Masterwork Incendiary launcher 12.5 0% 1.79 850 Silver
    Legendary Incendiary launcher 15 0% 2.15 1700 Silver

    For the full effects of qualities, see Quality.

  • Frag grenades


    A weapon with no quality and AOE

    {{Weapon Stats Table/Ranged|Frag grenades}}
  • Frag grenades
    Frag grenades
    Dam. AP DPS
    (Optimal)
    Market
    value
    Frag grenades 50 10% 12 265 Silver

  • Charge blaster turret


    A weapon with no quality and no AOE

    {{Weapon Stats Table/Ranged|Charge blaster turret}}
  • Charge blaster turret
    Charge blaster turret
    Dam. AP Accuracy
    (Touch)
    Accuracy
    (Short)
    Accuracy
    (Medium)
    Accuracy
    (Long)
    DPS
    (Optimal)
    DPS
    (Touch)
    DPS
    (Short)
    DPS
    (Medium)
    DPS
    (Long)
    Market
    value
    Charge blaster turret 15 22.5% 60% 80% 90% 85% 6 3.6 4.8 5.4 5.1 0 Silver

    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.