RimWorld

RimWorld

XVI-MECHFRAME
Taelim 16 Mar, 2024 @ 10:02am
Incompatibility with Reconditioning Pod
I had been wondering why XVI Mechframes wasn't working with my modlist, but, with it being a 400+ modlist, I had given up on finding the issue, so I settled with removing XVI Mechframes.

This was a year ago, and, after encountering the issue again, I performed some more experimentation. As it turns out, the incompatibility is with [PS] Reconditioning Pod (Continued).

Here is my modlist that I used to test this:

Harmony
Core
Royalty [Official DLC]
Ideology [Official DLC]
Biotech [Official DLC]
Log Publisher from HugsLib
XVI-MECHFRAME
Plasteel Surgery (Continued)
[PS] Reconditioning Pod (Continued)

When a game is run with this modlist (including on dev quickstart), the screen will turn black apart from UI elements, no time will pass, and the following error will be thrown every tick:

Root level exception in Update(): System.InvalidCastException: Specified cast is not valid. at Verse.RecipeDef.get_Worker () [0x00014] in <cd7169108ea74757aa50c5b33d275c15>:0 at MParmorLibrary.DefGenerator_NoStaticConstructor.Invoke () [0x00035] in <3802c1641d2e44948e3696a5486535f3>:0 at MParmorLibrary.SingleObject.AcquisitionManagement.Tick () [0x0001f] in <3802c1641d2e44948e3696a5486535f3>:0 at MParmorLibrary.Patches.DoSingleTick+DoSingleTick_PreFix.PreFix () [0x00006] in <3802c1641d2e44948e3696a5486535f3>:0 at (wrapper dynamic-method) Verse.TickManager.Verse.TickManager.DoSingleTick_Patch1(Verse.TickManager) at Verse.TickManager.TickManagerUpdate () [0x0006f] in <cd7169108ea74757aa50c5b33d275c15>:0 at Verse.Game.UpdatePlay () [0x00018] in <cd7169108ea74757aa50c5b33d275c15>:0 at Verse.Root_Play.Update () [0x00032] in <cd7169108ea74757aa50c5b33d275c15>:0 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

Furthermore, this error appears on startup:

Error in static constructor of MParmorLibrary.DefGenerator: System.TypeInitializationException: The type initializer for 'MParmorLibrary.DefGenerator' threw an exception. ---> System.InvalidCastException: Specified cast is not valid. at Verse.RecipeDef.get_Worker () [0x00014] in <cd7169108ea74757aa50c5b33d275c15>:0 at MParmorLibrary.DefGenerator_NoStaticConstructor.Invoke () [0x00035] in <3802c1641d2e44948e3696a5486535f3>:0 at MParmorLibrary.DefGenerator..cctor () [0x00001] in <3802c1641d2e44948e3696a5486535f3>: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 (wrapper dynamic-method) Verse.StaticConstructorOnStartupUtility.Verse.StaticConstructorOnStartupUtility.CallAll_Patch1() (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

After some testing, I have confirmed the following things:

1. The load order doesn't seem to matter. This issue happens regardless of whether XVI Mechframes is above or below Reconditioning Pod
2. XVI Mechframes is perfectly compatible with Plasteel Surgery. It's when you also add Reconditioning Pod that this issue happens. Again, the load order doesn't seem to matter.

Here is the full hugslog, in case that's still needed: https://pastebin.com/npe7sUDc
Last edited by Taelim; 16 Mar, 2024 @ 10:04am