Settlements don't generate trade stocks.

Started by WolfgangPolska, May 16, 2019, 03:15:19 AM

Previous topic - Next topic

WolfgangPolska

As in topic, when I rech the settlement, trade stocks arent generated. Here an error log that occurs then:
Exception while generating thing set System.ArgumentNullException Argument cannot be null.
Parameter name type
at System.Activator.CheckType (System.Type) 0x00095
at System.Activator.CreateInstance (System.Type,bool) 0x00027
at System.Activator.CreateInstance (System.Type) 0x0001e
at (wrapper dynamic-method) Verse.ThingMaker.MakeThing_Patch1 (Verse.ThingDef,Verse.ThingDef) 0x0035a
at RimWorld.StockGeneratorUtility.TryMakeForStockSingle (Verse.ThingDef,int) 0x0021e
at RimWorld.StockGeneratorUtilityTryMakeForStockc__Iterator0.MoveNext () 0x0008b
at RimWorld.StockGenerator_TagGenerateThingsc__Iterator0.MoveNext () 0x002f2
at RimWorld.ThingSetMaker_TraderStock.Generate (RimWorld.ThingSetMakerParams,System.Collections.Generic.List`1Verse.Thing) 0x0035a
at (wrapper dynamic-method) RimWorld.ThingSetMaker.Generate_Patch1 (object,RimWorld.ThingSetMakerParams) 0x00173

Verse.LogError(String, Boolean)
RimWorld.ThingSetMakerGenerate_Patch1(Object, ThingSetMakerParams)
RimWorld.Planet.SettlementBase_TraderTrackerRegenerateStock()
RimWorld.Planet.SettlementBase_TraderTrackerget_StockListForReading()
RimWorld.Planet.SettlementBaseget_Goods()
RimWorld.TradeDealAddAllTradeables()
RimWorld.TradeDealReset()
RimWorld.TradeDeal.ctor()
RimWorld.TradeSessionSetupWith(ITrader, Pawn, Boolean)
RimWorld.Dialog_Trade.ctor(Pawn, ITrader, Boolean)
RimWorld.Planet.TradeCommandc__AnonStorey0m__0()
Verse.Command_ActionProcessInput(Event)
Verse.GizmoGridDrawerDrawGizmoGrid(IEnumerable`1, Single, Gizmo&)
RimWorld.InspectGizmoGridDrawInspectGizmoGridFor_Patch0(IEnumerable`1, Gizmo&)
RimWorld.Planet.WorldInspectPaneDrawInspectGizmos()
RimWorld.InspectPaneUtilityExtraOnGUI(IInspectPane)
RimWorld.Planet.WorldInspectPaneExtraOnGUI()
Verse.WindowStackWindowStackOnGUI()
RimWorld.UIRoot_PlayUIRootOnGUI()
Verse.RootOnGUI()

Constructed TargetInfo with cell=(0, 0, 0) and a null map.
Verse.LogWarning(String, Boolean)
Verse.TargetInfo.ctor(IntVec3, Map, Boolean)
ExtendedStorage.Building_ExtendedStorageTrySplurgeStoredItems()
ExtendedStorage.Building_ExtendedStorageDestroy(DestroyMode)
RimWorld.ThingSetMakerGenerate_Patch1(Object, ThingSetMakerParams)
RimWorld.Planet.SettlementBase_TraderTrackerRegenerateStock()
RimWorld.Planet.SettlementBase_TraderTrackerget_StockListForReading()
RimWorld.Planet.SettlementBaseget_Goods()
RimWorld.TradeDealAddAllTradeables()
RimWorld.TradeDealReset()
RimWorld.TradeDeal.ctor()
RimWorld.TradeSessionSetupWith(ITrader, Pawn, Boolean)
RimWorld.Dialog_Trade.ctor(Pawn, ITrader, Boolean)
RimWorld.Planet.TradeCommandc__AnonStorey0m__0()
Verse.Command_ActionProcessInput(Event)
Verse.GizmoGridDrawerDrawGizmoGrid(IEnumerable`1, Single, Gizmo&)
RimWorld.InspectGizmoGridDrawInspectGizmoGridFor_Patch0(IEnumerable`1, Gizmo&)
RimWorld.Planet.WorldInspectPaneDrawInspectGizmos()
RimWorld.InspectPaneUtilityExtraOnGUI(IInspectPane)
RimWorld.Planet.WorldInspectPaneExtraOnGUI()
Verse.WindowStackWindowStackOnGUI()
RimWorld.UIRoot_PlayUIRootOnGUI()
Verse.RootOnGUI()

Exception while generating thing set System.ArgumentNullException Argument cannot be null.
Parameter name type
at System.Activator.CheckType (System.Type) 0x00095
at System.Activator.CreateInstance (System.Type,bool) 0x00027
at System.Activator.CreateInstance (System.Type) 0x0001e
at (wrapper dynamic-method) Verse.ThingMaker.MakeThing_Patch1 (Verse.ThingDef,Verse.ThingDef) 0x0035a
at RimWorld.StockGeneratorUtility.TryMakeForStockSingle (Verse.ThingDef,int) 0x0021e
at RimWorld.StockGeneratorUtilityTryMakeForStockc__Iterator0.MoveNext () 0x000eb
at RimWorld.StockGenerator_TagGenerateThingsc__Iterator0.MoveNext () 0x002f2
at RimWorld.ThingSetMaker_TraderStock.Generate (RimWorld.ThingSetMakerParams,System.Collections.Generic.List`1Verse.Thing) 0x0035a
at (wrapper dynamic-method) RimWorld.ThingSetMaker.Generate_Patch1 (object,RimWorld.ThingSetMakerParams) 0x00173

