Template:True Melee DPS Calculator/doc

From RimWorld Wiki
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}} || {{#var:attack1SelectionChance}}
|-
| {{Q|{{#var:name}}|Attack 2 Part}} || {{#var: attack2InitialSelectionWeight}} || {{#var:attack2SelectionCategory}} || {{#var:attack2SelectionChance}}
|-
| {{Q|{{#var:name}}|Attack 3 Part}} || {{#var: attack3InitialSelectionWeight}} || {{#var:attack3SelectionCategory}} || {{#var:attack3SelectionChance}}
|-
| {{Q|{{#var:name}}|Attack 4 Part}} || {{#var: attack4InitialSelectionWeight}} || {{#var:attack4SelectionCategory}} || {{#var:attack4SelectionChance}}
|}
True DPS = {{#var:trueDPS}}
True AP = {{#var:trueAP}}

produces: 24.47

Part name Weight Category
Handle 13.7 worst 0
Point 56.4 best 0.5
Edge 56.4 best 0.5

True DPS = 24.47 True AP = 130.5