XCOM 2
33 ratings
[WOTC] Fix Controller Grappling
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
38.125 KB
11 Apr, 2019 @ 5:51pm
19 Apr, 2019 @ 8:05am
11 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] Fix Controller Grappling

Description
This mod fixes the annoying interaction with grapple targeting while using an xinput controller. It does so by making the ability require activation before targeting.

When you target with a grenade, you have to activate targeting. Once targeting is active, the game registers all dpad inputs as camera manipulations. This mod adds grapple and blazing pinions to this list.

In addition, in case I missed any abilities, I've made the list configurable. So if a mod adds a new targeting method, you can add it to the config file here::
%steamdir%\steamapps\workshop\content\268500\1709949270\Config\XComFixControllerGrappling.ini
The bug
The vanilla way the grapple is implemented picks the nearest valid location, and then centers the camera on your soldier.

Grapple targets are usually on a higher elevation than your soldier, so when you press UP on the dpad, it decides to switch to a different ability. This cancelling your grapple targeting. (Trying to rotate your camera also cancels out).

Activated Targeting
Activated targeting is a special mode for controllers only, It should have no impact on Mouse input mode.
There is a hardcoded list of targeting methods that get special consideration for controller. If the current ability's targeting method is on this list, or inherits from an element on this list then it must be activated before it brings up targeting.
The list::
  • X2TargetingMethod_Grenade
  • X2TargetingMethod_Cone (e.g. Kill Zone)
  • X2TargetingMethod_Line (e.g. Dark Lance)
  • X2TargetingMethod_BlasterLauncher
Note, that targeting methods that inherit from one of these templates also get this treatment. So while not explicitly listed, Gremlin AoE methods are also on this list.

The Fix
I've now added grapple, path targeting (ionic storm and other friends) and blazing pinions to the list.
Meaning, that pressing A on grapple (or Blazing Pinions if you are mind controlling an Archon) now activates the targeting mode for grapple and you can now raise the elevation, rotate the camera or do whatever. Cancelling out of this mode requires you to press B like you would with a grenade.

source code available on github [github.com]

FAQ
Q. Does this work with vanilla?
A. No, and I have no idea how to make it do that. The change is very simple, Please take a look at the code on github.

Q. You idiot, you forgot about Ability! How can I add support for my modded ability that doesn't use one of these methods?
A. There is a list in XcomFixControllerGrappling.ini. You can add targeting methods to it.

Special thanks to Mr.Nice who basically wrote this mod in the highlander.

If you're using this mod please like and favorite it, as it helps get attention.
Also if you find any other abilities in the base game that need this special treatment, I'll be happy to incorporate them.
20 Comments
jat11241976 22 Jan, 2023 @ 4:29pm 
Same as hottt3 and katastrophie. Hoping this is a false flag.
hottt3 15 Nov, 2022 @ 7:53pm 
AML tells that this mod is in conflict with https://steamproxy.net/sharedfiles/filedetails/?id=1374808007
Katastrophie 29 Sep, 2022 @ 12:27am 
Anyone know if this mod will cause issues with [WOTC] Unlimited Ability Icons? AML says there's a conflict. I looked through the mod files and see that both of these mods edit UITacticalHUD_AbilityContainer inside the XcomEngine.ini file. I know some conflicts can be ignored but I'm not sure if this is one of those cases.
WelfareRecipient  [author] 17 Jan, 2022 @ 8:54am 
It's quite possible. I don't know if they just use the vanilla four targeting methods or include the additional ones this mod adds.
Zarkil 17 Jan, 2022 @ 2:46am 
@WelfareRecipient Was looking through the highlander and I believe it has this built in now.
WelfareRecipient  [author] 3 Apr, 2021 @ 9:20am 
xinput is an xbox controller yes. This does not work if you use the steam controller integration.
Boberto 2 Apr, 2021 @ 6:58pm 
"while using an xinput controller". Is that different from an Xbox Controller? Will this affect Xbox Controller users?
togan77 23 Apr, 2020 @ 8:27pm 
Thumbs Up and Faved
My Grapple with Wraith Suit was working fine till my skill pool got too large, where once I activate grapple it would only move my skill selection up or down upon D-PAD input. Making grapple useless!! Until this mod of course fixed all that.
Zarkil 14 Mar, 2020 @ 6:01am 
@WelfareRecipient Thank you, thank you so much for this!
Feyn 7 Mar, 2020 @ 1:21am 
What targeting method controls main weapon ?