WOTCStrategyOverhaul / CovertInfiltration

A mod that overhauls the Covert Actions system to bring back the Infiltration mechanic from Long War 2
MIT License
21 stars 8 forks source link

Ruler presence on infil will cause enemies to always re-roll #692

Closed Xymanek closed 3 years ago

Xymanek commented 3 years ago

Example: https://youtu.be/h4JDR9sVKMU?t=29

1) When opening the blades, X2DownloadableContentInfo_DLC_Day60::UpdateMissionSpawningInfo calls XComGameState_AlienRulerManager::UpdateRulerSpawningData 2) UpdateRulerSpawningData eventually calls XComGameState_AlienRulerManager::SetRulerOnCurrentMission, which adds the ruler tags to XComHQ 3) UpdateMissionSpawningInfo sees that the HQ tactical tags have changed and forces a re-roll (returns true) 4) When the blades are closed, X2Helper_Infiltration_DLC2::ClearRulerOnCurrentMission is called, which removes the ruler tags from the XComHQ 5) Blades are opened and the cycle is repeated ad infinitum since the tags are never there

While a quick dirty fix in CI for infils is possible, the DLC2 logic itself is seriously flawed (produces very similar behaviour in unmodded game as well) and should be fixed in DLC2HL (setting post release milestone, since I dunno when 1.23 CHL will release)

Xymanek commented 3 years ago

CHL issue: https://github.com/X2CommunityCore/X2WOTCCommunityHighlander/issues/1077

Note to self: figure out why X2Helper_Infiltration_DLC2::ClearRulerOnCurrentMission was needed - DLC2 seems to be capable of removing the current ruler (when the mission doesn't need one) itself: https://github.com/X2CommunityCore/X2WOTCCommunityHighlander/blob/e000ea357ba9ca3260ca14c43c1a13a13edc75ac/Components/DLC2CommunityHighlander/DLC2CommunityHighlander/Src/DLC_2/Classes/XComGameState_AlienRulerManager.uc#L386-L417

Xymanek commented 3 years ago

ClearRulerOnCurrentMission was made before adding ShouldUpdateMissionSpawningInfo, so it was probably an earlier attempt at fixing the same problem, Refs: