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

From RimWorld Wiki
Jump to navigation Jump to search
(Created page with "{{#vardefine:name | {{{ 1 | {{PAGENAME}}}}} }} {{#vardefine:name | Grizzly bear}} {{#vardefine: attack1InitialSelectionWeight | {{#expr: {{Q|{{#var: name}}|Attack 1 Damage}} *...")
 
Line 1: Line 1:
 
{{#vardefine:name | {{{ 1 | {{PAGENAME}}}}} }}
 
{{#vardefine:name | {{{ 1 | {{PAGENAME}}}}} }}
{{#vardefine:name | Grizzly bear}}
+
 
{{#vardefine: attack1InitialSelectionWeight | {{#expr: {{Q|{{#var: name}}|Attack 1 Damage}} * (1 + {{Q|{{#var: name}}|Attack 1 AP}}/100) * {{Q|{{#var: name}}|Attack 1 Chance Factor|1}} / ({{Q|{{#var: name}}|Attack 1 Cooldown}}/60) round 1}} }}
+
{{#switch: {{#lc:{{{ 2 |}}}}}
{{#vardefine: attack2InitialSelectionWeight | {{#expr: {{Q|{{#var: name}}|Attack 2 Damage}} * (1 + {{Q|{{#var: name}}|Attack 2 AP}}/100) * {{Q|{{#var: name}}|Attack 2 Chance Factor|1}} / ({{Q|{{#var: name}}|Attack 2 Cooldown}}/60) round 1}} }}
+
| awful =      {{#vardefine:qualityFactor | 0.80}}
{{#vardefine: attack3InitialSelectionWeight | {{#expr: {{Q|{{#var: name}}|Attack 3 Damage}} * (1 + {{Q|{{#var: name}}|Attack 3 AP}}/100) * {{Q|{{#var: name}}|Attack 3 Chance Factor|1}} / ({{Q|{{#var: name}}|Attack 3 Cooldown}}/60) round 1}} }}
+
| poor =      {{#vardefine:qualityFactor | 0.90}}
{{#vardefine: attack4InitialSelectionWeight | {{#expr: {{Q|{{#var: name}}|Attack 4 Damage}} * (1 + {{Q|{{#var: name}}|Attack 4 AP}}/100) * {{Q|{{#var: name}}|Attack 4 Chance Factor|1}} / ({{Q|{{#var: name}}|Attack 4 Cooldown}}/60) round 1}} }}
+
| normal =    {{#vardefine:qualityFactor | 1.00}}
 +
| good =      {{#vardefine:qualityFactor | 1.10}}
 +
| excellent =  {{#vardefine:qualityFactor | 1.20}}
 +
| masterwork = {{#vardefine:qualityFactor | 1.45}}
 +
| legendary =  {{#vardefine:qualityFactor | 1.65}}
 +
| #default  =  {{#vardefine:qualityFactor | 1.00}}
 +
}}
 +
 
 +
{{#vardefine:name | Persona monosword}}
 +
{{#vardefine:qualityFactor | 1.45}}
 +
 
 +
 
 +
{{#vardefine: attack1InitialSelectionWeight | {{#expr:{{Q|{{#var: name}}|Attack 1 Damage}}*{{#var:qualityFactor}} * (1 + {{Q|{{#var: name}}|Attack 1 AP}}*{{#var:qualityFactor}}/100) * {{Q|{{#var: name}}|Attack 1 Chance Factor|1}} / ({{Q|{{#var: name}}|Attack 1 Cooldown}}) round 1}} }}
 +
{{#vardefine: attack2InitialSelectionWeight | {{#expr: {{Q|{{#var: name}}|Attack 2 Damage}}*{{#var:qualityFactor}} * (1 + {{Q|{{#var: name}}|Attack 2 AP}}*{{#var:qualityFactor}}/100) * {{Q|{{#var: name}}|Attack 2 Chance Factor|1}} / ({{Q|{{#var: name}}|Attack 2 Cooldown}}) round 1}} }}
 +
{{#vardefine: attack3InitialSelectionWeight | {{#expr: {{Q|{{#var: name}}|Attack 3 Damage}}*{{#var:qualityFactor}} * (1 + {{Q|{{#var: name}}|Attack 3 AP}}*{{#var:qualityFactor}}/100) * {{Q|{{#var: name}}|Attack 3 Chance Factor|1}} / ({{Q|{{#var: name}}|Attack 3 Cooldown}}) round 1}} }}
 +
{{#vardefine: attack4InitialSelectionWeight | {{#expr: {{Q|{{#var: name}}|Attack 4 Damage}}*{{#var:qualityFactor}} * (1 + {{Q|{{#var: name}}|Attack 4 AP}}*{{#var:qualityFactor}}/100) * {{Q|{{#var: name}}|Attack 4 Chance Factor|1}} / ({{Q|{{#var: name}}|Attack 4 Cooldown}}) round 1}} }}
  
  
Line 19: Line 34:
 
{{#ifexpr: {{#var: maxSelectionWeight}} < {{#var: attack4InitialSelectionWeight}} | {{#vardefine: maxSelectionWeight| {{#var: attack4InitialSelectionWeight}} }} }}
 
{{#ifexpr: {{#var: maxSelectionWeight}} < {{#var: attack4InitialSelectionWeight}} | {{#vardefine: maxSelectionWeight| {{#var: attack4InitialSelectionWeight}} }} }}
  
 +
{{#vardefine: numBestAttacks | 0}}
 +
{{#vardefine: numMidAttacks | 0}}
  
{{#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 |  
 
{{#ifexpr: {{#var: attack1InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
 
{{#ifexpr: {{#var: attack1InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
 
}}
 
}}
{{#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 |  
 
{{#ifexpr: {{#var: attack2InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
 
{{#ifexpr: {{#var: attack2InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
 
}}
 
}}
{{#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 |  
 
{{#ifexpr: {{#var: attack3InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
 
{{#ifexpr: {{#var: attack3InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
 
}}
 
}}
{{#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 |  
 
{{#ifexpr: {{#var: attack4InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
 
{{#ifexpr: {{#var: attack4InitialSelectionWeight}} < (0.25*{{#var: maxSelectionWeight}}) | Worst | Mid}}
 
}}
 
}}
 +
 +
 +
True DPS =

Revision as of 05:14, 17 September 2021








13.7

56.4

56.4

Expression error: Unexpected * operator.


Expression error: Unexpected < operator.



Handle = Worst

Point = Best

Edge = Best

= Expression error: Unexpected < operator.


True DPS =