Not enough ratings
[WOTC] Fix Controller Grappling
File Size
0.036 MB
Apr 11 @ 5:51pm
Apr 19 @ 8:05am
11 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] Fix Controller Grappling

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::
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]

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.
< >
RedDobe Aug 27 @ 3:05pm 
Thank you for this mod. Was much needed.
WelfareRecipient  [author] Apr 15 @ 4:45pm 
It's been irritating me for years.
So in development of this mod, I learned that Gotcha Again, actually makes the issue worse. With no mods and a small enough set of abilities, I can actually lower and raise my elevation, but can't rotate the camera. However, fat chance I'm going to run the game without Gotcha Again.
Redrumm Apr 14 @ 10:13pm 
Yeah this works perfectly, thx for making.
WelfareRecipient  [author] Apr 13 @ 5:38am 
Fixed a bug I introduced that broke the mod.
WelfareRecipient  [author] Apr 12 @ 5:05pm 
Thanks, I've updated my description and added my code on github. The mod is now configurable in case I've missed something, or if you're a modder and want to add support for us controller using peons.
Mr. Nice Apr 12 @ 6:34am 
That was pretty quick since you also had to setup the SDK properly too! Just one note for your description, may want to indicate targeting methods derived from those also get the treatment, hence why rockets, all those psi/gremlin AOEs (all derived from X2TargetingMethod_Grenade), and few more work ok, also maybe an "eg" for your cone/line examples to indicate that they are just that, examples not the only users of those methods.
melcayah Apr 12 @ 1:27am 
Oh My God... Finally... After all these years...someone finally done it... thank you so much.. best mod in the entire workshop...:steamhappy::steamhappy::steamhappy:
WelfareRecipient  [author] Apr 11 @ 8:45pm 
It doesn't fix the snap back to your soldier. But I might try modding that out as I hate it as well. Thanks for the idea
Redrumm Apr 11 @ 7:22pm 
This is where the controller snaps to hidden grids??