XCOM 2
34 ratings
[WOTC] Configurable Return Fire
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
85.363 KB
Apr 20, 2022 @ 12:26am
Jan 7, 2024 @ 3:39pm
9 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] Configurable Return Fire

In 2 collections by Zelfana
Actually Balance
41 items
Actually Utilities
103 items
Description
Overview
Adds various configuration options to customize Return Fire.

By default makes all Return Fire unlimited with 100% chance to activate but only activate after misses. This keeps it balanced and is how the Chosen Revenge works already.

Configuration
<Steam>\steamapps\workshop\content\268500\2797110850\Config\XComConfigurableReturnFire.ini

Options include:
  • Shots per turn
  • Chance to activate
  • Only return fire against misses or all attacks (including AoE)
  • Shoot preemptively or afterwards

Default config patches the following abilities:
  • Sharpshooter secondary weapon return fire (ReturnFire)
  • Skirmisher primary weapon return fire (SkirmisherReturnFire)
  • ADVENT Dark Event primary weapon return fire (DarkEventAbility_ReturnFire)
  • Chosen primary weapon return fire (ChosenRevenge)

Additional features
As a soft requirement, uses Weapon Skin Replacer to make Return Fire work with most weapon types equippable by XCOM by adding PistolReturnFire to them. This doesn't do anything on its own but lets those weapons work with Return Fire. You can add more weapon types in the configuration if mods add more weapon categories but doesn't add PistolReturnFire on weapons in those new categories.

Adding Return Fire to more classes
Add SkirmisherReturnFire to a class to utilize PistolReturnFire added to their primary weapon. All classes use PistolReturnFire for the actual shot if it is on a weapon they have equipped. Templars and other classes that only have a secondary pistol should have ReturnFire instead of SkirmisherReturnFire.

One option to add Return Fire to XCOM pool is I'm the Commander here. Alternatively you can do it via .inis, included examples in this mod.

Rangers and Templars with Bladestorm work fine as Return Fire activates after the attack (by default) and Bladestorm activates before the attack. Sparks with Intimidate basically work the same way as Skirmishers already do with Judgment.

Compatibility
This mod only modifies existing templates and is therefore compatible with everything and can be added or removed at any time. If another mod modifies the same values it might overwrite them depending on the load order.

Config Panic Reaction Fire can affect these return fire abilities as well but in a different way so no conflict there.

Musashis RPG Overhaul "fixes" bullpup Return Fire and switches PistolReturnFire on bullpups for BullpupReturnFire. This means all the other primary weapons will need to do this as well to be able to work with SkirmisherReturnFire. You can fix it manually in the WSR config.

Notes
Return Fire may fail to activate sometimes but that is probably caused by visibility checks and how all reaction fire works.

Return Fire has some visualization bugs with Covering Fire and other reaction attacks happening in response to the same action. This is out of scope for this mod to fix. These visualization bugs happen with all reaction attacks when they are interrupted by another ability.

Improvement suggestions welcome as always.
14 Comments
Zelfana  [author] Sep 3, 2024 @ 6:41am 
It's a fair warning, I can note this in the description. This is just OPTC to change the few values on the covering fire effect so it can't fix the visualization problems.
Iridar Sep 3, 2024 @ 6:05am 
Haven't looked at how this mod is set up, but wanted to make a couple warnings based on my own experience messing with it. If Return Fire is set to be preemptive, it's not going to visualize correctly if you don't also set the Associated Play Timing on the return fire shot to SPT_None. And either way it's not going to visualize right if combined with covering fire Overwatch.
walt.bustamante Jun 27, 2024 @ 10:22am 
@Zelfana you're awesome thank you!
Zelfana  [author] Jun 25, 2024 @ 8:50am 
They have regular weapon categories but AHWRequiemSMG is a bullpup and I just didn't put that category in the config since I assumed all bullpups would already have PistolReturnFire. Also, if you want to put it on a specific template instead of a WeaponCat, use TEMPLATE instead of WEAPON_CAT.

So you can get it on it with this line:

+GIVE_ABILITIES = (ABILITY = "PistolReturnFire", TEMPLATE = "AHWRequiemSMG")

I'll notify Reshi about this, though, bullpups are supposed to have it already.
walt.bustamante Jun 25, 2024 @ 2:56am 
small question, been trying to make the skirmisher weapon from Requiem armory work with pistol return fire but no matter what i do it doesn't proc the ability.

tried adding it to the weapon category on the config files with no results using these:

+GIVE_ABILITIES = (ABILITY = "PistolReturnFire", WEAPON_CAT = "smg")
+GIVE_ABILITIES = (ABILITY = "PistolReturnFire", WEAPON_CAT = "carbine")
+GIVE_ABILITIES = (ABILITY = "PistolReturnFire", WEAPON_CAT = "bolter")
+GIVE_ABILITIES = (ABILITY = "PistolReturnFire", WEAPON_CAT = "AHWRequiemSMG")
+GIVE_ABILITIES = (ABILITY = "PistolReturnFire", WEAPON_CAT = "AHWRequiemRifle")
+GIVE_ABILITIES = (ABILITY = "PistolReturnFire", WEAPON_CAT = "AHWRequiemBolter")
+GIVE_ABILITIES = (ABILITY = "PistolReturnFire", WEAPON_CAT = "AHWRequiemBullpup")

do you know how to? the description of the weapon says is a bullpup, in the name is a carbine but ultimately dont know to what weapon category has and since is not working i guess is not a regular bullpup.
King of France Oct 12, 2022 @ 2:04am 
@Zelfana I'll give it a try, thank you.
Zelfana  [author] Aug 31, 2022 @ 3:13pm 
@King of France

PistolReturnFire might kind of work if added to melee weapons but it will definitely not look right if it does. You're welcome to try but doing it properly would require an entirely new ability or two and I wouldn't really want to do that with this mod.
King of France Aug 31, 2022 @ 11:35am 
@Zelfana, will this work with melee weapons? I'd like to see my ranger possibly punching back at stun lancer.
RomRojal May 6, 2022 @ 11:07am 
so, nothing will break then. ok thanks
Zelfana  [author] May 6, 2022 @ 11:03am 
@romrojal

Only against misses is ignored as an option if preemptive fire is set to true. AoE will not trigger it at all and the attacker rolling a hit won't matter because return fire is triggering before it hits. So it's like Covering Fire but only for attacks against the unit itself. The underlying mechanic is actually the same and the differences are achieved with different configuration in code.