Difference between revisions of "Template:Weapon DPS Iterator"

From RimWorld Wiki
Jump to navigation Jump to search
Line 16: Line 16:
 
-->{{#vardefine: upperRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Touch) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}<!--
 
-->{{#vardefine: upperRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Touch) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}<!--
 
-->{{#vardefine: upperRangeBracket |  3 }}<!--
 
-->{{#vardefine: upperRangeBracket |  3 }}<!--
-->{{#vardefine: XAxisString | 0}}<!--
+
-->{{#vardefine: XAxisString | 2}}<!--
 
-->{{#vardefine: YAxisString |  {{#expr:{{#var:lowerRangeBracketAccuracy}}*{{#var:DPS}} }} }}<!--
 
-->{{#vardefine: YAxisString |  {{#expr:{{#var:lowerRangeBracketAccuracy}}*{{#var:DPS}} }} }}<!--
-->{{#ifexpr: {{#var:range}} >=  1| {{Weapon Iterated DPS Chart Segment|1}} }}<!--
 
-->{{#ifexpr: {{#var:range}} >=  2| {{Weapon Iterated DPS Chart Segment|2}} }}<!--
 
 
-->{{#ifexpr: {{#var:range}} >=  3| {{Weapon Iterated DPS Chart Segment|3}} }}<!--
 
-->{{#ifexpr: {{#var:range}} >=  3| {{Weapon Iterated DPS Chart Segment|3}} }}<!--
 
-->{{#ifexpr: {{#var:range}} >=  4| {{Weapon Iterated DPS Chart Segment|4}} }}<!--
 
-->{{#ifexpr: {{#var:range}} >=  4| {{Weapon Iterated DPS Chart Segment|4}} }}<!--

Revision as of 11:52, 6 February 2021

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

Summary

Returns a string of the DPS values of a weapon at each range seperated by commas, optionally modified by Quality and Shooting Accuracy. It is intended to be used to display the information using Template:Graph:Chart

This template is dependent on Template: Weapon Iterated DPS Chart Segment

Usage

Without parameters, the template will return the values for the current PAGENAME, assuming normal quality. For example, if the following was used on the assault rifle page:

{{Weapon DPS Iterator}}

it would produce:

The first parameter, if present, allows the weapon to be chosen if it is not used on the page of the weapon in question. The template will return the values for the chosen weapon, assuming normal quality. For example, if the following was used on any page:

{{Weapon DPS Iterator|Sniper rifle}}

it would produce:

The second parameter, if present, allows the quality of the weapon to be chosen. It can be used with or without first parameter. The template will will return the values for the chosen weapon and quality. For example, if the following was used on the minigun page

{{Weapon DPS Iterator||Legendary}}

it would produce:

The third parameter, if present, allows the Shooting Accuracy of the shooter to be chosen, expressed as a value from 0 to 1. It can be used with or without first and second parameter. The template will will return the values for the chosen weapon, quality and shooting accuracy. For example, if the following was used on the Charge rifle page

{{Weapon DPS Iterator|||0.95}}

it would produce: