RimWorld

RimWorld

Dubs Mint Menus
Azzkiy 12 Aug, 2021 @ 7:13am
Bug with recipe cloning (also wheel menu?)
Hello! Found a bug related to bills cloning.

How to reproduce (with Vanilla Animals Expanded - Australia):

1. Add Vanilla Animals Expanded - Australia and Dubs Mint Menus to mods list.
2. Create a bill that includes items from Vanilla Animals Expanded - Australia.
3. Clone bills from work station.
4. Exit to main menu.
5. Remove Vanilla Animals Expanded - Australia from list of mods.
6. Start a new colony.

Here is the errors that appear after last step:

Initializing new game with mods: - brrainz.harmony - Ludeon.RimWorld - Ludeon.RimWorld.Ideology - Ludeon.RimWorld.Royalty - Fluffy.ModManager - UnlimitedHugs.HugsLib - Dubwise.DubsMintMenus UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Message (string) Verse.Game:InitNewGame () Verse.Root_Play/<>c:<Start>b__1_2 () Verse.LongEventHandler:RunEventFromAnotherThread (System.Action) Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 () System.Threading.ThreadHelper:ThreadStart_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.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) System.Threading.ThreadHelper:ThreadStart () Could not load reference to Verse.ThingDef named Meat_AEXP_Kangaroo UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) Verse.ScribeExtractor:DefFromNode<Verse.ThingDef> (System.Xml.XmlNode) System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) System.Reflection.MethodBase:Invoke (object,object[]) Verse.GenGeneric:InvokeStaticGenericMethod (System.Type,System.Type,string,object[]) Verse.ScribeExtractor:DefFromNodeUnsafe<Verse.ThingDef> (System.Xml.XmlNode) Verse.Scribe_Collections:Look<Verse.ThingDef> (System.Collections.Generic.List`1<Verse.ThingDef>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<Verse.ThingDef> (System.Collections.Generic.HashSet`1<Verse.ThingDef>&,bool,string,Verse.LookMode) Verse.Scribe_Collections:Look<Verse.ThingDef> (System.Collections.Generic.HashSet`1<Verse.ThingDef>&,string,Verse.LookMode) Verse.ThingFilter:ExposeData () Verse.ScribeExtractor:SaveableFromNode<Verse.ThingFilter> (System.Xml.XmlNode,object[]) Verse.Scribe_Deep:Look<Verse.ThingFilter> (Verse.ThingFilter&,bool,string,object[]) Verse.Scribe_Deep:Look<Verse.ThingFilter> (Verse.ThingFilter&,string,object[]) RimWorld.Bill:ExposeData () RimWorld.Bill_Production:ExposeData () Verse.ScribeExtractor:SaveableFromNode<RimWorld.Bill> (System.Xml.XmlNode,object[]) Verse.Scribe_Collections:Look<RimWorld.Bill> (System.Collections.Generic.List`1<RimWorld.Bill>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<RimWorld.Bill> (System.Collections.Generic.List`1<RimWorld.Bill>&,string,Verse.LookMode,object[]) DubsMintMenus.FBenchTemplate:ExposeData () Verse.ScribeExtractor:SaveableFromNode<DubsMintMenus.FBenchTemplate> (System.Xml.XmlNode,object[]) Verse.Scribe_Collections:Look<DubsMintMenus.FBenchTemplate> (System.Collections.Generic.List`1<DubsMintMenus.FBenchTemplate>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<DubsMintMenus.FBenchTemplate> (System.Collections.Generic.List`1<DubsMintMenus.FBenchTemplate>&,string,Verse.LookMode,object[]) DubsMintMenus.Settings:ExposeData () Verse.ScribeExtractor:SaveableFromNode<DubsMintMenus.Settings> (System.Xml.XmlNode,object[]) Verse.Scribe_Deep:Look<DubsMintMenus.Settings> (DubsMintMenus.Settings&,bool,string,object[]) Verse.Scribe_Deep:Look<DubsMintMenus.Settings> (DubsMintMenus.Settings&,string,object[]) Verse.LoadedModManager:ReadModSettings<DubsMintMenus.Settings> (string,string) Verse.Mod:GetSettings<DubsMintMenus.Settings> () DubsMintMenus.DubsMintMenusMod:get_Settings () DubsMintMenus.HarmonyPatches/Patch_FinishProject:Prefix (bool&) (wrapper dynamic-method) RimWorld.ResearchManager:RimWorld.ResearchManager.FinishProject_Patch2 (RimWorld.ResearchManager,Verse.ResearchProjectDef,bool,Verse.Pawn) ResearchUtility:ApplyPlayerStartingResearch () Verse.Game:InitNewGame () Verse.Root_Play/<>c:<Start>b__1_2 () Verse.LongEventHandler:RunEventFromAnotherThread (System.Action) Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 () System.Threading.ThreadHelper:ThreadStart_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.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) System.Threading.ThreadHelper:ThreadStart () Could not load reference to Verse.ThingDef named Meat_AEXP_Koala UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) Verse.ScribeExtractor:DefFromNode<Verse.ThingDef> (System.Xml.XmlNode) System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) System.Reflection.MethodBase:Invoke (object,object[]) Verse.GenGeneric:InvokeStaticGenericMethod (System.Type,System.Type,string,object[]) Verse.ScribeExtractor:DefFromNodeUnsafe<Verse.ThingDef> (System.Xml.XmlNode) Verse.Scribe_Collections:Look<Verse.ThingDef> (System.Collections.Generic.List`1<Verse.ThingDef>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<Verse.ThingDef> (System.Collections.Generic.HashSet`1<Verse.ThingDef>&,bool,string,Verse.LookMode) Verse.Scribe_Collections:Look<Verse.ThingDef> (System.Collections.Generic.HashSet`1<Verse.ThingDef>&,string,Verse.LookMode) Verse.ThingFilter:ExposeData () Verse.ScribeExtractor:SaveableFromNode<Verse.ThingFilter> (System.Xml.XmlNode,object[]) Verse.Scribe_Deep:Look<Verse.ThingFilter> (Verse.ThingFilter&,bool,string,object[]) Verse.Scribe_Deep:Look<Verse.ThingFilter> (Verse.ThingFilter&,string,object[]) RimWorld.Bill:ExposeData () RimWorld.Bill_Production:ExposeData () Verse.ScribeExtractor:SaveableFromNode<RimWorld.Bill> (System.Xml.XmlNode,object[]) Verse.Scribe_Collections:Look<RimWorld.Bill> (System.Collections.Generic.List`1<RimWorld.Bill>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<RimWorld.Bill> (System.Collections.Generic.List`1<RimWorld.Bill>&,string,Verse.LookMode,object[]) DubsMintMenus.FBenchTemplate:ExposeData () Verse.ScribeExtractor:SaveableFromNode<DubsMintMenus.FBenchTemplate> (System.Xml.XmlNode,object[]) Verse.Scribe_Collections:Look<DubsMintMenus.FBenchTemplate> (System.Collections.Generic.List`1<DubsMintMenus.FBenchTemplate>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<DubsMintMenus.FBenchTemplate> (System.Collections.Generic.List`1<DubsMintMenus.FBenchTemplate>&,string,Verse.LookMode,object[]) DubsMintMenus.Settings:ExposeData () Verse.ScribeExtractor:SaveableFromNode<DubsMintMenus.Settings> (System.Xml.XmlNode,object[]) Verse.Scribe_Deep:Look<DubsMintMenus.Settings> (DubsMintMenus.Settings&,bool,string,object[]) Verse.Scribe_Deep:Look<DubsMintMenus.Settings> (DubsMintMenus.Settings&,string,object[]) Verse.LoadedModManager:ReadModSettings<DubsMintMenus.Settings> (string,string) Verse.Mod:GetSettings<DubsMintMenus.Settings> () DubsMintMenus.DubsMintMenusMod:get_Settings () DubsMintMenus.HarmonyPatches/Patch_FinishProject:Prefix (bool&) (wrapper dynamic-method) RimWorld.ResearchManager:RimWorld.ResearchManager.FinishProject_Patch2 (RimWorld.ResearchManager,Verse.ResearchProjectDef,bool,Verse.Pawn) ResearchUtility:ApplyPlayerStartingResearch () Verse.Game:InitNewGame () Verse.Root_Play/<>c:<Start>b__1_2 () Verse.LongEventHandler:RunEventFromAnotherThread (System.Action) Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 () System.Threading.ThreadHelper:ThreadStart_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.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) System.Threading.ThreadHelper:ThreadStart () Could not load reference to Verse.ThingDef named Meat_AEXP_Platypus UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) Verse.ScribeExtractor:DefFromNode<Verse.ThingDef> (System.Xml.XmlNode) System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) System.Reflection.MethodBase:Invoke (object,object[]) Verse.GenGeneric:InvokeStaticGenericMethod (System.Type,System.Type,string,object[]) Verse.ScribeExtractor:DefFromNodeUnsafe<Verse.ThingDef> (System.Xml.XmlNode) Verse.Scribe_Collections:Look<Verse.ThingDef> (System.Collections.Generic.List`1<Verse.ThingDef>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<Verse.ThingDef> (System.Collections.Generic.HashSet`1<Verse.ThingDef>&,bool,string,Verse.LookMode) Verse.Scribe_Collections:Look<Verse.ThingDef> (System.Collections.Generic.HashSet`1<Verse.ThingDef>&,string,Verse.LookMode) Verse.ThingFilter:ExposeData () Verse.ScribeExtractor:SaveableFromNode<Verse.ThingFilter> (System.Xml.XmlNode,object[]) Verse.Scribe_Deep:Look<Verse.ThingFilter> (Verse.ThingFilter&,bool,string,object[]) Verse.Scribe_Deep:Look<Verse.ThingFilter> (Verse.ThingFilter&,string,object[]) RimWorld.Bill:ExposeData () RimWorld.Bill_Production:ExposeData () Verse.ScribeExtractor:SaveableFromNode<RimWorld.Bill> (System.Xml.XmlNode,object[]) Verse.Scribe_Collections:Look<RimWorld.Bill> (System.Collections.Generic.List`1<RimWorld.Bill>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<RimWorld.Bill> (System.Collections.Generic.List`1<RimWorld.Bill>&,string,Verse.LookMode,object[]) DubsMintMenus.FBenchTemplate:ExposeData () Verse.ScribeExtractor:SaveableFromNode<DubsMintMenus.FBenchTemplate> (System.Xml.XmlNode,object[]) Verse.Scribe_Collections:Look<DubsMintMenus.FBenchTemplate> (System.Collections.Generic.List`1<DubsMintMenus.FBenchTemplate>&,bool,string,Verse.LookMode,object[]) Verse.Scribe_Collections:Look<DubsMintMenus.FBenchTemplate> (System.Collections.Generic.List`1<DubsMintMenus.FBenchTemplate>&,string,Verse.LookMode,object[]) DubsMintMenus.Settings:ExposeData () Verse.ScribeExtractor:SaveableFromNode<DubsMintMenus.Settings> (System.Xml.XmlNode,object[]) Verse.Scribe_Deep:Look<DubsMintMenus.Settings> (DubsMintMenus.Settings&,bool,string,object[]) Verse.Scribe_Deep:Look<DubsMintMenus.Settings> (DubsMintMenus.Settings&,string,object[]) Verse.LoadedModManager:ReadModSettings<DubsMintMenus.Settings> (string,string) Verse.Mod:GetSettings<DubsMintMenus.Settings> () DubsMintMenus.DubsMintMenusMod:get_Settings () DubsMintMenus.HarmonyPatches/Patch_FinishProject:Prefix (bool&) (wrapper dynamic-method) RimWorld.ResearchManager:RimWorld.ResearchManager.FinishProject_Patch2 (RimWorld.ResearchManager,Verse.ResearchProjectDef,bool,Verse.Pawn) ResearchUtility:ApplyPlayerStartingResearch () Verse.Game:InitNewGame () Verse.Root_Play/<>c:<Start>b__1_2 () Verse.LongEventHandler:RunEventFromAnotherThread (System.Action) Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__27_0 () System.Threading.ThreadHelper:ThreadStart_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.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) System.Threading.ThreadHelper:ThreadStart ()


So, as i found out this happens because of how Dubs Mint Menus stores cloned bills. It stores them in mod config file. The problem is that when you switch mods this stored data isn't updated accordingly nor missed items are ignored.

Proposed solutions:

1. Store cloned bills in save file. That doesn't fix the problem completely, but at least missing items will not affect other saves. I dont know if resaving will rewrite cloned bills, but if it will, then cloned bills will auto-fix themselves (because missing items will vanish). I know that storing wheel menu settings/cloned bills in save file can be inconvinient (you will have to configure wheel menu for every new playthrough), see next proposed solution.
2. Declare dependencies on bills/menu items in form of mod ids, and then load only that bills/wheel menu items that have their dependencies satisfied. This can lead to config bloat, so we also need a way to clear stored record.
3. Implement "Clear cloned bills" button in mod settings.
4. Just ignore missing items. I dont know if this is possible and it also leads to config bloat, because we still keep the items.

Also, the same problem may affect wheel menu. If this is true, then solution 3 needs to be changed to "Clear cloned bills/wheel menu settings" button.

I hope you understad what i wrote above. English is not my native language.

Also, thnak you for your wonderfull mods!
Last edited by Azzkiy; 13 Aug, 2021 @ 2:22am
< >
Showing 1-1 of 1 comments
Dubwise  [developer] 13 Aug, 2021 @ 7:50am 
you should only get an error once when removing a mod thats saved in a cloned table, it strips the missing defs from the cloned bench bills list on load so you dont get any errors in game, you probably just need to do something to trigger a settings save like just open and close the mod settings page
< >
Showing 1-1 of 1 comments
Per page: 1530 50