XCOM: Chimera Squad

XCOM: Chimera Squad

210 ratings
Captures are Okay
4
   
Award
Favorite
Favorited
Unfavorite
Tags: Balance, Bugfix
File Size
Posted
Updated
647.649 KB
14 May, 2020 @ 4:05am
15 May, 2020 @ 2:41am
9 Change Notes ( view )

Subscribe to download
Captures are Okay

Description
# CapturesAreOkay README

This is the README for the XCOM: Chimera Squad mod, 'Captures are Okay.'

The game has a bug where kills are rewarded XP but captures aren't. What kind of message is that sending? This mod is to fix that bug.

## Features

The trivial way for Firaxis to fix this bug is to add a variable like XComGameState_Unit.CapturedUnitsLastMission, then update it each time a unit goes unconscious. Then modify X2ExperienceConfig.AwardMissionXP().

As mods can't modify XComGameState_Unit directly, I'm using a workaround. I override AwardMissionXP(), and I get the captures count via XComGameState_Unit.WetWorkKills. How/why? It's an unused variable. I reset the variable after the event 'OnUnitBeginPlay.'

The variable is set after the event 'TacticalGameEnd.'
I'm assuming the captor is the same as unconsciousUnit.LastDamagedByUnitID. So far, that seems to work.

Note: I wanted to set WetWorkKills after the event 'UnitUnconscious.' But changes to WetWorkKills wouldn't persist. I don't know enough about GameStates, etc. to know how to fix that.
On the bright side, if you install the mod and load a game mid-mission, it should run fine!

Note: OnPreMission() and OnPostMission() hooks don't work in Chimera Squad.

> Tip: The mod logs XP gains in the Balance log. There is also a mod in the Steam Workshop to show XP in the Armory. You can combine these to make sure the mod is working. If you find a bug, please include such logs/Armory pics. You can post to reddit (e.g., xcom2mods) or email me at geoffhom@gmail.com.

> Tip: There's a bug in XComGameState_Unit.OnUnitUnconscious(). What it refers to as the 'Captor' is actually the unit that was knocked unconscious. So don't trust CapturedUnitsLastTurn and CapturedUnits.

> Tip: Kill/Capture XP is rounded. So 2 kills/captures = 0.5, rounded to 1 XP. 5 kills/captures = 1.25, rounded to 1 XP.

> Tip: Mod code is at https://github.com/geoffhom/captures-are-okay.

## Requirements

The mod overrides X2ExperienceConfig.AwardMissionXP().

It also writes to XComGameState_Unit.WetWorkKills, as I think this is unused in Chimera Squad.

This mod listens to the events 'OnUnitBeginPlay' and 'TacticalGameEnd.'
31 Comments
SSOutPhase 16 Nov, 2023 @ 6:34pm 
@Haru Same here. Just finished campaign and majority of my squad was maxed out with over 400 captures. I played vanilla so I think the game was balanced pretty well.
Haru 1 Apr, 2023 @ 8:52am 
I just finished a normal campaign and thought to browse through the mods when stumbling over this.

I am not quite sure if this is still up to date. I finished my Campaign modless with almost 600 captures and 130 kills, the kills mostly being androids which can't be captured.

I had no problem with getting EXP. 7/8 of my Squad members reached max level with the 8th coming one level short.

Didn't feel as if I wouldn't get xp from captures.
zin 1 Apr, 2023 @ 3:58am 
Can anyone even confirm if this is a bug? I want to use this mod if this is a bug, but I don’t want to use the mod if this is intended behaviour.

It may be intended. Considering tranq rounds exist, it may just be another reason to decide between knocking someone unconscious and killing them.
Cloud 16 Oct, 2022 @ 5:20pm 
Anyone know if this works with roster size workaround?
Uuugggg 25 May, 2022 @ 8:14am 
But there's zero reason to think you don't get XP for captures. You already have to manage
the capture - going into melee, doing small small amounts of damage. That's enough choice/cost that the XP thing is a ridiculous oversight.
LordDay 8 May, 2022 @ 3:29am 
@TGWeaver I think this is a purposeful choice so that you have tomake the decision between XP and capture bonuses.
Agrippa HX 10 Aug, 2021 @ 6:51pm 
@TGWeaver — Wasn't there just the one bug fix patch since release?
TGWeaver 10 Aug, 2021 @ 6:40am 
That they never patched this (and at this point, probably never will) is such a sad state of affairs. They can't patch a year-long bug this big and easy to fix, but they can add their own launcher that breaks everything.
abred_vs_annwn 17 Mar, 2021 @ 2:44pm 
still not patched?
Macabre 2 Dec, 2020 @ 8:52pm 
Can anyone confirm is this bug still persists? or has it been patched..?