Difference between revisions of "Template:Weapon Iterated DPS Chart Segment"

From RimWorld Wiki
Jump to navigation Jump to search
(Created page with "{{#vardefine: currentRange | {{{1|}}} }} {{#ifexpr: {{#var:currentRange}} > 3 | {{#vardefine: lowerRangeBracket | 3 }} {{#vardefine: lowerRangeBracketAccuracy | {{#expr:{{Q...")
 
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#vardefine: currentRange |  {{{1|}}} }}
+
<includeonly>{{#vardefine: currentRange |  {{{1|}}} }}
 
 
 
{{#ifexpr: {{#var:currentRange}} > 3 |
 
{{#ifexpr: {{#var:currentRange}} > 3 |
 
{{#vardefine: lowerRangeBracket |  3 }}
 
{{#vardefine: lowerRangeBracket |  3 }}
{{#vardefine: lowerRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Touch) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: lowerRangeBracketAccuracy | {{#var: accuracyTouch}} }}
{{#vardefine: upperRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Short) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: upperRangeBracketAccuracy | {{#var: accuracyShort}} }}
{{#vardefine: upperRangeBracket |  12 }}
+
{{#vardefine: upperRangeBracket |  12 }} }}
}}
 
 
{{#ifexpr: {{#var:currentRange}} = 12 |
 
{{#ifexpr: {{#var:currentRange}} = 12 |
 
{{#vardefine: lowerRangeBracket |  11 }}
 
{{#vardefine: lowerRangeBracket |  11 }}
{{#vardefine: lowerRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Short) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: lowerRangeBracketAccuracy | {{#var: accuracyShort}} }}
{{#vardefine: upperRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Short) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: upperRangeBracketAccuracy | {{#var: accuracyShort}} }}
{{#vardefine: upperRangeBracket |  12 }}
+
{{#vardefine: upperRangeBracket |  12 }} }}
}}
 
 
{{#ifexpr: {{#var:currentRange}} > 12 |
 
{{#ifexpr: {{#var:currentRange}} > 12 |
 
{{#vardefine: lowerRangeBracket |  12 }}
 
{{#vardefine: lowerRangeBracket |  12 }}
{{#vardefine: lowerRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Short) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: lowerRangeBracketAccuracy | {{#var: accuracyShort}} }}
{{#vardefine: upperRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Medium) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: upperRangeBracketAccuracy | {{#var: accuracyMedium}} }}
{{#vardefine: upperRangeBracket |  25 }}
+
{{#vardefine: upperRangeBracket |  25 }}}}
}}
 
 
{{#ifexpr: {{#var:currentRange}} = 25 |
 
{{#ifexpr: {{#var:currentRange}} = 25 |
 
{{#vardefine: lowerRangeBracket |  24 }}
 
{{#vardefine: lowerRangeBracket |  24 }}
{{#vardefine: lowerRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Medium) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: lowerRangeBracketAccuracy | {{#var: accuracyMedium}} }}
{{#vardefine: upperRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Medium) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: upperRangeBracketAccuracy | {{#var: accuracyMedium}} }}
{{#vardefine: upperRangeBracket |  25 }}
+
{{#vardefine: upperRangeBracket |  25 }} }}
}}
 
 
{{#ifexpr: {{#var:currentRange}} > 25 |
 
{{#ifexpr: {{#var:currentRange}} > 25 |
 
{{#vardefine: lowerRangeBracket |  25 }}
 
{{#vardefine: lowerRangeBracket |  25 }}
{{#vardefine: lowerRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Medium) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: lowerRangeBracketAccuracy | {{#var: accuracyMedium}} }}
{{#vardefine: upperRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Long) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: upperRangeBracketAccuracy | {{#var: accuracyLong}} }}
{{#vardefine: upperRangeBracket |  40 }}
+
{{#vardefine: upperRangeBracket |  40 }} }}
}}
 
 
{{#ifexpr: {{#var:currentRange}} = 40 |
 
{{#ifexpr: {{#var:currentRange}} = 40 |
 
{{#vardefine: lowerRangeBracket |  39 }}
 
{{#vardefine: lowerRangeBracket |  39 }}
{{#vardefine: lowerRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Long) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: lowerRangeBracketAccuracy | {{#var: accuracyLong}} }}
{{#vardefine: upperRangeBracketAccuracy | {{#expr:{{Q|{{#var: name}}|Accuracy (Long) Base}}*{{#var:rangedAccuracyFactor}}/100 }} }}
+
{{#vardefine: upperRangeBracketAccuracy | {{#var: accuracyLong}} }}
{{#vardefine: upperRangeBracket | 40 }}
+
{{#vardefine: upperRangeBracket |  40 }} }}
}}
+
{{#ifexpr: floor({{#show:{{#var:name}}|?Minimum Range|default=0}}) < {{#var:currentRange}} |
 
 
 
{{#vardefine: XAxisString | {{#var: XAxisString}}, {{#var:currentRange}}}}
 
{{#vardefine: XAxisString | {{#var: XAxisString}}, {{#var:currentRange}}}}
{{#vardefine: YAxisString | {{#var: YAxisString}}, {{#expr: {{#var: skillFactor}}^{{#var:currentRange}} * (({{#var:upperRangeBracket}}-{{#var:currentRange}})*{{#var: lowerRangeBracketAccuracy}} + ({{#var:currentRange}}-{{#var:lowerRangeBracket}})*{{#var: upperRangeBracketAccuracy}})*{{#var:DPS}}/({{#var:upperRangeBracket}}-{{#var:lowerRangeBracket}}) }} }}
+
{{#vardefine: YAxisString | {{#var: YAxisString}}, {{#expr: {{#var: skillFactor}}^{{#var:currentRange}} * (({{#var:upperRangeBracket}}-{{#var:currentRange}})*{{#var: lowerRangeBracketAccuracy}} + ({{#var:currentRange}}-{{#var:lowerRangeBracket}})*{{#var: upperRangeBracketAccuracy}})*{{#var:DPS}}/({{#var:upperRangeBracket}}-{{#var:lowerRangeBracket}}) }} }} }}</includeonly><noinclude>
 +
{{Documentation wanted}}
 +
{{Documentation}}
 +
{{Weapon Iterated DPS Chart|Uranium slug turret}}
 +
[[Category:Math templates]]
 +
</noinclude>

Latest revision as of 01:52, 10 August 2024


Documentation icon Template documentation[create]