Difference between revisions of "Template:True Melee DPS Calculator"

From RimWorld Wiki
Jump to navigation Jump to search
Line 37: Line 37:
 
{{#vardefine: numMidAttacks | 0}}
 
{{#vardefine: numMidAttacks | 0}}
  
{{Q|{{#var:name}}|Attack 1 Part}} = {{#ifexpr: {{#var: attack1InitialSelectionWeight}} > (0.95*{{#var: maxSelectionWeight}}) or {{#var: attack1InitialSelectionWeight}} = (0.95*{{#var: maxSelectionWeight}}) | Best |  
+
{{Q|{{#var:name}}|Attack 1 Part}} = {{#ifexpr: {{#var: attack1InitialSelectionWeight}} > (0.95*{{#var: maxSelectionWeight}}) or {{#var: attack1InitialSelectionWeight}} = (0.95*{{#var: maxSelectionWeight}}) | Best {{#vardefine: numBestAttacks | {{#expr: {{#var: numBestAttacks}}+1}}}} {{#vardefine: attack1SelectionCategory | best }}|  
{{#ifexpr: {{#var: attack1InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
+
{{#ifexpr: {{#var: attack1InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid {{#vardefine: numMidAttacks | {{#expr: {{#var: numMidAttacks}}+1}}}} {{#vardefine: attack1SelectionCategory | mid }}}}
}}
+
}} {{#var:attack1SelectionCategory}}
  
{{Q|{{#var:name}}|Attack 2 Part}} = {{#ifexpr: {{#var: attack2InitialSelectionWeight}} > (0.95*{{#var: maxSelectionWeight}}) or {{#var: attack2InitialSelectionWeight}} = (0.95*{{#var: maxSelectionWeight}}) | Best |  
+
{{Q|{{#var:name}}|Attack 2 Part}} = {{#ifexpr: {{#var: attack2InitialSelectionWeight}} > (0.95*{{#var: maxSelectionWeight}}) or {{#var: attack2InitialSelectionWeight}} = (0.95*{{#var: maxSelectionWeight}}) | Best {{#vardefine: numBestAttacks | {{#expr: {{#var: numBestAttacks}}+1}}}} {{#vardefine: attack2SelectionCategory | best }}|  
{{#ifexpr: {{#var: attack2InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
+
{{#ifexpr: {{#var: attack2InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid {{#vardefine: numMidAttacks | {{#expr: {{#var: numMidAttacks}}+1}}}} {{#vardefine: attack2SelectionCategory | mid }}}}
}}
+
}} {{#var:attack2SelectionCategory}}
  
{{Q|{{#var:name}}|Attack 3 Part}} = {{#ifexpr: {{#var: attack3InitialSelectionWeight}} > (0.95*{{#var: maxSelectionWeight}}) or {{#var: attack3InitialSelectionWeight}} = (0.95*{{#var: maxSelectionWeight}}) | Best |  
+
{{Q|{{#var:name}}|Attack 3 Part}} = {{#ifexpr: {{#var: attack3InitialSelectionWeight}} > (0.95*{{#var: maxSelectionWeight}}) or {{#var: attack3InitialSelectionWeight}} = (0.95*{{#var: maxSelectionWeight}}) | Best {{#vardefine: numBestAttacks | {{#expr: {{#var: numBestAttacks}}+1}}}} {{#vardefine: attack3SelectionCategory | best }}|  
{{#ifexpr: {{#var: attack3InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
+
{{#ifexpr: {{#var: attack3InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid {{#vardefine: numMidAttacks | {{#expr: {{#var: numMidAttacks}}+1}}}} {{#vardefine: attack3SelectionCategory | mid }}}}
}}
+
}} {{#var:attack3SelectionCategory}}
  
{{Q|{{#var:name}}|Attack 4 Part}} = {{#ifexpr: {{#var: attack4InitialSelectionWeight}} > (0.95*{{#var: maxSelectionWeight}}) or {{#var: attack4InitialSelectionWeight}} = (0.95*{{#var: maxSelectionWeight}}) | Best |  
+
{{Q|{{#var:name}}|Attack 4 Part}} = {{#ifexpr: {{#var: attack4InitialSelectionWeight}} > (0.95*{{#var: maxSelectionWeight}}) or {{#var: attack4InitialSelectionWeight}} = (0.95*{{#var: maxSelectionWeight}}) | Best {{#vardefine: numBestAttacks | {{#expr: {{#var: numBestAttacks}}+1}}}} {{#vardefine: attack4SelectionCategory | best }}|  
{{#ifexpr: {{#var: attack4InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
+
{{#ifexpr: {{#var: attack4InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid {{#vardefine: numMidAttacks | {{#expr: {{#var: numMidAttacks}}+1}}}} {{#vardefine: attack4SelectionCategory | mid }}}}
}}
+
}}  {{#var:attack4SelectionCategory}}
  
  
True DPS =
+
 
 +
<!--Sometimes there is no mid category, in which case it controls 100% of the selection chance, instead of only 75% -->
 +
{{#ifeq: {{#var: numMidAttacks}} | 0 | {{#vardefine:bestCategoryPercentage|1.00}} | {{#vardefine:bestCategoryPercentage|0.75}}}}
 +
 
 +
True DPS =  
 +
 
 +
({{Q|{{#var:name}}|Attack 1 Damage}}/{{Q|{{#var:name}}|Attack 1 Cooldown}} * {{#ifeq: {{#var:attack1SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var: numBestAttacks}}) | {{#ifeq: {{#var:attack1SelectionCategory}} | mid | (0.25/{{#var: numMidAttacks}}) | 0}} }})+
 +
 
 +
({{Q|{{#var:name}}|Attack 2 Damage}}/{{Q|{{#var:name}}|Attack 2 Cooldown}} * {{#ifeq: {{#var:attack2SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var: numBestAttacks}}) | {{#ifeq: {{#var:attack2SelectionCategory}} | mid | (0.25/{{#var: numMidAttacks}}) | 0}} }})+
 +
 
 +
({{Q|{{#var:name}}|Attack 3 Damage}}/{{Q|{{#var:name}}|Attack 3 Cooldown}} * {{#ifeq: {{#var:attack3SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var: numBestAttacks}}) | {{#ifeq: {{#var:attack3SelectionCategory}} | mid | (0.25/{{#var: numMidAttacks}}) | 0}} }}) +
 +
 
 +
({{Q|{{#var:name}}|Attack 4 Damage}}/{{Q|{{#var:name}}|Attack 4 Cooldown}} * {{#ifeq: {{#var:attack4SelectionCategory}} | best | ({{#var:bestCategoryPercentage}}/{{#var: numBestAttacks}}) | {{#ifeq: {{#var:attack4SelectionCategory}} | mid | (0.25/{{#var: numMidAttacks}}) | 0}} }})

Revision as of 05:37, 17 September 2021








13.7

56.4

56.4

Expression error: Unexpected * operator.


Expression error: Unexpected < operator.



Handle = Worst

Point = Best best

Edge = Best best

= Expression error: Unexpected < operator.  



True DPS =

(12/1.6 * 0)+

(27/1.6 * (1.00/2))+

(27/1.6 * (1.00/2)) +

(/ * 0)