RimWorld

RimWorld

4M Mehni's Misc Modifications [1.2-1.4]
 This topic has been pinned, so it's probably important
Miyuri  [developer] Sep 14, 2020 @ 5:52am
Errors, bugs and glitches here, please!
Your help squashing bugs and improving performance is greatly appreciated. If you are experiencing a glitch, unresonable lag, or if you stumbled on an error you think was caused by this mod, please try this. (You'll need HugsLib to submit error logs, if don't have it already installed.)
  1. Save that game right away in a separate file. If you can, make a copy of your last autosave as well. This way you can always find that bug again when you want to test it out and check if its solved.
  2. Double check if you're running the latest version for both RimWorld and this mod.
  3. Double check if this mod is loaded in the correct order (check the description).
  4. Reset your mod list to core only, restart the game, add back HugsLib followed by this mod and restart again. Turn on the developer tools on options and click on that quickstart button at the top of your screen to generate a new game quickly (pick the smallest map for speed).
  5. Try to reproduce what you were doing when the error happened. Use the god mode if you have to build stuff and the debug actions menu if you need to. If its an error on load, you can save this game and try reloading it to test it out. If it doesn't happen, then it's something else, keep reading. If the error pops up, hit CTRL+F12, upload the log and post that link down here.
  6. Back on the mod list, try adding any other mod you were using. Add one by one, restarting and repeating step 5 until you cause that error again. When it happens, hit CTRL+F12, upload the log and post that link down here. Yes, it might take a while if you're using too many mods... but you can also add a bunch at a time and, when that error pops up, you'll be able to refine your search to those last mods you added.
  7. If you can't reproduce it, even with your full mod list reloaded, maybe you already fixed it! In that case, just keep your eyes open. If it happens again, take note of what was happening at the time and go back to step 4.

If you need help reproducing the error, give me a shout and I'll gladly help.

Once you can pin it down, write down here what, when and how it happens and we'll work it out. Please, include the links for that error log and for any conflicting mod you discovered, ok?

Thanks!

(Original text by jptrrs)
Last edited by Miyuri; Sep 14, 2020 @ 5:54am
< >
Showing 1-15 of 27 comments
AzraelTitanbane Mar 7, 2021 @ 3:09pm 
I'm kind of confused, I don't know if this is the best place to put it, but I can't seem to get any other quality except for normal with the mod enabled. I have legendary quality force enabled, but it still always comes out. I thought it was because you have to set the item your building, but even with that it doesn't work, it always comes out as normal. Also, do you have to set a specific item, or does it make all items you build in dev mode legendary?
Sophoto7 Apr 10, 2021 @ 7:02am 
I'm not sure if this mod was the culprit but it does seem likely - I was getting dropped frames for the first time shortly after loading it and a few others so removed this mod, things were smooth again until I tried to reform a caravan and it wouldn't let me, I'm getting the alert "must asign at least one non downed colonist" and the item choices layout goes all buggy straight after. The only way around it seems to be I don't choose what is brought with them. This wasn't an issue while the mod was running but after removing only this mod it started happening. I tried restarting to no avail, then added the mod again but the problem still persists (and I don't believe I'd changed any of the mod options...) any pointers?
Last edited by Sophoto7; Apr 10, 2021 @ 10:09am
Miyuri  [developer] Apr 15, 2021 @ 12:19am 
Originally posted by LemonTart:
I'm not sure if this mod was the culprit but it does seem likely - I was getting dropped frames for the first time shortly after loading it and a few others so removed this mod, things were smooth again until I tried to reform a caravan and it wouldn't let me, I'm getting the alert "must asign at least one non downed colonist" and the item choices layout goes all buggy straight after. The only way around it seems to be I don't choose what is brought with them. This wasn't an issue while the mod was running but after removing only this mod it started happening. I tried restarting to no avail, then added the mod again but the problem still persists (and I don't believe I'd changed any of the mod options...) any pointers?
This mod has nothing to do with caravan since I have removed it. Did you use an older version?
The1nk Apr 18, 2021 @ 11:39am 
This mod causes logging to completely stop if you open the game *normally* and load a save. Any logging happening in that session will not be written to Player.log. Really sucked tracking that down while trying to work on my mod :D
The1nk Apr 18, 2021 @ 11:40am 
ohhh i meant to add, for some reason starting a new game doesn't have the same behavior.
Kaedys Aug 2, 2021 @ 4:05pm 
Why is the ranged DPS value counting travel time in it? That time overlaps with the cooldown time, it's not actually a factor in damage per second, because the weapon doesn't have to wait for the round to hit before starting cooldown. So the travel time is effectively counted twice. This is artificially lowering displayed DPS, and suggesting weapons with slower projectiles are worse at DPS, when in fact DPS is not based on travel time at all.

