Ludeon Forums

RimWorld => Mods => Help => Topic started by: Aristocat on June 11, 2016, 07:58:41 AM

Title: How does muscle parasite affect whole body but gut worms affect stomach?
Post by: Aristocat on June 11, 2016, 07:58:41 AM
Is it possible to change where muscle parasite go?

And how do I make to make surgery target whole body?
Title: Re: How does muscle parasite affect whole body but gut worms affect stomach?
Post by: Fregrant on June 16, 2016, 07:04:02 AM
Core code. Notice <diseasePartsToAffect>
  <IncidentDef ParentName="DiseaseIncident">
    <defName>Disease_GutWorms</defName>
    <diseaseIncident>GutWorms</diseaseIncident>
    <diseaseVictimFractionRange>
      <min>0.1</min>
      <max>0.25</max>
    </diseaseVictimFractionRange>
    <diseasePartsToAffect>
      <li>Stomach</li>
    </diseasePartsToAffect>
  </IncidentDef>
 
  <IncidentDef ParentName="DiseaseIncident">
    <defName>Disease_MuscleParasites</defName>
    <diseaseIncident>MuscleParasites</diseaseIncident>
    <diseaseVictimFractionRange>
      <min>0.1</min>
      <max>0.25</max>
    </diseaseVictimFractionRange>
  </IncidentDef>

About whole body surgery... Maybe need to remove <appliedOnFixedBodyParts>, use just <addsHediff>. Do not forget proper <workerClass>.
  <RecipeDef ParentName="SurgeryFlesh">
<defName>Euthanize</defName>
<label>euthanize</label>
<description>Euthanizes.</description>
<workerClass>Recipe_Kill</workerClass>
<jobString>Euthanizing.</jobString>
<workAmount>500</workAmount>
<hideBodyPartNames>true</hideBodyPartNames>
<addsHediff>Euthanasia</addsHediff>
    <isViolation>true</isViolation>
</RecipeDef>
Title: Re: How does muscle parasite affect whole body but gut worms affect stomach?
Post by: Aristocat on June 16, 2016, 11:02:57 PM
Quote from: Fregrant on June 16, 2016, 07:04:02 AM
Core code. Notice <diseasePartsToAffect>
...
About whole body surgery... Maybe need to remove <appliedOnFixedBodyParts>, use just <addsHediff>. Do not forget proper <workerClass>.
...

Thank you, but doesn't euthanasia affect brain, not whole body?
Title: Re: How does muscle parasite affect whole body but gut worms affect stomach?
Post by: Fregrant on June 17, 2016, 04:03:31 AM
I think euthanasia just sets consciousness to 0
<HediffDef ParentName="DiseaseBase">
<defName>Euthanasia</defName>
<label>euthanasia</label>
      <stages>
        <li>
            <capMods>
              <li>
                <capacity>Consciousness</capacity>
                <setMax>0</setMax>
              </li>
            </capMods>
        </li>
      </stages>
</HediffDef>
Title: Re: How does muscle parasite affect whole body but gut worms affect stomach?
Post by: milon on June 24, 2016, 12:04:35 PM
Yes, that's exactly what it does.

And surgery will auto-target whatever surgery bill you're trying to perform.  Since muscle parasites affect the body, that's what the surgeon will work on.  (All bets are off if the surgeon fails, of course.)
Title: Re: How does muscle parasite affect whole body but gut worms affect stomach?
Post by: Aristocat on June 24, 2016, 12:29:27 PM
Quote from: milon on June 24, 2016, 12:04:35 PM
Yes, that's exactly what it does.

And surgery will auto-target whatever surgery bill you're trying to perform.  Since muscle parasites affect the body, that's what the surgeon will work on.  (All bets are off if the surgeon fails, of course.)

Actually it seems you can't remove hediff that's affecting whole body. I fixed it via make muscle parasite target torso. I haven't found a way to make operation to target wholebody though.