Verse.LogError(String, Boolean)
RimWorld.ThingSetMakerGenerate_Patch1(Object, ThingSetMakerParams)
RimWorld.Planet.SettlementBase_TraderTrackerRegenerateStock()
RimWorld.Planet.SettlementBase_TraderTrackerget_StockListForReading()
RimWorld.Planet.SettlementBaseget_Goods()
RimWorld.TradeDealAddAllTradeables()
RimWorld.TradeDealReset()
RimWorld.TradeDeal.ctor()
RimWorld.TradeSessionSetupWith(ITrader, Pawn, Boolean)
RimWorld.Dialog_Trade.ctor(Pawn, ITrader, Boolean)
RimWorld.Planet.TradeCommandc__AnonStorey0m__0()
Verse.Command_ActionProcessInput(Event)
Verse.GizmoGridDrawerDrawGizmoGrid(IEnumerable`1, Single, Gizmo&)
RimWorld.InspectGizmoGridDrawInspectGizmoGridFor_Patch0(IEnumerable`1, Gizmo&)
RimWorld.Planet.WorldInspectPaneDrawInspectGizmos()
RimWorld.InspectPaneUtilityExtraOnGUI(IInspectPane)
RimWorld.Planet.WorldInspectPaneExtraOnGUI()
Verse.WindowStackWindowStackOnGUI()
RimWorld.UIRoot_PlayUIRootOnGUI()
Verse.RootOnGUI()



Does anyone know about solution? I'm thinking that ZARS Tribal reborn mya be the issue, so I'm going to reload game without it.
I have no idea how, but it works!!!

Chesssx

Considering that you have not gotten any replies so far, I would recommend going to reddit and asking this question. r/RimWorld has some modders who may know the issue.
Remember that enemies get turned into hats, colonists get turned into chemfuel unless they are a pyro then they get to burn alive.

ReZpawner

#2
It's attempting to generate something with a parameter name that doesn't exist (null error is when you try to pass something to a constructor that doesn't exist), in this case the "type" doesn't exist.
It's definitely a mod error, or everyone would have it. Most likely it's an item that the mod creator figured didn't need a type, as it wasn't supposed to be in trade anyways, but it somehow got loaded into it anyways or just an empty item. I haven't looked into what trade goods are generated, so I wouldn't know how and why certain things are traded, and others aren't, but I'd assume it's a fairly easy fix if you search through the list of items the mod has.

Update: Should be in ModFolder\Defs\TraderStockInjectorDefs if the mods I have are anything to go by. Compare the items added there to their properties and see if there's anything missing.

I could be completely wrong about allt his too though, so checking with the mod creator is probably the better option.