Nutrition (Stat)

From RimWorld Wiki
Revision as of 10:05, 11 November 2024 by Harakoni (talk | contribs) (→‎Bases)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Nutrition (Stat) is a stat: How nutritious this food is. Its minimum allowed value is 0. Its default value is 0.

Stat Parts

Body Size

Nutrition = Nutrition × Body Size

Body Size Factor is determined by the lifestage of a pawn. This value is 1 by default for most adult / fully formed pawns, or for those with only one applicable lifestage: resulting in no impact to nutrition.

Base Body Size is determined by the race of a pawn: Humans have a base body size of 1.

These are the 2 factors for calculating the resulting pawn's body size:

Body Size = Body Size Factor × Base Body Size

Natural Not Missing Body Parts Coverage

Nutrition = Nutrition × Coverage of Intact Natural Body Parts

Coverage of Intact Natural Body Parts = Coverage of Body Parts - Coverage of Missing Natural Body Parts

Plant Growth Nutrition Factor

Nutrition = Nutrition × Nutrition Factor From Growth

Plant Growth is a value ranging from 0~1: by default it is 0.15, or 15%.

Nutrition Factor From Growth is a multiplier on nutrition gained from plants, based on Plant Growth.

For sowable plants:

Nutrition Factor From Growth = Plant Growth

For non-sowable plants:

Nutrition Factor From Growth = 0.5 + 0.5 × Plant Growth

Is Flesh

Nutrition = Nutrition × Is Flesh

Is Flesh is determined by whether or not the flesh type of a pawn's race is organic.

If the flesh type is organic: Is Flesh = 1

If the flesh type is not organic:

Is Flesh = 0

In other words: organic pawns have nutrition, and non organic pawns do not. Organic flesh types include Normal, Insectoid, Entity Flesh Content added by the Anomaly DLC, and Fleshbeast Content added by the Anomaly DLC: i.e. Humans, all Animals, Insectoids, and Fleshbeasts Content added by the Anomaly DLC, Sightstealers Content added by the Anomaly DLC, Noctols Content added by the Anomaly DLC, Fleshmass nuclei Content added by the Anomaly DLC, Gorehulks Content added by the Anomaly DLC, Devourers Content added by the Anomaly DLC, and Chimeras Content added by the Anomaly DLC. Non organic flesh types include: Mechanoid and Entity Mechanical Content added by the Anomaly DLC: i.e. all Mechanoids, and Nociospheres Content added by the Anomaly DLC, Metalhorrors Content added by the Anomaly DLC, and Revenants Content added by the Anomaly DLC.

Is Corpse Fresh

Nutrition = Nutrition × Is Corpse Fresh Is Corpse Fresh is determined by the rot stage of a corpse. The three stages are:

  • Fresh
  • Rotting
  • Dessicated

If the rot stage is fresh:

Is Corpse Fresh = 1

Otherwise:

Is Corpse Fresh = 0

If a corpse is not rottable, then it is always considered fresh (e.g. Unnatural corpses Content added by the Anomaly DLC).

In other words: fresh corpses have nutrition, and rotting or dessicated corpses do not.

Calculating Nutrition

For Plants: Nutrition = Base Nutrition × Nutrition Factor From Growth

For Corpses: Nutrition = × Body Size × Coverage of Body Parts × Is Flesh × Is Corpse Fresh

Bases

Plants

  • Click to
  • Items

  • Click to
  • Pawns

    Body Size

  • Click to
  • Factors

    Lifestage

  • Life Stage Body Size Factor Food Max Factor Max Food
    Baby 0.2 0.625 0.125
    Child 0.35 2.286 0.8
    Teenager 0.8 1.25 1
    Larva (Insect) 0.2 2 0.4
    Immature (Insect) 0.5 1.5 0.75
    Baby (Animal) 0.2 3 0.6
    Baby (Tiny Animal) 0.1 6 0.6
    Juvenile (Animal) 0.5 1.5 0.75
    Preteen Content added by the Biotech DLC 0.7 1.552 0.9
  • Stat Def Data

    Def Name
    Label
    Label For Full Stat List
    Offset Label
    Attributes
    Description Category Parameters Complex
    Parameters
    Display
    Priority
    In
    Category
    • Def Name:
      Nutrition
    • Label:
      nutrition
    How nutritious this food is.
    • Display Order:
      2
    • Def Name:
      BasicsNonPawnImportant
    • Label:
      Basics
    • Display All By Default:
      false
    • Default Base Value: 0
    • Min Value: 0
    • Show If Undefined: false
    • To String Style: FloatTwo
    • Parts:
      • StatPart_BodySize
      • StatPart_NaturalNotMissingBodyPartsCoverage
      • StatPart_PlantGrowthNutritionFactor
      • StatPart_IsFlesh
      • StatPart_IsCorpseFresh
    3000