Craving and Overcharge Hediffs - KonradHeinser/EBSGFramework GitHub Wiki
Dispensing of the theatrics this time, lets start this setup of the craving/overcharge hediffs you presumably added to the main resource gene with two comps and a class.
<!--Hediff class for both-->
<hediffClass>EBSGFramework.Hediff_ResourceCraving</hediffClass>
<!--Craving comp-->
<comps>
<li Class="EBSGFramework.HediffCompProperties_SeverityFromResource">
<severityPerHourEmpty>0.05</severityPerHourEmpty>
<severityPerHourResource>-0.1</severityPerHourResource>
<mainResourceGene>InsertResourceDefNameHere</mainResourceGene>
</li>
</comps>
<!--Overcharge comp-->
<comps>
<li Class="EBSGFramework.HediffCompProperties_SeverityFromResource">
<severityPerHourFull>0.05</severityPerHourFull>
<severityPerHourResource>-0.1</severityPerHourResource>
<mainResourceGene>InsertResourceDefNameHere</mainResourceGene>
</li>
</comps>
Whatever else you have in the hediff probably won't do much as long as that else doesn't remove the resource gene or alter the hediff's severity (the second one can be ignored if you're really sure you know what you're doing). If the craving/overcharge isn't appearing despite linking it to the resource and the resource to it, make sure you didn't swap your severityPerHourEmpty and severityPerHourFull. Also, those two don't play well in the same comp, with the hour per empty being the default if both exist, and full hour per being completely ignored. It's also important to double check that you have the defName of the resource correct in the comp, and the defName of the hediff correct in the main resource gene.
And before you ask, yes, both were intentional. And yes, I am counting them as two despite being in the same sentence.
Adapted Superhero Genes example:
<HediffDef>
<defName>SHG_RadiomancerDrained</defName>
<label>radiomancer drained</label>
<description>Due to the lack of energies this Radiomancer's body is so accustomed to always having, their brain is gradually failing to perform its functions properly.</description>
<hediffClass>EBSGFramework.Hediff_ResourceCraving</hediffClass>
<defaultLabelColor>(0.6, 0.6, 0.6)</defaultLabelColor>
<initialSeverity>0.01</initialSeverity>
<maxSeverity>1</maxSeverity>
<everCurableByItem>false</everCurableByItem>
<stages>
<li>
<label>minor</label>
<capMods>
<li>
<capacity>Consciousness</capacity>
<setMax>0.9</setMax>
</li>
</capMods>
</li>
<li>
<label>moderate</label>
<minSeverity>0.35</minSeverity>
<capMods>
<li>
<capacity>Consciousness</capacity>
<setMax>0.8</setMax>
</li>
</capMods>
</li>
<li>
<label>major</label>
<minSeverity>0.7</minSeverity>
<capMods>
<li>
<capacity>Consciousness</capacity>
<setMax>0.5</setMax>
</li>
</capMods>
</li>
<li>
<label>extreme</label>
<minSeverity>0.95</minSeverity>
<capMods>
<li>
<capacity>Consciousness</capacity>
<setMax>0.1</setMax>
</li>
</capMods>
</li>
</stages>
<comps>
<li Class="EBSGFramework.HediffCompProperties_SeverityFromResource">
<severityPerHourEmpty>0.05</severityPerHourEmpty>
<severityPerHourResource>-0.1</severityPerHourResource>
<mainResourceGene>SHG_Archetypes_Radiomancer</mainResourceGene>
</li>
</comps>
</HediffDef>