"Malfunction Event" That affects Bionic Body Parts

Started by DaemonDeathAngel, June 06, 2017, 05:35:09 AM

Previous topic - Next topic

DaemonDeathAngel

      <li Class="HediffGiver_BrainInjury">
        <hediff>CyberneticArmMalfunction</hediff>
        <partsToAffect>
          <li>LeftArm</li>
          <li>RightArm</li>
        </partsToAffect>
        <chancePerDamagePct>0.12</chancePerDamagePct>
        <letterLabel>Cybernetic Arm Malfunction</letterLabel>
        <letter>Damage to NAME's arm has caused HIS Cybernetic Arm to Malfunction.</letter>
      </li>


  <HediffDef ParentName="PartMalfunction">
    <defName>CyberneticArmMalfunction</defName>
    <hediffClass>HediffWithComps</hediffClass>
    <defaultLabelColor>(0.7, 1.0, 0.7)</defaultLabelColor>
    <initialSeverity>0.001</initialSeverity>
    <label>Cybernetic Arm Malfunction</label>
    <comps>
      <li Class="HediffCompProperties_Discoverable">
        <sendLetterWhenDiscovered>true</sendLetterWhenDiscovered>
        <discoverLetterLabel>{0}'s Cybernetic Arm Malfunction</discoverLetterLabel>
        <discoverLetterText>{0}'s Cybernetic arm has Malfuntioned.

Nanites within the Arm will repair itself over the coming days.</discoverLetterText>
      </li>
<li Class="HediffCompProperties_Immunizable">
<severityPerDayNotImmune>0.1</severityPerDayNotImmune>
<severityPerDayImmune>0.1</severityPerDayImmune>
</li>
    </comps>
    <stages>
      <li>
        <label>Repairing</label>
        <minSeverity>0.333</minSeverity>
<capMods>
<li>
<capacity>Manipulation</capacity>
<offset>-0.1</offset>
</li>
</capMods>
      </li>
      <li>
        <label>Repairing</label>
        <minSeverity>0.666</minSeverity>
<capMods>
<li>
<capacity>Manipulation</capacity>
<offset>-0.1</offset>
</li>
</capMods>
      </li>
      <li>
        <label>Repairing</label>
        <minSeverity>1</minSeverity>
<capMods>
<li>
<capacity>Manipulation</capacity>
<offset>0</offset>
</li>
</capMods>
      </li>
    </stages>
  </HediffDef>


I have my XMLs setup, but I need to know if there is a way to make it affect only bionic bodyparts.
The HediffGiver works properly when used on a person with natural arms, but not on Bionic parts.
Is there a way to define specifically that only Bionic limb are meannt to be targeted,without using C#?