Severity by Light Level - KonradHeinser/EBSGFramework GitHub Wiki
This hediff comp sets the severity of the hediff based on the light level that the pawn is standing in, or uses a time curve if it can't find a map at all. The basic comp looks like this:
<comps>
<li Class="EBSGFramework.HediffCompProperties_SeverityByLightLevel">
<lightToSeverityCurve>
<points>
<li>(0, 0.01)</li>
<li>(1, 1)</li>
</points>
</lightToSeverityCurve>
<timeToSeverityCurve>
<points>
<li>(0, 0.01)</li>
<li>(1, 1)</li>
</points>
</timeToSeverityCurve>
</li>
</comps>
The right side of the points are the severity that the hediff is set to based on the results of the left side, and any number of points can be added. While it's recommended to keep the time curve as a back up plan, you can remove it if desired.
Example from SHG - Just the Radiomancer with a hediff that caused the pawn to start regenerating when they are in bright light (or if it's day time in the event that there is no map) using the Tiered Regeneration hediff comp
<HediffDef>
<defName>SHG_Radiomancer_SolarRegeneration</defName>
<label>solar regeneration</label>
<description>There was a description here.</description>
<everCurableByItem>false</everCurableByItem>
<initialSeverity>1</initialSeverity>
<hediffClass>HediffWithComps</hediffClass>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<stages>
<li>
<becomeVisible>false</becomeVisible>
</li>
<li>
<minSeverity>1</minSeverity>
<statFactors>
<InjuryHealingFactor>3</InjuryHealingFactor>
</statFactors>
</li>
</stages>
<comps>
<li Class="EBSGFramework.HediffCompProperties_SeverityByLightLevel">
<lightToSeverityCurve>
<points>
<li>(0, 0.9)</li>
<li>(0.6, 1)</li>
</points>
</lightToSeverityCurve>
<timeToSeverityCurve>
<points>
<li>(0, 0.9)</li>
<li>(0.35, 1)</li>
<li>(0.65, 1)</li>
<li>(1, 0.9)</li>
</points>
</timeToSeverityCurve>
</li>
<li Class="EBSGFramework.HediffCompProperties_TieredRegeneration">
<healWhileRegrowing>True</healWhileRegrowing>
<regenSets>
<li>
<ticksToRegrowPart>2500</ticksToRegrowPart>
<repeatHealCount>10</repeatHealCount>
<minSeverity>1</minSeverity>
<healAmount>0.3</healAmount>
</li>
</regenSets>
</li>
</comps>
</HediffDef>