The DPS of a weapon is Damage * Accuracy * (60 / (WarmupTicks + CooldownTicks + BurstTicks * (BurstCount - 1)). Travel time isn't even a factor in it.

Edit: here's an example, I ran a quick patch on this weapon to have a 0.5 projectile speed, but left all of the other stats the same. The mod now thinks the weapon does 3.08 DPS at Touch, when it should be reporting 11.55. 9 damage per shot * 6 projectile = 54 damage per burst. 60 ticks warmup, 102 ticks cooldown, 8 ticks burst * 5 burst count less one = 202 ticks total firing cycle. 72% accuracy at Touch. (54 * 0.72) / (202/60) = 11.5485.

Your mod is factoring in the 10.00s travel time, but as the second image shows, there's 3 volleys in the air and the pawn is aiming for a 4th, clearly showing that the travel time is overlapping with the cooldown (and the subsequence warmup and such, because it's so long). It'll take a good 2 minutes for those rounds to get to his target in this exaggerated example, but once the first burst gets there, it'll be doing 11.54 DPS, not 3.08. In more realistic examples, the projectile(s) would strike the target somewhere during the cooldown or possibly the following warmup, depending on speed and their tick lengths. It'd only be valid to include the travel time in the DPS equation if the cooldown didn't start until the projectile hit the target (which isn't the case, as evidenced in the screenshot).

https://imgur.com/a/dIabR9O
Last edited by Kaedys; Aug 2, 2021 @ 4:33pm
Hi, in mod settings tooltips show wildly offseted and I cannot select different mod with topleft button
Kayedon Oct 12, 2021 @ 8:49pm 
Just want to help you get prepared for the next RimWorld update (soon).

Exception occurred processing mod finalize events! Details: System.TypeInitializationException: The type initializer for 'Mehni.Misc.Modifications.HarmonyPatches' threw an exception. ---> System.FormatException: Method virtual System.Void RimWorld.Dialog_AssignBuildingOwner::DoWindowContents(UnityEngine.Rect inRect) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) RimWorld.Dialog_AssignBuildingOwner:RimWorld.Dialog_AssignBuildingOwner.DoWindowContents_Patch0 (RimWorld.Dialog_AssignBuildingOwner,UnityEngine.Rect): IL_022a: ldfld 0x00000073


at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x0008c] in <c38a8c3281a047488dac8c9d063b7abb>:0
at HarmonyLib.PatchProcessor.Patch () [0x000fc] in <c38a8c3281a047488dac8c9d063b7abb>:0
at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <c38a8c3281a047488dac8c9d063b7abb>:0
at Mehni.Misc.Modifications.HarmonyPatches..cctor () [0x001dd] in <acf8997ad89f4326bbb89d838e1afb11>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle type) [0x0002a] in <eae584ce26bc40229c1b1aa476bfa589>:0
at BetterLoading.Stage.InitialLoad.StageRunStaticCctors+<StaticConstructAll>d__16.MoveNext () [0x00073] in <1b38b4c8227d46ebb2bf64926b6f02ea>:0

