Open Tedster59 opened 8 months ago
So the fix I implemented in LWoTC requires modifying the parameters of SelectBiomeAndPlotDefinition
and SelectPlotDefinition
to be able to pass through an additional array parameter for sitreps to remove. I'm not sure where that sits on CHL backwards compatibility policy as changing those would break other mods using them, so it might require an alternative implementation using variables that exist at the gamestate object level instead.
In XComGameState_MissionSite, Sitreps are added to missions before a map is rolled. This causes an issue when mods allow for multiple sitreps, which can mark plot types as excluded.
XComGameState_MissionSite.SelectBiomeAndPlotDefinition
has this while loop:SelectPlotDefinition excludes maps based on biome, so once it goes through all maps in a biome, it calls SelectBiome to select the next one. However, SelectBiome returns an empty string if no valid Biomes exist instead of a biome, meaning the loops safety condition is never hit and it will infinitely loop calling SelectPlotDefinition again and again.
(Debugging done in LW code that duplicates the function) Note the blank string being added to the exclude list in the below logging.
Options to fix: