Template:True Melee DPS Calculator/doc

From RimWorld Wiki
< Template:True Melee DPS Calculator
Revision as of 15:16, 22 September 2021 by Harakoni (talk | contribs) (Created page with "Returns the true DPS of a melee weapon or animal i.e. the DPS taking into account the melee verb system introduced in Version/1.1.2610. This value often disagrees...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Returns the true DPS of a melee weapon or animal i.e. the DPS taking into account the melee verb system introduced in Version/1.1.2610. This value often disagrees with the listed melee DPS in-game but better represents the reality in most cases.

Usage

The first parameter, if present, will specify which weapon or animal to generate the template for. If absent, {{PAGENAME}} will be used. The second parameter, if present, will specify which material to generate the template for. If absent, the template will assume multipliers of 1 for all stats, returning the base values for animals or non-stuffable weapons such as the monosword, or the equivalent of steel for stuffed weapons. The third parameter, if present, will specify the quality of the weapon to generate the template for. If absent, the template will assume multipliers of 1 for all stats, returning the base values for animals or quality-less weapons, or the equivalent of Normal quality for other weapons.

Additionally, the values may be useful to call if more than just the DPS is useful. Namely:

{{#var: attack1InitialSelectionWeight}} = Selection weight of Attack 1
{{#var: attack2InitialSelectionWeight}} = Selection weight of Attack 2 
{{#var: attack3InitialSelectionWeight}} = Selection weight of Attack 3 
{{#var: attack4InitialSelectionWeight}} = Selection weight of Attack 4  
{{#var:attack1SelectionCategory}} = Selection category for Attack 1, out of Worst (0% chance), Mid (25% chance split between all in category), and Best (75% chance split between all in category)
{{#var:attack2SelectionCategory}} = Selection category for Attack 2, out of Worst (0% chance), Mid (25% chance split between all in category), and Best (75% chance split between all in category)
{{#var:attack3SelectionCategory}} = Selection category for Attack 3, out of Worst (0% chance), Mid (25% chance split between all in category), and Best (75% chance split between all in category)
{{#var:attack4SelectionCategory}} = Selection category for Attack 4, out of Worst (0% chance), Mid (25% chance split between all in category), and Best (75% chance split between all in category)
{{#var:trueDPS}} = The DPS output by the template - only useful for further math.
{{#var:trueAP}} = The average AP of the weapon, using the outcome of the melee verb system.

Examples

Pawn attacks

{{True Melee DPS Calculator| Grizzly bear}}

produces: 8.67

Stuffed weapons

{{True Melee DPS Calculator|Longsword|plasteel|Legendary}}

produces: 17.68

Calling additional variables

{{True Melee DPS Calculator|Persona Monosword||Masterwork}}
{| class="wikitable"
|-
! Part name !! Weight !! Category
|-
| {{Q|{{#var:name}}|Attack 1 Part}} || {{#var: attack1InitialSelectionWeight}} || {{#var:attack1SelectionCategory}}
|-
| {{Q|{{#var:name}}|Attack 2 Part}} || {{#var: attack2InitialSelectionWeight}} || {{#var:attack2SelectionCategory}}
|-
| {{Q|{{#var:name}}|Attack 3 Part}} || {{#var: attack3InitialSelectionWeight}} || {{#var:attack3SelectionCategory}}
|-
| {{Q|{{#var:name}}|Attack 4 Part}} || {{#var: attack4InitialSelectionWeight}} || {{#var:attack4SelectionCategory}}
|}
True DPS = {{#var:trueDPS}}
True AP = {{#var:trueAP}}

produces: Division by zero.

Part name Weight Category

True DPS = Division by zero. True AP = 0