Problem between implants and Slaves suppression

Started by Herebus, September 15, 2021, 06:34:40 AM

Previous topic - Next topic

Herebus

Hi, I come here because I've asked this question on severals Discord without answer. I'm triyng to make a mod which add brain implants who should block SuppressionFall. But when testing my mod, after debugging, it's appear that even with a +100% terror or +100% SuppressionOffset, wich is show on the implant in game, doesn't work, and moreover, seems to not apply (at least for terror) because I've check the slave tab, and it say 0% terror (?).
Am I doing something wrong ?

Thanks for reading me.

Complete code of the implant (recipes and others):

<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <!-- Basic Mind Suppressor -->

  <HediffDef ParentName="ImplantHediffBase">
    <defName>MindSuppressorEffect</defName>
    <label>mind suppressor</label>
    <labelNoun>a mind suppressor</labelNoun>
    <description>An installed mind suppressor, inhibiting all hostiles pulsions of a slave, turning him in a sheep.</description>
    <descriptionHyperlinks><ThingDef>MindSuppressor</ThingDef></descriptionHyperlinks>
    <stages>
      <li>
        <label>Suppressed Mind</label>
        <statOffsets>
          <MentalBreakThreshold>-0.25</MentalBreakThreshold>
     <Terror>1.0</Terror>
        </statOffsets>
      </li>
    </stages>
    <spawnThingOnRemoved>MindSuppressor</spawnThingOnRemoved>
  </HediffDef>

  <ThingDef ParentName="BodyPartProstheticBase">
    <defName>MindSuppressor</defName>
    <label>mind suppressor</label>
    <description>A mind suppressor. Supress all emotions and desires of revolt, making the slave a perfect robot without other needs than food and sleep.</description>
    <descriptionHyperlinks><RecipeDef>InstallMindControl</RecipeDef></descriptionHyperlinks>
    <thingSetMakerTags>
      <li>RewardStandardLowFreq</li>
    </thingSetMakerTags>
    <costList>
      <Silver>50</Silver>
      <Gold>20</Gold>
      <Plasteel>15</Plasteel>
      <ComponentSpacer>4</ComponentSpacer>
    </costList>
    <recipeMaker>
     <skillRequirements>
       <Crafting>8</Crafting>
     </skillRequirements>
     <researchPrerequisite>BasicMindSuppression</researchPrerequisite>
     <recipeUsers>
       <li>FabricationBench</li>
     </recipeUsers>
    </recipeMaker>
    <techHediffsTags>
      <li>Advanced</li>
    </techHediffsTags>
  </ThingDef>

  <RecipeDef ParentName="SurgeryInstallImplantBase">
    <defName>InstallMindControl</defName>
    <label>install mind suppressor</label>
    <description>Install a mind suppressor.</description>
    <descriptionHyperlinks>
      <ThingDef>MindSuppressor</ThingDef>
      <HediffDef>MindSuppressorEffect</HediffDef>
    </descriptionHyperlinks>
    <jobString>Installing mind suppressor.</jobString>
    <ingredients>
      <li>
        <filter>
          <thingDefs>
            <li>MindSuppressor</li>
          </thingDefs>
        </filter>
        <count>1</count>
      </li>
    </ingredients>
    <fixedIngredientFilter>
      <thingDefs>
        <li>MindSuppressor</li>
      </thingDefs>
    </fixedIngredientFilter>
    <appliedOnFixedBodyParts>
      <li>Brain</li>
    </appliedOnFixedBodyParts>
    <addsHediff>MindSuppressorEffect</addsHediff>
  </RecipeDef>

  <RecipeDef ParentName="SurgeryRemoveImplantBase">
    <defName>RemoveMindSuppressor</defName>
    <label>remove mind suppressor</label>
    <description>Remove the mind suppressor.</description>
    <descriptionHyperlinks>
      <ThingDef>MindSuppressor</ThingDef>
      <HediffDef>MindSuppressorEffect</HediffDef>
    </descriptionHyperlinks>
    <jobString>Removing mind supressor.</jobString>
    <removesHediff>MindSuppressorEffect</removesHediff>
  </RecipeDef>

</Defs>