What is the purpose of skinColorOverride?

Started by SamBucher, August 29, 2021, 11:18:55 AM

Previous topic - Next topic

SamBucher

I'm currently trying to make a mod that makes all human pawns have gray skin. I want this to be save friendly, so if one were to uninstall my mod, every pawn would go back to their original skin color. To do this, I wanted to make it so when the game tries to render a pawn, instead of asking for its melanin value, it just uses a predetermined color (in my case, gray). While looking for the method responsible for this, I found a nullable Color type value called skinColorOverride. It is used in classes PawnGraphicSet, Pawn_StoryTracker, and PawnGenerator. I'm very new to modding RimWorld, so reading decompiled code is still difficult, and I can't for the life of me figure out what the purpose of this variable is. Any help with this would be appreciated.

RawCode


SamBucher

I think I figured it out. This is for rotting, so when a pawn rots, its skin color gets overridden with the rot color.