Difference between revisions of "Pain"

From RimWorld Wiki
Jump to navigation Jump to search
(Fixed link. Minor rewrite.)
(https://github.com/josh-m/RW-Decompile/blob/d5bbfd741a46452bbfbec3a38b11a122f766f057/Verse/HediffSet.cs#L700 shows the 1.0 pain formula. Removing the old formula which was either outdated or wrong.)
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
{{Stat
+
{{Capacity
 
| default base value = 1
 
| default base value = 1
 
| to string style = PercentZero
 
| to string style = PercentZero
Line 6: Line 6:
 
}}</noinclude>
 
}}</noinclude>
 
<includeonly>:''Main Article: [[Pain]]''</includeonly>
 
<includeonly>:''Main Article: [[Pain]]''</includeonly>
Most biological creatures including [[colonist]]s, [[raider]]s, and [[animals]] feel pain caused by [[Injury|injuries]].  A pawn's pain level ranges from 0% to 100% and is displayed on their Health tab's Overview. Pain levels are None, Little, Moderate, Severe, and Extreme. Even a little pain causes unhappy [[Thoughts_list|thoughts]]. Once pain passes 10%, it'll start to have an effect on consciousness. If a pawn's pain level reaches 'Extreme' they'll go into [[Injury#Shock|shock]], unable to move.  
+
Most biological creatures including [[colonist]]s, [[raider]]s, and [[animals]] feel pain caused by [[Injury|injuries]].  A pawn's pain level ranges from 0% to 100% and is displayed on their Health tab's Overview. Pain levels are None, Little, Moderate, Severe, and Extreme. Even a little pain causes unhappy [[Thoughts list|thoughts]]. Once pain passes 10%, it'll start to have an effect on consciousness. If a pawn's pain level meets or exceeds their [[Pain Shock Threshold]] they'll go into [[Injury#Shock|shock]], unable to move. Pawns with the Wimp [[traits|trait]] will be incapacitated with only minor pain of 20%.
  
Most pain is temporary, but [[Injury#Scarring|scars]] and certain [[Disease|diseases]] can cause long-term or permanent pain.  A [[Painstopper]] implant will get rid of all a colonist's pain and negate any pain-related mood penalties. Note that colonists with the Masochist [[Traits|trait]] get a mood ''bonus'' from pain instead of a penalty, so it's usually better to leave them alone.
+
Most pain is temporary, but [[Injury#Scarring|scars]] and certain [[disease]]s can cause long-term pain.  A [[painstopper]] implant will get rid of all a colonist's pain and negate any pain-related mood penalties. Note that colonists with the Masochist trait get a mood ''bonus'' from pain instead of a penalty, so it's usually better to leave them alone.
===Formula===
 
Pain follows a somewhat painful formula:
 
  
{{math|big=1|''Pain'' {{=}} Number of Injuries &divide; [80.0 &times; Max Pain Level Multiplier<ref>This is 1.0 for humans.</ref> &times; Health Scale<ref>This is also 1.0 for humans</ref> + Extra Pain &divide; (80.0 &times; Max Pain Level Multiplier)]}}
+
==Formula==
 +
Pain for a given pawn is the sum of the pain from each individual injury, with two extra steps at the end:
 +
* <code>pain = pain / healthFactor</code> for pawns with a healthFactor other than 1.0 (like [[grizzly bear]]s and other large animals). Humans have a healthFactor of 1.0, so this doesn't impact humans
 +
* <code>pain = pain * painFactor</code> from health conditions which alter pain. This includes pain-reducing drugs like [[flake]] and [[yayo]] as well as anesthetic used during operations
  
<references/>
+
Pain from an individual injury is the product of the severity of the injury (the number of HP missing for things like cuts and burns) and the pain per severity for the injury type.  For example:
 
+
*30 burn damage causes 30 damage &times; 0.01875 pain per severity = 56.25% pain
 
+
*30 cut damage causes 30 damage &times; 0.00625 pain per severity = 18.75% pain
Extra pain is determined by individual injuries:
 
 
 
{{math|big=1|''Extra Pain'' {{=}} Injury Damage &times; Injury Pain Value}}
 
 
 
 
 
*50 crush damage would do {{math|<var>50 damage</var> &times; <var>1.25 crush pain</var> {{=}} ''62.5 extra pain''}}
 
*50 burn damage would do {{math|<var>50 damage</var> &times; <var>1.875 burn pain</var> {{=}} ''93.75 extra pain''}}
 

Revision as of 01:43, 26 April 2020

Pain is a pawn capacity: How much pain a person feels.

Most biological creatures including colonists, raiders, and animals feel pain caused by injuries. A pawn's pain level ranges from 0% to 100% and is displayed on their Health tab's Overview. Pain levels are None, Little, Moderate, Severe, and Extreme. Even a little pain causes unhappy thoughts. Once pain passes 10%, it'll start to have an effect on consciousness. If a pawn's pain level meets or exceeds their Pain Shock Threshold they'll go into shock, unable to move. Pawns with the Wimp trait will be incapacitated with only minor pain of 20%.

Most pain is temporary, but scars and certain diseases can cause long-term pain. A painstopper implant will get rid of all a colonist's pain and negate any pain-related mood penalties. Note that colonists with the Masochist trait get a mood bonus from pain instead of a penalty, so it's usually better to leave them alone.

Formula

Pain for a given pawn is the sum of the pain from each individual injury, with two extra steps at the end:

  • pain = pain / healthFactor for pawns with a healthFactor other than 1.0 (like grizzly bears and other large animals). Humans have a healthFactor of 1.0, so this doesn't impact humans
  • pain = pain * painFactor from health conditions which alter pain. This includes pain-reducing drugs like flake and yayo as well as anesthetic used during operations

Pain from an individual injury is the product of the severity of the injury (the number of HP missing for things like cuts and burns) and the pain per severity for the injury type. For example:

  • 30 burn damage causes 30 damage × 0.01875 pain per severity = 56.25% pain
  • 30 cut damage causes 30 damage × 0.00625 pain per severity = 18.75% pain