RimWorld

RimWorld

Xenotype Spawn Control
[Bug Report?]
I'm having this issue where in the mod settings, percentages for the xenotypes are missing and so I cannot edit them, unfortunately rendering the mod useless. I've never had this problem before, until today -- is this an easy fix? I've tried deleting the file from the folder and resetting everything, but nothing's worked so far.
< >
Showing 1-7 of 7 comments
vevi33 10 Jul @ 4:02pm 
Same here unfortunately. :/ It was working for a while, but it always stops working after playing a bit.
vevi33 11 Jul @ 4:52am 
LOG:

System.ArgumentException: Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: 'System.Comparison`1[System.ValueTuple`2[XenotypeSpawnControl.ModifiableXenotype,XenotypeSpawnControl.XenotypeChance]]'.
[Ref ECB9556D]
at System.Collections.Generic.IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer (System.Object comparer) [0x0000b] in <51fded79cd284d4d911c5949aff4cb21>:0
at System.Collections.Generic.ArraySortHelper`1[T].Sort (T[] keys, System.Int32 index, System.Int32 length, System.Comparison`1[T] comparer) [0x0000c] in <51fded79cd284d4d911c5949aff4cb21>:0
at System.Collections.Generic.List`1[T].Sort (System.Comparison`1[T] comparison) [0x00013] in <51fded79cd284d4d911c5949aff4cb21>:0
at XenotypeSpawnControl.ModSettingsWindow+Tab`1[T].ListXenotypes (UnityEngine.Rect outRect) [0x000da] in G:\Program Files (x86)\SteamLibrary\steamapps\common\RimWorld\Mods\Xenotype Spawn Control\Source\ModSettingsWindow.cs:192
at XenotypeSpawnControl.ModSettingsWindow+Tab`1[T].DoWindowContents (UnityEngine.Rect inRect) [0x00028] in G:\Program Files (x86)\SteamLibrary\steamapps\common\RimWorld\Mods\Xenotype Spawn Control\Source\ModSettingsWindow.cs:123
at XenotypeSpawnControl.ModSettingsWindow.DoWindowContents (UnityEngine.Rect inRect) [0x0010e] in G:\Program Files (x86)\SteamLibrary\steamapps\common\RimWorld\Mods\Xenotype Spawn Control\Source\ModSettingsWindow.cs:74
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
XenotypeSpawnControl.ModSettingsWindow:DoWindowContents (UnityEngine.Rect) (at G:/Program Files (x86)/SteamLibrary/steamapps/common/RimWorld/Mods/Xenotype Spawn Control/Source/ModSettingsWindow.cs:78)
XenotypeSpawnControl.XenotypeDiversityMod:DoSettingsWindowContents (UnityEngine.Rect) (at G:/Program Files (x86)/SteamLibrary/steamapps/common/RimWorld/Mods/Xenotype Spawn Control/Source/XenotypeDiversityMod.cs:35)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Dialog_ModSettings.DoWindowContents_Patch1 (RimWorld.Dialog_ModSettings,UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

System.ArgumentException: Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: 'System.Comparison`1[System.ValueTuple`2[XenotypeSpawnControl.ModifiableXenotype,XenotypeSpawnControl.XenotypeChance]]'.
[Ref ECB9556D] Duplicate stacktrace, see ref for original
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
XenotypeSpawnControl.ModSettingsWindow:DoWindowContents (UnityEngine.Rect) (at G:/Program Files (x86)/SteamLibrary/steamapps/common/RimWorld/Mods/Xenotype Spawn Control/Source/ModSettingsWindow.cs:78)
XenotypeSpawnControl.XenotypeDiversityMod:DoSettingsWindowContents (UnityEngine.Rect) (at G:/Program Files (x86)/SteamLibrary/steamapps/common/RimWorld/Mods/Xenotype Spawn Control/Source/XenotypeDiversityMod.cs:35)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Dialog_ModSettings.DoWindowContents_Patch1 (RimWorld.Dialog_ModSettings,UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
Ayomi 12 Jul @ 12:57am 
Same bug here. It was working fine and I was able to adjust the xenotype percentages, but then after playing around with some custom Xenotypes (I deleted a few of the custom ones) I was no longer able to see the faction percentages. The screen was blank. I even tried resetting all the mod settings and restarting the game, but it still does not work.

The error in the logs is the same as posted above.
Ayomi 12 Jul @ 9:47am 
After some tinkering I can reproduce this issue fairly consistently (and fix it in my case).

To cause the error, create a few custom xenotypes and save them so that they now show up in the list under the mod options for Xenotype Spawn Control. Then restart your game. After restart, go into Xenotype Spawn Control and go to the custom xenotypes tab. Delete a custom xenotype by clicking on the X next to it within Xenotype Spawn Control. Now go to the factions tab. Repeat this process until the factions tab breaks and no longer shows percentages or bars.

Note: This only happens if you delete the xenotype from Xenotype Spawn Control using the X within the mod options. If you delete the custom xenotype from the "Load Custom Xenotype" menu that Rimworld provides, everything seems to still work fine.

To fix the mod after you have broken it, add back the Custom Xenotype you've deleted.
bradson  [developer] 13 Jul @ 12:53pm 
As mentioned in comments, this should hopefully be fixed now
RynnEver 18 Jul @ 10:34am 
Hiya, thank you for making this mod. Been using it for quite a while now, it's one of my few must-haves.

I'm getting some weirdness in 1.6 adjusting faction xenotype percentages. In my Odyssey playthrough that's been running for almost 5 in game years now, I set the Yttakin faction to be 90% Yttakin, 10% a custom xenotype of mine that uses entirely vanilla genes. I noticed overtime when raids came that I was probably getting about 90% Yttakin, but instead of 10% of my custom xeno, I was getting mostly baseliners, I saw only a couple of my custom xeno those entire 4 years.

So this morning turned off all my mods except this one and Harmony and did some testing using dev mode to force raids. Got the same results, getting baseliners when I have it set to 0% baseliner. I then tried using the default Pirate gang faction set to 90% Yttakin 10% custom, still got baseliners. Changed the values from Absolute to Weighted, still got baseliners. Tried setting the Neanderthal faction to 90% Neanderthal, 10% my custom xenotype, still got baseliners.

I double checked the memes and pawn type tabs to make sure all that stuff was set to 100% baseliner so that it should default to what I have set on the faction tab. When I took the Pirate and Fierce tribe factions and made them 100% my custom xenotype, that worked as intended. It's only when there's a mix that the game throws baseliners more often than my custom xenotype. If I set values to be 50% Yttakin 50% my custom xenotype, I get more of my custom xeno, but still get more baseliners than my custom xeno.

When I used this mod in 1.5, I think I always had my custom xenos set to appear alongside baseliners or be 100% of a faction, so this issue may have existed in that version and I just never noticed.

Not sure if it's fixable or not, and having this mod as-is still way better than no mod at all, but I thought I'd share. Thanks again!
bradson  [developer] 18 Jul @ 11:32am 
Raid types often include raid specific requirements for pawns in them, like everyone having to be capable of violence and leaders needing a higher shooting skill than others. Requirements like that make xenotypes that have a hard time fulfilling them less likely than their raw percentage suggests, or even completely block them from spawning if there's a 0% chance of a xenotype generating with the required skills. Iirc this is something that can be customized with choose pawn settings, total control or rimmsqol
< >
Showing 1-7 of 7 comments
Per page: 1530 50