XCOM: Chimera Squad

XCOM: Chimera Squad

52 ratings
Difficulty is Okay
   
Award
Favorite
Favorited
Unfavorite
Tags: Balance, Bugfix
File Size
Posted
Updated
263.226 KB
May 17, 2020 @ 5:07am
May 23, 2020 @ 12:54am
3 Change Notes ( view )

Subscribe to download
Difficulty is Okay

Description
# Game: XCOM: Chimera Squad. Mod: 'Difficulty is Okay.'
- There's a bug which makes some missions harder. This mod fixes that.
- This README is easier to read at the repository: https://github.com/geoffhom/Difficulty-is-Okay.

### Background: General Info on the Bug, Mod
- Each mission has a difficulty: Easy/Medium/Difficult/Very Difficult.
- One factor affecting this is the 'Stage.' Each Act has 5 Stages: Groundwork, 3 hidden Operations, and Takedown. So, the Stage can be 1-5.
- The bug is that the game thinks it's at the next Stage, so missions are harder.
- You can see the bug in the 'Balance' log.
- For the first mission, you'll see something like:
```
[3047.73] XCom_Maps: ******************** Building Encounters ********************
[3047.73] XCom_Maps: Day: [0]
[3047.73] XCom_Maps: Difficulty Params: Act:[1] Stage:[1] District:[0]
```
- For the second mission:
```
[13166.06] XCom_Maps: Day: [1]
[13166.06] XCom_Maps: Difficulty Params: Act:[1] Stage:[3] District:[0]
```
- Note that the Stage skips from 1 to 3. What happened to Stage 2?! That's the bug.

### Background: Technical Info on the Bug, Mod
- The Stage doesn't affect difficulty linearly. So practically, the bug affects only a subset of missions: In each Act, between the 1st and 2nd **Operations**.
- Mission difficulty is set in `XComTacticalMissionManager.CalculateAlertLevelFromDifficultyParams()`. That function gets the stage difficulty from `XComGameState_Investigation.CalcStageDifficultyValue()`. That latter function has the bug, where the value may be +1.
- As mods can't modify the source code directly, we add to it:
- Override `XComGameState_MissionSite.InitMissionDifficulty()`. From there, we bypass `XComGameState_Investigation.CalcStageDifficultyValue()` with our own function.
- If there's a bug with this mod, you can post to reddit (e.g., xcom2mods) or email me at geoff.hom@gmail.com. Please include relevant logs.

> Tip: To let you know it's working, this mod prints to the Balance log. Search for 'Difficulty is Okay.'

> Tip: Missions that have already been created won't be fixed. You have to have the mod working the day before, in game time.

### Requirements

- This mod overrides `XComGameState_MissionSite.InitMissionDifficulty()`.
- In that function, this mod bypasses `XComGameState_Investigation.CalcStageDifficultyValue()`.
13 Comments
geoffhom  [author] May 26, 2020 @ 5:16am 
The difficulty should be easier between the 1st and 2nd Operations of each Act.
Shitdivers May 26, 2020 @ 4:27am 
So the end result is that the difficulty will be easier early on in investigations?
geoffhom  [author] May 26, 2020 @ 4:19am 
Not quite. The game will state the difficulty is 1 level higher than what it is intended to be, and I assume the actual difficulty is this higher difficulty. So the mod should correct the actual difficulty and predicted difficulty.
Shitdivers May 26, 2020 @ 3:15am 
Making the GitHub description with Markdown vastly improved the readability. So if I'm understanding correctly, the game will state that the Difficulty is Very Difficult on the 2nd stage of Investigations, but the difficulty is actually lower?

This mod just corrects the difficulty prediction, not actually changes the difficulty?
geoffhom  [author] May 24, 2020 @ 10:33pm 
@tomkpunkt: Yes, after a certain point, all your missions will be "Very Difficult." Depends on your campaign difficulty, too. E.g., Impossible. With this mod, it will delay things slightly. That said, it's possible that difficulty scales past "Very Difficult" but it's just not shown in the UI. The "alert level" goes up to 9, whereas everything past 4 is "Very Difficult."
tomkpunkt May 24, 2020 @ 2:56pm 
I don't know if this helps, but all my missions are "Very Difficult"
Dragon32 May 23, 2020 @ 12:47pm 
@geoffhom
That's great.
geoffhom  [author] May 22, 2020 @ 11:50pm 
Ok, I updated the description. Is that better? I tried to find a balance between having it readable on GitHub, which uses Markdown, and on Steam.
geoffhom  [author] May 19, 2020 @ 1:16am 
Fair enough. I'll work on it. I'm still playing the game a bit, though, to make sure the code works. =)
Dragon32 May 18, 2020 @ 1:25pm 
@geoffhom:
Thanks for publishing them too! I think it's just a presentation of information thing. More clearly demarcate the techie "this is how it works" from the not-so "this is what it does".

99% of people want to know the what and not the how.