Bionic Limbs being duplicated on production? (Solved)

Started by DownstairsB, December 15, 2014, 08:46:12 PM

Previous topic - Next topic

DownstairsB

Hey folks, long-time modder, first Rimworld mod.  It's a mod about augmenting bodyparts and upgrading weapons.

Anywho, for the most part, it works great.  I have some basic recipes, including being able to harvest legs, arms, eyes, and brains, and then upgrade them into bionic versions at the Machining Bench.   You can also upgrade a couple guns to OP versions.
It all worked in the last version, and I finally got it updated and error-free for the new version.

However, now the bionic limbs get duplicated when they are created.  1 natural leg + 1 medkit + 10 steel = 1 Bionic Leg, according to the new recipe.  Yet 2 are created.

I am using the vanilla bionic arm, leg, and eye for this, plus other custom parts and guns.  It's happening with all of them.

Recipe
<RecipeDef>
<defName>MakeBionicLeg</defName>
<label>Upgrade a human Leg</label>
<description>Greatly improves wakling ability.</description>
<jobString>Augmenting Leg</jobString>
<workAmount>1500</workAmount>
<workSpeedStat>ButcheryMechanoidSpeed</workSpeedStat>
<efficiencyStat>ButcheryMechanoidEfficiency</efficiencyStat>
<effectWorking>ButcherMechanoid</effectWorking>
    <soundWorking>Recipe_ButcherCorpseMechanoid</soundWorking>
    <ingredients>
<li>
<filter>
<thingDefs>
<li>Leg</li>
</thingDefs>
</filter>
<count>1</count>
</li>
<li>
<filter>
<thingDefs>
<li>Medicine</li>
</thingDefs>
</filter>
<count>1</count>
</li>
<li>
<filter>
<thingDefs>
<li>Steel</li>
</thingDefs>
</filter>
<count>10</count>
</li>
</ingredients>

<products>
<BionicLeg>1</BionicLeg>
</products>
<fixedIngredientFilter>
<thingDefs>
<li>Leg</li>
<li>Medicine</li>
<li>Steel</li>
</thingDefs>
</fixedIngredientFilter>
<skillRequirements>
<li>
<skill>Crafting</skill>
<minLevel>7</minLevel>
</li>
</skillRequirements>
<skillGains>
<Crafting>1000</Crafting>
</skillGains>
</RecipeDef>


I tried removing some of the ingredients but I still get 2 products.  I compared the job to other production jobs from Core but couldn't find any difference.

Machining Table - This is just copied from Core with new recipes added, so I don't think the problem is with this.
  <ThingDef ParentName="BuildingBase">
    <DefName>TableMachining</DefName>
    <EType>BuildingComplex</EType>
    <label>machining table</label>
    <ThingClass>Building_WorkTable</ThingClass>
    <Description>A table and tools for assembling and disassembling machine components.</Description>
    <graphicPath>Things/Building/Production/TableMachining</graphicPath>
    <graphicClass>Graphic_Single</graphicClass>
    <CostList>
      <Steel>200</Steel>
    </CostList>
    <AltitudeLayer>Waist</AltitudeLayer>
    <UseStandardHealth>True</UseStandardHealth>
    <statBases>
      <WorkToMake>3000</WorkToMake>
      <MaxHealth>180</MaxHealth>
      <Flammability>1.0</Flammability>
    </statBases>
    <Size>(3,1)</Size>
    <graphicOverdraw>False</graphicOverdraw>
    <DesignationCategory>Production</DesignationCategory>
    <Passability>Impassable</Passability>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionSquareOffset>(0,0,-1)</interactionSquareOffset>
    <itemSurface>True</itemSurface>
    <recipes>
      <li>ButcherCorpseMechanoid</li>
  <li>MakeHPLeeEinfield</li>
  <li>MakeT10IncendiaryLauncher</li>  
  <li>MakeBionicEye</li>
  <li>MakeBionicArm</li>
  <li>MakeBionicLeg</li>
  <li>MakeBionicBrain</li>  
    </recipes>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <comps>
      <li>
        <compClass>CompPowerTrader</compClass>
        <startElectricalFires>true</startElectricalFires>
        <basePowerConsumption>350</basePowerConsumption>
        <soundPowerOn>PowerOnSmall</soundPowerOn>
        <soundPowerOff>PowerOffSmall</soundPowerOff>
      </li>
      <li>
        <compClass>CompGlower</compClass>
        <glowRadius>5</glowRadius>
        <glowColor>(73,123,138,0)</glowColor>
      </li>
    </comps>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
    </building>
    <constructEffect>ConstructMetal</constructEffect>
    <researchPrerequisite>Machining</researchPrerequisite>
    <designationHotKey>N</designationHotKey>
  </ThingDef>


Any ideas would be greatly appreciated!


~DownstairsB

Haplo

Your problem is most likely the efficiencyStat. You need to make your own efficiency where there is no possible way for high level workers to increase the amount.

JuliaEllie

Yes the efficiency stat multiplies your crafting outcome. You can just get rid of it and everything is should be fine.

DownstairsB

Yes!  You guys are correct, it was the <efficiencystat> which was multiplying it.  I assume that has to do with better crafters salvaging more metal, etc...

When I removed that from the recipes, only 1 item was produced.  Thanks!