Difference between revisions of "Melee Dodge Chance"

From RimWorld Wiki
Jump to navigation Jump to search
(Rewrote most of the page (data from dev mode experiments))
Line 7: Line 7:
 
}}
 
}}
  
==Factors==
+
==Base score==
* {{#set:Skill=Melee}}[[Skills#Melee|Melee]]: ( skill level - 5 ) * 2
+
First, a base score, which we'll call M, is computed by adding up Melee skill and a few other modifiers:
 +
* {{#set:Skill=Melee}}[[Skills#Melee|Melee]]: skill level (0 to 20)
 
* [[Moving]]: [[Moving Importance::1|1800%]] importance
 
* [[Moving]]: [[Moving Importance::1|1800%]] importance
 +
** For example, each [[bionic leg]] gives +12.5% or +0.125 Moving, which at 18x yields +2.25.
 
* [[Sight]]: [[Sight Importance::0.7|800%]] importance, [[Sight Limit::1.4|140%]] limit
 
* [[Sight]]: [[Sight Importance::0.7|800%]] importance, [[Sight Limit::1.4|140%]] limit
 +
** For example, one [[bionic eye]] and one normal eye gives 118.75% Sight, and .1875 x 8 yields +1.5.
 
* [[Traits]]
 
* [[Traits]]
 
** [[Traits#Nimble|Nimble]]: +15.0
 
** [[Traits#Nimble|Nimble]]: +15.0
* Post-processing curve
+
** [[Traits#Brawler|Brawler]] does not have any direct effect.
 +
 
 +
==Post-processing curve==
 +
The base score M is used to produce the net Melee Dodge Chance, as follows:
 +
* If M < 5, Dodge Chance = 0%
 +
* If 5 ≤ M ≤ 20, Dodge Chance = 2 * (M-5)
 +
** 0% ≤ Dodge Chance ≤ 30% when 5 ≤ M < 20
 +
* If 20 ≤ M ≤ 60, Dodge Chance = 30 + 0.5 * (M-20)
 +
* If M > 60, Dodge Chance = 50%
 +
In a single formula you can graph:
 +
* Dodge Chance percentage = min(50, max(0, (M-5) * 2 - max(0, (M-20) * 1.5)))
 +
 
 +
In other words, 20 is a "soft cap" for the modified melee base score: exceeding that yields 1/4 the benefit.  For a normal pawn with melee 5, replacing a leg with an [[archotech leg]] would yield +4.5 base score and +9% dodge chance; but if it had melee 20, then the new leg would yield only +2.25% dodge chance.  And then there's a hard cap at 50% dodge chance.
 +
 
 +
A maxed-out pawn with two [[archotech eye]]s (150% Sight, capped at 140% -> +3.2 base chance), two [[archotech leg]]s and a [[bionic heart]] (158% Moving -> +10.44 base chance), the Nimble trait (+15), and level 20 melee has a base dodge chance of M=48.64 and a resulting Melee Dodge Chance of 44.32%.  [[go-juice|Go-juice]] raises it to 49%.  Adding in [[luciferium]], [[wake-up]], and [[fibrous mechanites]] yields M=73.5, which would translate into a 56.75% dodge chance if not for the hard cap at 50%.

Revision as of 11:39, 20 July 2020

Melee Dodge Chance is a stat: Chance to dodge a melee attack that would've otherwise hit. Characters will not dodge while aiming or firing a ranged weapon. Its minimum allowed value is 0%. Its maximum allowed value is 80%. Its default value is 100%.

Base score

First, a base score, which we'll call M, is computed by adding up Melee skill and a few other modifiers:

  • Melee: skill level (0 to 20)
  • Moving: 1800% importance
    • For example, each bionic leg gives +12.5% or +0.125 Moving, which at 18x yields +2.25.
  • Sight: 800% importance, 140% limit
    • For example, one bionic eye and one normal eye gives 118.75% Sight, and .1875 x 8 yields +1.5.
  • Traits

Post-processing curve

The base score M is used to produce the net Melee Dodge Chance, as follows:

  • If M < 5, Dodge Chance = 0%
  • If 5 ≤ M ≤ 20, Dodge Chance = 2 * (M-5)
    • 0% ≤ Dodge Chance ≤ 30% when 5 ≤ M < 20
  • If 20 ≤ M ≤ 60, Dodge Chance = 30 + 0.5 * (M-20)
  • If M > 60, Dodge Chance = 50%

In a single formula you can graph:

  • Dodge Chance percentage = min(50, max(0, (M-5) * 2 - max(0, (M-20) * 1.5)))

In other words, 20 is a "soft cap" for the modified melee base score: exceeding that yields 1/4 the benefit. For a normal pawn with melee 5, replacing a leg with an archotech leg would yield +4.5 base score and +9% dodge chance; but if it had melee 20, then the new leg would yield only +2.25% dodge chance. And then there's a hard cap at 50% dodge chance.

A maxed-out pawn with two archotech eyes (150% Sight, capped at 140% -> +3.2 base chance), two archotech legs and a bionic heart (158% Moving -> +10.44 base chance), the Nimble trait (+15), and level 20 melee has a base dodge chance of M=48.64 and a resulting Melee Dodge Chance of 44.32%. Go-juice raises it to 49%. Adding in luciferium, wake-up, and fibrous mechanites yields M=73.5, which would translate into a 56.75% dodge chance if not for the hard cap at 50%.