Difference between revisions of "Melee Dodge Chance Outdoors Day"

From RimWorld Wiki
Jump to navigation Jump to search
(Melee Dodge Chance Outdoors Day Stat)
 
 
Line 1: Line 1:
 
{{Ideology}}
 
{{Ideology}}
 
{{Stub|reason=1) Two-way links}}
 
{{Stub|reason=1) Two-way links}}
 +
{{See also|Melee Dodge Chance Outdoors Night|Melee Dodge Chance Indoors Dark|Melee Dodge Chance Indoors Lit}}
 
{{Verified|1.5.4104}}{{Stat
 
{{Verified|1.5.4104}}{{Stat
 
| def name = MeleeDodgeChanceOutdoorsLitOffset
 
| def name = MeleeDodgeChanceOutdoorsLitOffset
Line 11: Line 12:
 
| category = PawnCombat
 
| category = PawnCombat
 
}}
 
}}
{{See also|Melee Dodge Chance Outdoors Night|Melee Dodge Chance Indoors Dark|Melee Dodge Chance Indoors Lit}}
 
  
 
== Offsets ==
 
== Offsets ==

Latest revision as of 02:40, 23 September 2024

Melee Dodge Chance Outdoors Day is a stat: An offset on melee dodge chance if the target is outdoors during the day. Its default value is 0%.

Offsets[edit]

Explanation[edit]

Darkness Combat Utility is used to calculate when to apply the darkness combat stats.

Indoors and Outdoors[edit]

A pawn is considered Outdoors when the roof at their location is not natural or not a thick roof (i.e. Constructed roof).

For reference:

Roof Thick Natural
Constructed roof - false
Rock roof (thin) false true
Overhead mountain true true
Void metal ceiling Content added by the Anomaly DLC true true

If this checks out, the pawn is then tested to see if they are in a room and considered Psychologically outdoors: When the unroofed cell count of the room is ≥ 300, or when the room touches the map edge and the unroofed cell count is ≥ 50% of the room cell count.

As such, a pawn is considered Indoors when they are under a Rock roof (thin), Overhead mountain, or a Void metal ceiling Content added by the Anomaly DLC. They are also considered Indoors when they are within a room with an unroofed cell count of < 300, or when the room touches the map edge and the unroofed cell count is < 50% of the room cell count

Darklight Utility[edit]

Darklight refers to a default color of

, with a hue range of 49~51%.

For the Red (r), Green (g), and Blue (b) color channels: Light is not considered Darklight when:

  • red > green
  • red > blue

For the following expression:

If green > blue:

  • num = green
  • num2 = blue

Otherwise:

  • num = blue
  • num2 = green

Simply put, the larger value is num, and the smaller is num2.

(num is not zero) and red ≤ (num / 2) and (num2 / num) > 0.85

Light is considered Darklight when the above expression is true.

Lit and Dark[edit]

There are 3 different stages of light, defined by PsychGlow (Psychological Glow):

  • Dark (Glow ≤ 30%)
  • Lit (Glow > 30%)
  • Overlit (Glow > 90%)

Glow in this case refers to the cell light level.

When Outdoors, the pawn is considered Lit when the sky light is > 35%, otherwise they will be considered Dark.

When Indoors, the pawn is considered Lit when the light level is Lit and there is no Darklight. The Pawn is considered Dark when the light level is Dark or if there is Darklight.

In short:

Location Lit Dark
Outdoors Sky light > 35% Sky light ≤ 35%
Indoors Lit and no Darklight Dark or Darklight

Stat Def Data[edit]

Def Name
Label
Label For Full Stat List
Offset Label
Attributes
Description Category Parameters Complex
Parameters
Display
Priority
In
Category
  • Def Name:
    MeleeDodgeChanceOutdoorsLitOffset
  • Label:
    melee dodge chance outdoors day
An offset on melee dodge chance if the target is outdoors during the day.
  • Display Order:
    110
  • Def Name:
    PawnCombat
  • Label:
    Combat
  • Display All By Default:
    false
  • Default Base Value: 0%
  • To String Style: PercentZero
  • Show On Animals: false
  • Always Hide: true
- -

Version history[edit]