RimWorld

RimWorld

EBSG Framework
This topic has been locked
Equipment Restricting problems
When using requiredGenesToEquip out of Equipment Restricting, everything works fine, but when using requireOneOfGenesToEquip(it doesn't matter whether the pawn has one of the necessary genes or not.).

An example of how I code:
1)Working
<modExtensions>
<li Class="EBSGFramework.EquipRestrictExtension">
<requiredGenesToEquip>
<li>OE_Web</li>
</requiredGenesToEquip>
</li>
</modExtensions>

2)Not working
<modExtensions>
<li Class="EBSGFramework.EquipRestrictExtension">
<requireOneOfGenesToEquip>
<li>OE_Web</li>
<li>OE_WebTrap</li>
</requireOneOfGenesToEquip>
</li>
</modExtensions>

Error I get when trying to use an item as a pawn:
Error in FloatMenuWorker FloatMenuOptionProvider_Equip: System.NullReferenceException: Object reference not set to an instance of an object [Ref 99395EC5] Duplicate stacktrace, see ref for original UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch2 (string) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.FloatMenuMakerMap.GetProviderOptions_Patch1 (RimWorld.FloatMenuContext,System.Collections.Generic.List`1<Verse.FloatMenuOption>) RimWorld.FloatMenuMakerMap:GetOptions (System.Collections.Generic.List`1<Verse.Pawn>,UnityEngine.Vector3,RimWorld.FloatMenuContext&) Verse.FloatMenuMap:DoWindowContents (UnityEngine.Rect) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Window.InnerWindowOnGUI_Patch1 (Verse.Window,int) UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
< >
Showing 1-4 of 4 comments
Alite  [developer] 3 Sep @ 3:23pm 
I'll have a fix out shortly, though as an important aside, if the error says "Duplicate stacktrace, see ref for original" you'll want to scroll up in your log for the first instance of whatever Ref ID they gave it, While it wasn't needed in this case because there was only one thing I had that could break it, the original has a slightly more thorough list of the thought process leading up to the error which can help narrow down the exact point where everything suddenly failed
Lored 3 Sep @ 3:58pm 
Originally posted by Alite:
I'll have a fix out shortly, though as an important aside, if the error says "Duplicate stacktrace, see ref for original" you'll want to scroll up in your log for the first instance of whatever Ref ID they gave it, While it wasn't needed in this case because there was only one thing I had that could break it, the original has a slightly more thorough list of the thought process leading up to the error which can help narrow down the exact point where everything suddenly failed
Yes, it's my bad. That's the first error part.
Error in FloatMenuWorker FloatMenuOptionProvider_Equip: System.NullReferenceException: Object reference not set to an instance of an object [Ref 99395EC5] at EBSGFramework.HarmonyPatches.CanEquipPostfix (System.Boolean& __result, Verse.Thing thing, Verse.Pawn pawn, System.String& cantReason) [0x002d4] in <0a747b0bf921436ab7b5df483426d23f>:0 at RimWorld.EquipmentUtility.CanEquip (Verse.Thing thing, Verse.Pawn pawn, System.String& cantReason, System.Boolean checkBonded) [0x00199] in <24d25868955f4df08b02c73b55f389fe>:0 - POSTFIX OskarPotocki.VEF: Void VEF.Weapons.VanillaExpandedFramework_EquipmentUtility_CanEquip_Patch:Postfix(Boolean& __result, Thing thing, Pawn pawn, String& cantReason, Boolean checkBonded) - POSTFIX Rimworld.Alite.EBSG.main: Void EBSGFramework.HarmonyPatches:CanEquipPostfix(Boolean& __result, Thing thing, Pawn pawn, String& cantReason) at RimWorld.FloatMenuOptionProvider_Equip.GetSingleOptionFor (Verse.Thing clickedThing, RimWorld.FloatMenuContext context) [0x00338] in <24d25868955f4df08b02c73b55f389fe>:0 - PREFIX OskarPotocki.VEF: Void VEF.Weapons.VanillaExpandedFramework_FloatMenuOptionProvider_Equip_GetSingleOptionFor_Patch:Prefix(FloatMenuContext context) - POSTFIX OskarPotocki.VEF: Void VEF.Weapons.VanillaExpandedFramework_FloatMenuOptionProvider_Equip_GetSingleOptionFor_Patch:Postfix() - POSTFIX OskarPotocki.VEF: Void VEF.Apparels.VanillaExpandedFramework_FloatMenuOptionProvider_Equip_GetSingleOptionFor_Patch:Postfix(FloatMenuOption __result, Thing clickedThing, FloatMenuContext context) at RimWorld.FloatMenuOptionProvider+<GetOptionsFor>d__22.MoveNext () [0x0001e] in <24d25868955f4df08b02c73b55f389fe>:0 at RimWorld.FloatMenuMakerMap.GetProviderOptions (RimWorld.FloatMenuContext context, System.Collections.Generic.List`1[T] options) [0x000ed] in <24d25868955f4df08b02c73b55f389fe>:0 - TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original) UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch2 (string) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.FloatMenuMakerMap.GetProviderOptions_Patch1 (RimWorld.FloatMenuContext,System.Collections.Generic.List`1<Verse.FloatMenuOption>) RimWorld.FloatMenuMakerMap:GetOptions (System.Collections.Generic.List`1<Verse.Pawn>,UnityEngine.Vector3,RimWorld.FloatMenuContext&) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Selector.HandleMapClicks_Patch2 (RimWorld.Selector) RimWorld.Selector:SelectorOnGUI () RimWorld.MapInterface:HandleLowPriorityInput () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.UIRoot_Play.UIRootOnGUI_Patch1 (RimWorld.UIRoot_Play) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root.OnGUI_Patch3 (Verse.Root)
Alite  [developer] 3 Sep @ 4:13pm 
Looks like my fix should work once it's uploaded. I'm still finishing up the wiki stuff
Lored 3 Sep @ 4:22pm 
Originally posted by Alite:
Looks like my fix should work once it's uploaded. I'm still finishing up the wiki stuff
No worries, and most importantly, don't rush. The wiki is an important part.
In any case, I am very grateful for the wonderful and multifunctional mod and the good, detailed wiki :slimetabby:
< >
Showing 1-4 of 4 comments
Per page: 1530 50