Is an ongamestart error in the latest unstable. May present a problem down the road, may not. No way to be sure until the next version is officially released.
Kayedon Oct 13, 2021 @ 7:17pm 
Yeah, unfortunately a similar error pops up when pressing "Next" on the Ideology acceptance screen, if choosing Classic:

Exception filling window for RimWorld.Page_ChooseIdeoPreset: System.TypeInitializationException: The type initializer for 'Mehni.Misc.Modifications.HarmonyPatches' threw an exception. ---> System.FormatException: Method virtual System.Void RimWorld.Dialog_AssignBuildingOwner::DoWindowContents(UnityEngine.Rect inRect) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) RimWorld.Dialog_AssignBuildingOwner:RimWorld.Dialog_AssignBuildingOwner.DoWindowContents_Patch0 (RimWorld.Dialog_AssignBuildingOwner,UnityEngine.Rect): IL_022a: ldfld 0x00000073 at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x0008c] in <c38a8c3281a047488dac8c9d063b7abb>:0 at HarmonyLib.PatchProcessor.Patch () [0x000fc] in <c38a8c3281a047488dac8c9d063b7abb>:0 at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <c38a8c3281a047488dac8c9d063b7abb>:0 at Mehni.Misc.Modifications.HarmonyPatches..cctor () [0x001dd] in <acf8997ad89f4326bbb89d838e1afb11>:0 --- End of inner exception stack trace --- at (wrapper dynamic-method) Verse.StartingPawnUtility.Verse.StartingPawnUtility.NewGeneratedStartingPawn_Patch0() at RimWorld.ScenPart_ConfigPage_ConfigureStartingPawns.PostIdeoChosen () [0x000ad] in <07139c9313c8429e9fbd460b049b5df4>:0 at RimWorld.Scenario.PostIdeoChosen () [0x00014] in <07139c9313c8429e9fbd460b049b5df4>:0 at RimWorld.Page_ChooseIdeoPreset.DoClassic () [0x0000f] in <07139c9313c8429e9fbd460b049b5df4>:0 at RimWorld.Page_ChooseIdeoPreset.DoWindowContents (UnityEngine.Rect inRect) [0x001ce] in <07139c9313c8429e9fbd460b049b5df4>:0 at (wrapper dynamic-method) Verse.Window.Verse.Window.InnerWindowOnGUI_Patch0(Verse.Window,int) UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch3 (string) (wrapper dynamic-method) Verse.Window:Verse.Window.InnerWindowOnGUI_Patch0 (Verse.Window,int) UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
Mouse position stack is not empty. There were more calls to BeginScrollView than EndScrollView. Fixing. UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch3 (string) Verse.Widgets:EnsureMousePositionStackEmpty () (wrapper dynamic-method) Verse.Root:Verse.Root.Update_Patch1 (Verse.Root) (wrapper dynamic-method) Verse.Root_Entry:Verse.Root_Entry.Update_Patch0 (Verse.Root_Entry)

Or after choosing Fluid, choosing your Structure, Memes, and Precepts:

