Need help with custom Implants

Started by Stinkycat752, April 02, 2015, 10:42:36 PM

Previous topic - Next topic

Stinkycat752

EDIT: I can't seem to make my own prosthetic implants.. Got errors with that to when I tried to add a Brain implant to fix brain damage. Says something about being unable to find the recipe in the HeDefs but I put an HeDef for the implant.. I'd likely get the same problems as the craftable prosthetics with that to as I saw another post about that.

Any help would be appreciated!
Abomination Imagination

Latta


Stinkycat752

#2
I did now! Still having issues with the brain implants though.
Abomination Imagination

Latta


Stinkycat752

Here you go:


To be honest I've been kinda lazy all day, haven't been bothering much to try and figure it out and that kinda makes me feel like a dork.
Abomination Imagination

Latta

It's saying that it can't find any HediffDef(not HeDef just in case) named BrainEnhancementChip. Can you check whether there is any typo here and there? Or you can post your hediff and recipe xml.

Stinkycat752

HeDiffDef:
  <ThingDef ParentName="BodyPartBase">
    <defName>BrainEnhancementChip</defName>
    <label>brain enhancement chip</label>
    <addedBodyPart>
      <isBionic>true</isBionic>
      <isSolid>true</isSolid>
      <partEfficiency>1.0</partEfficiency>
      <spawnThingOnRemoved>BrainEnhancementChip</spawnThingOnRemoved>
    </addedBodyPart>
  </ThingDef>



ThingDef/ItemsBodyParts:
  <ThingDef ParentName="BodyPartBase">
    <defName>BrainEnhancementChip</defName>
    <label>brain enhancement chip</label>
    <description>Advanced technology that repairs and improves brain functionality. Bananas.</description>
    <graphicPath>Things/Item/BodyPart/ArtificialOrgan</graphicPath>
    <graphicClass>Graphic_Single</graphicClass>
    <statBases>
      <MarketValue>4000</MarketValue>
    </statBases>
    <artificialBodyPartsTags>
      <li>Advanced</li>
    </artificialBodyPartsTags>
  </ThingDef>



Recipe Surgery:
  <RecipeDef ParentName="SurgeryFlesh">
<defName>InstallBrainEnhancementChip</defName>
<label>install brain chip</label>
<description>Installs a computer chip into the brain to repair function.</description>
<workerClass>Recipe_InstallArtificialBodyPart</workerClass>
<jobString>Installing brain chip.</jobString>
<workAmount>4000</workAmount>
<ingredients>
<li>
<filter>
          <categories>
            <li>Medicine</li>
          </categories>
</filter>
<count>1</count>
</li>
<li>
<filter>
<thingDefs>
<li>BrainEnhancementChip</li>
</thingDefs>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
      <categories>
        <li>Medicine</li>
      </categories>
        <thingDefs>
<li>BrainEnhancementChip</li>
</thingDefs>
</fixedIngredientFilter>
<appliedOnFixedBodyParts>
<li>Brain</li>
</appliedOnFixedBodyParts>
<addsHediff>BrainEnhancementChip</addsHediff>
</RecipeDef>


Still need to do the WorkGiver.
Abomination Imagination

Latta

Your HediffDef is using ThingDef instead of HediffDef.

Stinkycat752

I feel kind've silly now, that was pretty obvious. Thanks! :D

I'll check to see if there's anymore errors.
Abomination Imagination