Shooting Accuracy Outdoors Dark

From RimWorld Wiki
Jump to navigation Jump to search

Shooting Accuracy Outdoors Dark is a stat: An offset on shooting accuracy if the target is outdoors at night. 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:
    ShootingAccuracyOutdoorsDarkOffset
  • Label:
    shooting accuracy outdoors dark
An offset on shooting accuracy if the target is outdoors at night.
  • 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]