Shooting Accuracy Outdoors Lit

From RimWorld Wiki
Revision as of 23:07, 22 September 2024 by JuliaCat (talk | contribs) (Shooting Accuracy Outdoors Lit Stat)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Shooting Accuracy Outdoors Lit is a stat: An offset on shooting accuracy if the target is outdoors during the day. Its default value is 0%.

Offsets

Explanation

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

Indoors and Outdoors

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

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

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

  • Def Name:
    ShootingAccuracyOutdoorsLitOffset
  • Label:
    shooting accuracy outdoors lit
An offset on shooting accuracy 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