[SOLVED]Can I use a corpse as part of a recipe/costList

Started by Fourtoo, August 23, 2022, 07:00:18 AM

Previous topic - Next topic

Fourtoo

Hey, 

So I'm brand new to modding but I have been learning and developing very slowly but so far successfully with the help of referencing other mods and modders.   But now I've hit a wall and not sure how to get round or over it.  I have an item in my mod I wish to use a corpse or meat from either animals or humans as the ingredient/cost.  Despite all my current attempts I've not yet managed to succeed.  The item is present in game, I can spawn it, and it also shows on the relevant benches and I can also construct it there.. for zero ingredients..   I am able to make it with other ingredients using <costList> *** <\costList> but I just cannot figure out how I would use meat or a corpse..  Ideally I want it to be one corpse to produce 10 of this item  or 0.10 corpse to produce one of the item.. but for now Id be happy to see it just use a corpse or meat.  Am I searching for something that is possible or have I gone the wrong way..


At the moment this is the only error I get, if this helps in anyway.

Could not resolve cross-reference: No Verse.ThingDef named Corpse found to give to Verse.ThingDefCountClass (1x null)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string)
Verse.DirectXmlCrossRefLoader/WantedRefForObject:TryResolve (Verse.FailMode)
Verse.DirectXmlCrossRefLoader/<>c__DisplayClass15_1:<ResolveAllWantedCrossReferences>b__0 (Verse.DirectXmlCrossRefLoader/WantedRef)
Verse.GenThreading/<>c__DisplayClass7_1`1<Verse.DirectXmlCrossRefLoader/WantedRef>:<ParallelForEach>b__0 (object)
System.Threading.QueueUserWorkItemCallback:WaitCallback_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.QueueUserWorkItemCallback:System.Threading.IThreadPoolWorkItem.ExecuteWorkItem ()
System.Threading.ThreadPoolWorkQueue:Dispatch ()
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

Fourtoo

Solved this issue,  to use corpse as ingredient it had to be a RecipeDef.. I was trying to do this as a ThingDef.. this would not recognise the corpse as an ingredient.

deadlypandaghost

Can you post an example? Still can't get mine to work for some reason.