Ludeon Forums

RimWorld => Mods => Help => Topic started by: kwang4 on April 24, 2018, 09:49:29 PM

Title: How do you remove drug Hediffs?
Post by: kwang4 on April 24, 2018, 09:49:29 PM
So i'm relatively new to modding, and i've been having difficulty figuring out how to remove a hediff caused by a drug. I know there's the button in dev mode, but is there code to do it so that the person can ingest another drug and "undo" the effects of the other.

Right now the thing i'm trying to make an antidote for is below:

<HediffDef>
    <defName>CyanideEffects</defName>
    <hediffClass>HediffWithComps</hediffClass>
    <label>cyanide poisoning</label>
    <labelNoun>Cyanide Poisoning</labelNoun>
    <defaultLabelColor>(1,0,0.5)</defaultLabelColor>
    <scenarioCanAdd>true</scenarioCanAdd>
    <maxSeverity>1.0</maxSeverity>
    <isBad>false</isBad>
    <comps>
      <li Class="HediffCompProperties_SeverityPerDay">
        <severityPerDay>-1</severityPerDay>
      </li>
    </comps>
      <stages>
       <li>
          <minSeverity>0.1</minSeverity>
          <deathMtbDays>0.1</deathMtbDays>
            <capMods>
              <li>
                <capacity>Consciousness</capacity>
                <setMax>0.1</setMax>
              </li>
              <li>
                <capacity>Breathing</capacity>

                <setMax>0.14</setMax>
              </li>
            </capMods>
        </li>
      </stages>
  </HediffDef>


Any help on making a drug that removes that hediff would be very appreciated!