Unfinished thing not completing on DLL added recipe

Started by 1000101, April 05, 2015, 03:37:08 PM

Previous topic - Next topic

1000101

I'm trying to create a basic mod which adds new recipes to work tables upon research completion.  I have everything working with one small exception.  Recipes which deal with unfinished things auto-generate a recipe to finish the recipe.  When assigning the parent recipe to the table using xml, the corresponding unfinished item recipe is auto-added.  When adding the recipe via DLL mod, either the recipe isn't generated or it isn't associated with the table (probably due to the lack of a table reference in the xml).  Added recipes which can be unfinished won't continue when DLL injected into a table.

I saw the thread about how meat is generated in alpha 3 and it seems to me that unfinished items would follow a similar vein.  Any clue to how the def name is generated so I can add said recipe to the table while adding the base recipe?


Edit:  After reading through the forums I found I could see the generated recipe name in the save file.  Only...it's the actual recipe def...

Which leads me to...why can I add a recipe with an unfinished item directly through xml and it works but not though DLL injection?  It adds it, starts crafting but can't finish the unfinished item.

grrrr
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

BBream

1)You should check Core/Defs/ThingDefs/Things_Special.xml. In file, it defined about unfinished thing,
2)And you can make your own thing. And check your ThingDef have code that
  <recipeMaker>
  ...
      <unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
  ...
  </recipeMaker>

1000101

The thing is fine, the recipe is fine.  Adding the recipe to the table via DLL and not XML is not fine only because it's an unfinished thing.  If I link the recipe in the XML (either in the RecipeDef or ThingDef) it works (crafter continues unfinished thing).  Adding it via DLL (after research is done, more recipes are added to tables) will allow the bill to be started but not continued.

I'll upload my WIP mod soon for better clarity on the failure.  I'll distill it down to show the problem I'm having.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By