Exception filling window for RimWorld.Page_ConfigureFluidIdeo: System.TypeInitializationException: The type initializer for 'Mehni.Misc.Modifications.HarmonyPatches' threw an exception. ---> System.FormatException: Method virtual System.Void RimWorld.Dialog_AssignBuildingOwner::DoWindowContents(UnityEngine.Rect inRect) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) RimWorld.Dialog_AssignBuildingOwner:RimWorld.Dialog_AssignBuildingOwner.DoWindowContents_Patch0 (RimWorld.Dialog_AssignBuildingOwner,UnityEngine.Rect): IL_022a: ldfld 0x00000073 at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x0008c] in <c38a8c3281a047488dac8c9d063b7abb>:0 at HarmonyLib.PatchProcessor.Patch () [0x000fc] in <c38a8c3281a047488dac8c9d063b7abb>:0 at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <c38a8c3281a047488dac8c9d063b7abb>:0 at Mehni.Misc.Modifications.HarmonyPatches..cctor () [0x001dd] in <acf8997ad89f4326bbb89d838e1afb11>:0 --- End of inner exception stack trace --- at (wrapper dynamic-method) Verse.StartingPawnUtility.Verse.StartingPawnUtility.NewGeneratedStartingPawn_Patch0() at RimWorld.ScenPart_ConfigPage_ConfigureStartingPawns.PostIdeoChosen () [0x000ad] in <07139c9313c8429e9fbd460b049b5df4>:0 at RimWorld.Scenario.PostIdeoChosen () [0x00014] in <07139c9313c8429e9fbd460b049b5df4>:0 at RimWorld.Page_ConfigureIdeo.CanDoNext () [0x001cf] in <07139c9313c8429e9fbd460b049b5df4>:0 at (wrapper dynamic-method) RimWorld.Page.RimWorld.Page.DoBottomButtons_Patch1(RimWorld.Page,UnityEngine.Rect,string,string,System.Action,bool,bool) at RimWorld.Page_ConfigureIdeo.DoWindowContents (UnityEngine.Rect rect) [0x00275] in <07139c9313c8429e9fbd460b049b5df4>:0 at (wrapper dynamic-method) Verse.Window.Verse.Window.InnerWindowOnGUI_Patch0(Verse.Window,int) UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch3 (string) (wrapper dynamic-method) Verse.Window:Verse.Window.InnerWindowOnGUI_Patch0 (Verse.Window,int) UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

Or just any progression at all to begin a new game with this mod on the latest unstable. Unsure what else to do other than report it this way, let me know if I can help any other way.
Luca Oct 15, 2021 @ 8:19pm 
i cant generate a new world i get an error an get kicked back to the faction screen:

Exception from asynchronous event: System.TypeInitializationException: The type initializer for 'Mehni.Misc.Modifications.HarmonyPatches' threw an exception. ---> System.FormatException: Method virtual System.Void RimWorld.Dialog_AssignBuildingOwner::DoWindowContents(UnityEngine.Rect inRect) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) RimWorld.Dialog_AssignBuildingOwner:RimWorld.Dialog_AssignBuildingOwner.DoWindowContents_Patch0 (RimWorld.Dialog_AssignBuildingOwner,UnityEngine.Rect): IL_022a: ldfld 0x00000073
Mordolinaaa Oct 18, 2021 @ 7:29am 
I get the same bug as the person above, but with different errors.
1.3.3146 unstable build.
https://gist.github.com/HugsLibRecordKeeper/00a135388fea2ad3b3cf2b8b4c176418
Miyuri  [developer] Oct 19, 2021 @ 5:02pm 
Hey guys,
I've reported this bug to Mehni because currently I have no extra time to do modding.
After he finished this bug, I will upload the new version ASAP.
Res Oct 28, 2021 @ 8:21am 
Hi! Not sure if this one has been reported already, but this mod seems to break friendly caravan arrival -- you'll get a notification, they'll spawn on the edge of the map, and then immediately turn around and leave. I'm not 100% sure it was this mod doing it, but I've removed it from the list and it seems to have fixed the problem. I am not running either of the DLCs. Thought I'd report it here, in case anyone was having the same problem. This seemed to become an issue after the recent ideology-related patch. There was also an issue where menus would often go blank when I scrolled. Log (relevant stuff should be right at the bottom, around line 2407 and after):

https://gist.github.com/HugsLibRecordKeeper/79059db5f5e55ba5d460e1f947bf853f
shaedlaer Oct 29, 2021 @ 7:12pm 
Game throws exceptions every few seconds for every drafted pawn. This started after latest base game update.

Exception ticking CrafterHunter (at (143, 0, 5)): System.TypeInitializationException: The type initializer for 'Mehni.Misc.Modifications.HarmonyPatches' threw an exception. ---> System.FormatException: Method virtual System.Void RimWorld.Dialog_AssignBuildingOwner::DoWindowContents(UnityEngine.Rect inRect) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) RimWorld.Dialog_AssignBuildingOwner:RimWorld.Dialog_AssignBuildingOwner.DoWindowContents_Patch0 (RimWorld.Dialog_AssignBuildingOwner,UnityEngine.Rect): IL_022a: ldfld 0x00000073


