Trying to make a mod that changes your xenotype when an artifact is used.

Started by DaxusDragons, April 14, 2024, 03:35:45 PM

Previous topic - Next topic

DaxusDragons

I've been trying to make an item that changes the xenotype of who ever uses the artifact. I've been getting this error whenever I spawn in the item.



Could not instantiate or initialize a ThingComp: System.MissingMethodException: Default constructor not found for type Verse.ThingComp
  at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x0007b] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at (wrapper dynamic-method) Verse.ThingWithComps.Verse.ThingWithComps.InitializeComps_Patch3(Verse.ThingWithComps)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch6 (string)
(wrapper dynamic-method) Verse.ThingWithComps:Verse.ThingWithComps.InitializeComps_Patch3 (Verse.ThingWithComps)
Verse.ThingWithComps:PostMake ()
(wrapper dynamic-method) Verse.ThingMaker:Verse.ThingMaker.MakeThing_Patch2 (Verse.ThingDef,Verse.ThingDef)
(wrapper dynamic-method) Verse.DebugThingPlaceHelper:Verse.DebugThingPlaceHelper.DebugSpawn_Patch0 (Verse.ThingDef,Verse.IntVec3,int,bool,Verse.ThingStyleDef,bool,System.Nullable`1<Verse.WipeMode>)
Verse.DebugThingPlaceHelper/<>c__DisplayClass2_1:<TryPlaceOptionsForStackCount>b__1 ()
Verse.DebugTool:DebugToolOnGUI ()
Verse.DebugTools:DebugToolsOnGUI ()
(wrapper dynamic-method) RimWorld.UIRoot_Play:RimWorld.UIRoot_Play.UIRootOnGUI_Patch4 (RimWorld.UIRoot_Play)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch2 (Verse.Root)


Any advice on what I did wrong?