vegapnk / RJW-Genes

Rimworld Biotech Genes related to RJW
MIT License
24 stars 28 forks source link

Hive-Based Gene Inheritance Failing #77

Closed thelyric27 closed 1 month ago

thelyric27 commented 4 months ago

I've been trying for a bit to understand how the hive system works so I can make my own set of xenotypes based off of it, but so far all of my attempts have ended with my pawn's eggs hatching into blank baseliner babies with no parents. I had mentioned it in the RJW discord and was thinking of dm'ing the mod author for advice because I thought it was something I was doing wrong, but I wanted to double-check to see if it was bugged. So I started a new test run with the packaged scenario and xenotypes, snuck my five hive members into a cave between two insectoid hives, walled the rest of the map off and let them all bang while I barely kept them fed. After ten days, the hiveguard and the breeder hatched a baby each and they were both blank baseliners. Interestingly, one of the megascarabs that spawned as a tame pet also hatched one too. The only thing I'd changed this time was I set the egg gestation speed to 50% in the RJW settings, so that I wouldn't have to wait 20+ days in debug mode and could just play the game somewhat naturally otherwise. There wasn't any errors popping up in the log when the births happened, so I dug into the log myself and found this earlier on, I'm guessing when I loaded the save:

Error in static constructor of RJW_Genes.HarmonyInit: System.TypeInitializationException: The type initializer for 'RJW_Genes.HarmonyInit' threw an exception. ---> HarmonyLib.HarmonyException: Patching exception in method null ---> System.ArgumentException: Undefined target method for patch method static System.Void RJW_Genes.Patch_InsectEgg_BirthBaby_SetHiveGenes::HandleHiveBasedInheritance(Verse.Thing& __result, rjw.Hediff_InsectEgg& __instance) at HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase& lastOriginal) [0x00047] in <255414689d344b1385ae719f6cce8c55>:0 at HarmonyLib.PatchClassProcessor.Patch () [0x00068] in <255414689d344b1385ae719f6cce8c55>:0 --- End of inner exception stack trace --- at HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) [0x00127] in <255414689d344b1385ae719f6cce8c55>:0 at HarmonyLib.PatchClassProcessor.Patch () [0x00093] in <255414689d344b1385ae719f6cce8c55>:0 at HarmonyLib.Harmony.<PatchAll>b__10_0 (System.Type type) [0x00007] in <255414689d344b1385ae719f6cce8c55>:0 at HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable1[T] sequence, System.Action1[T] action) [0x00014] in <255414689d344b1385ae719f6cce8c55>:0 at HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) [0x00006] in <255414689d344b1385ae719f6cce8c55>:0 at HarmonyLib.Harmony.PatchAll () [0x0001b] in <255414689d344b1385ae719f6cce8c55>:0 at RJW_Genes.HarmonyInit..cctor () [0x00016] in <60ac45948c154fe6924434a0fe654285>: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_Patch4() (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)

Other than that, the only other thing of note I found in the log about RJW Genes was this:

[RJW-Genes] RJW-Genes loaded [RJW-Genes] 1 Queen-Xenotypes (rjw_genes_halamyr_queen_xenotype) [RJW-Genes] 2 Drone-Xenotypes (rjw_genes_halamyr_hiveguard_xenotype,rjw_genes_halamyr_breeder_xenotype) [RJW-Genes] Found 1 Queen-Worker Mappings (rjw_genes_halamyr_queen_xenotype + Default) [RJW-Genes] Found 2 OffspringChanceDefs, of which 1 had faulty chances (rjw_genes_test_queen_offspring_chances)

So it seems like it's detecting the xenotypes fine, but one of the sets of offspring chances is faulty? I'm guessing it's the test one the error refers to, so I'm not sure it's relevant.

I'll include the whole log itself too:

Player.log

And the modlist:

modlist.txt