Difference between revisions of "Template:Hit Point Market Value Inverse/doc"

From RimWorld Wiki
Jump to navigation Jump to search
(Initial documentation for the Hit Point Market Value Inverse)
 
 
Line 4: Line 4:
  
 
Returns <code>never</code> if ''n'' > ''m''
 
Returns <code>never</code> if ''n'' > ''m''
 +
 +
Note that this ignores all sell price modifiers.
  
 
[[File:Graph1.png|thumb|Relationship between hit points and value]]
 
[[File:Graph1.png|thumb|Relationship between hit points and value]]

Latest revision as of 08:16, 21 July 2022

This template calculates the minimum percentage hit points (0.0 to 1.0) at which an item would be worth n if its market value at full durability is m:

{{Hit Point Market Value Inverse|n|m}}

Returns never if n > m

Note that this ignores all sell price modifiers.

Relationship between hit points and value

Examples[edit]

{{Hit Point Market Value Inverse|64|64}}

Returns 0.9 because from 0.9 to 1.0 hit points, items have full market value.

{{Hit Point Market Value Inverse|5|50}}

Returns 0.5 because items have 10% of full market value when at 50% of hit points.

{{Hit Point Market Value Inverse|2|50}}

Returns 0.2 because items have 4% of full market value when at 20% of hit points.

{{Hit Point Market Value Inverse|80|75}}

Returns never because the target market value is greater than the maximum market value