[Solved] Using Specific Corpses as Ingredients

Started by 4rfv2wsx, December 09, 2016, 02:51:23 AM

Previous topic - Next topic

4rfv2wsx

Hello all! I'm doing a low-tech/medieval run and my mechanoid pile is growing quite large. The my inner hoarder won't let me toss a molotov and be done with them. Seems so wasteful... So I tossed together a little patch to the Medieval Times mod to let me melt them down.

<RecipeDef>
   <defName>MT_SmeltMechanoid</defName>
   <label>smelt mechanoid</label>
   <description>Smelts a dead mechanoid into its component parts.</description>
   <jobString>Smelting mechanoid.</jobString>
   <workAmount>1200</workAmount>
   <workSpeedStat>ButcheryMechanoidSpeed</workSpeedStat>
   <workSkill>Crafting</workSkill>
   <efficiencyStat>ButcheryMechanoidEfficiency</efficiencyStat>
   <effectWorking>Smelt</effectWorking>
   <soundWorking>Recipe_Smelt</soundWorking>
   <ingredients>
      <li>
         <filter>
            <categories>
               <li>Corpses</li>
            </categories>
         </filter>
         <count>1</count>
      </li>
   </ingredients>
   <specialProducts>
      <li>Butchery</li>
   </specialProducts>
   <fixedIngredientFilter>
      <categories>
         <li>CorpsesMechanoid</li>
      </categories>
   </fixedIngredientFilter>
   <recipeUsers>
      <li>MedievalTimes_FueledSmelter</li>
   </recipeUsers>
</RecipeDef>


Nothing special, just a C&P hack of the machining bill. It works great, but there lies the problem for me. It seems a bit TOO efficient. A blacksmith tossing a robot into a kiln would yield metal, but operational components... not so much.

So I went to hard code some values in there instead of the butchery products (first mod, I didn't want to get too deep :-P). But I need to differentiate between Scythers and Centipedes as their yield amounts should obviously be different. So to my tiny amount of modding knowledge, I figure I'll just have two bills, one for each. But for the life of me, I couldn't script-kiddy my way to how do it. I peeked into a few other mods but no one seems to need anything more than the fixedIngredientFilter. Best I could come up with was:
<ingredients>
   <li>
      <filter>
         <thingDefs>
            <li>Mechanoid_Centipede_Corpse</li>         
         </thingDefs>
      </filter>
      <count>1</count>
   </li>
</ingredients>

But no dice. The game loads (after a bit of trial and error) but the pawns don't see the corpses as possible ingredients for the bill. :-(

So I guess what I'm asking for is:
(TL;DR) What is the thingDef name for a corpse of a specific type, like a Centipede?

Edit: At Illusion Distort's request, I'm adding my solution to the OP:
<ingredients>
   <li>
      <filter>
         <categories>
            <li>Corpses</li>
         </categories>
      </filter>
      <count>1</count>
   </li>
</ingredients>
<fixedIngredientFilter>
   <thingDefs>
      <li>Mechanoid_Centipede_Corpse</li>         
   </thingDefs>
</fixedIngredientFilter>

Maybe it will help someone else? :-)

Illusion Distort

Just edit the post so that you share your experience instead of making people read the entire thing and then get the plasp in the face "ops, just ignore everythin'".