How does muscle parasite affect whole body but gut worms affect stomach?

Started by Aristocat, June 11, 2016, 07:58:41 AM

Previous topic - Next topic

Aristocat

Is it possible to change where muscle parasite go?

And how do I make to make surgery target whole body?

Fregrant

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>

Aristocat

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?

Fregrant

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>

milon

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.)

Aristocat

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.