at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x0008c] in <c38a8c3281a047488dac8c9d063b7abb>:0
at HarmonyLib.PatchProcessor.Patch () [0x000fc] in <c38a8c3281a047488dac8c9d063b7abb>:0
at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <c38a8c3281a047488dac8c9d063b7abb>:0
at Mehni.Misc.Modifications.HarmonyPatches..cctor () [0x001dd] in <acf8997ad89f4326bbb89d838e1afb11>:0
--- End of inner exception stack trace ---
at (wrapper dynamic-method) Verse.Pawn.Verse.Pawn.Tick_Patch1(Verse.Pawn)
at (wrapper dynamic-method) Verse.TickList.Verse.TickList.Tick_Patch2(Verse.TickList)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch0 (string)
(wrapper dynamic-method) Verse.TickList:Verse.TickList.Tick_Patch2 (Verse.TickList)
(wrapper dynamic-method) Verse.TickManager:Verse.TickManager.DoSingleTick_Patch5 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) Verse.Game:Verse.Game.UpdatePlay_Patch3 (Verse.Game)
(wrapper dynamic-method) Verse.Root_Play:Verse.Root_Play.Update_Patch0 (Verse.Root_Play)
Azraile Oct 30, 2021 @ 2:10am 
Getting this red error all the time




Error in static constructor of Mehni.Misc.Modifications.HarmonyPatches: System.TypeInitializationException: The type initializer for 'Mehni.Misc.Modifications.HarmonyPatches' threw an exception. ---> System.FormatException: Method virtual System.Void RimWorld.Dialog_AssignBuildingOwner::DoWindowContents(UnityEngine.Rect inRect) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) RimWorld.Dialog_AssignBuildingOwner:RimWorld.Dialog_AssignBuildingOwner.DoWindowContents_Patch0 (RimWorld.Dialog_AssignBuildingOwner,UnityEngine.Rect): IL_022a: ldfld 0x00000073


at HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) [0x0008c] in <c38a8c3281a047488dac8c9d063b7abb>:0
at HarmonyLib.PatchProcessor.Patch () [0x000fc] in <c38a8c3281a047488dac8c9d063b7abb>:0
at HarmonyLib.Harmony.Patch (System.Reflection.MethodBase original, HarmonyLib.HarmonyMethod prefix, HarmonyLib.HarmonyMethod postfix, HarmonyLib.HarmonyMethod transpiler, HarmonyLib.HarmonyMethod finalizer) [0x00028] in <c38a8c3281a047488dac8c9d063b7abb>:0
at Mehni.Misc.Modifications.HarmonyPatches..cctor () [0x001dd] in <acf8997ad89f4326bbb89d838e1afb11>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(intptr)
at (wrapper dynamic-method) System.Runtime.CompilerServices.RuntimeHelpers.System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor_Patch1(System.RuntimeTypeHandle)
at StartupImpact.Patch.StaticConstructorOnStartupUtilityCallAll.Prefix () [0x00059] in <844a17ebd71c4d8bb5a7958aa41b3802>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch3 (string)
StartupImpact.Patch.StaticConstructorOnStartupUtilityCallAll:Prefix ()
(wrapper dynamic-method) Verse.StaticConstructorOnStartupUtility:Verse.StaticConstructorOnStartupUtility.CallAll_Patch2 ()
Verse.PlayDataLoader/<>c:<DoPlayLoad>b__4_3 ()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent ()
Verse.LongEventHandler:LongEventsUpdate (bool&)
(wrapper dynamic-method) Verse.Root:Verse.Root.Update_Patch1 (Verse.Root)
Verse.Root_Entry:Update ()
< >
Showing 1-15 of 27 comments
Per page: 1530 50