Hollow Knight

Hollow Knight

Otillräckligt med betyg
Controller Fix: Unresponsive moments, unintentional double-jumps, etc
Av tintingaroo
For HK on Windows and MacOS. Things work differently for the native Linux build.
- Addresses a controller issue where control is intermittent.
- Addresses a controller issue where it doesn't function at all when wheel, pedals, flight sticks etc are connected.

(This doesn't address the issue some have experienced where their Xbox (Series??) controller would crash/lose BT connection. if facing that issue, disabling rumble looks like the go-to workaround at the moment: HK main menu > Options > Controller > Rumble = Off.)
The guide also contains some other ways to resolve things on Windows w/o applying a mod.
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Origin of the guide content
The content of the guide is from a thread in the HK sub-forum 'Troubleshooting (Solved)'. That sub-forum is accessible only when signed-in to a Steam account that owns HK.
Here's the link to the thread: https://gtm.steamproxy.vip/app/367520/discussions/2/3105763714509031039/
If you try to access the link while not signed-in with a Steam account that owns HK, you'll get an error message page, reading:
'Sorry!
An error was encountered while processing your request:
It looks like we are either unable to load this forum at the moment or the forum requested doesn't exist.'
Symptoms
  • No gamepad control with Wheels, Pedals, HOTAS etc connected
  • Unresponsive moments - character just stops reacting to inputs for a moment/few seconds
  • Halting/interrupted controls
  • Jump arcs are blocked as if character hit a wall
  • Stuttery character movement when using analogue stick
  • Unintentional double-jumps (for those that have progressed that far into the game)

(All the same thing really - controller sometimes works, other times not... well apart from the case of no control at all xD)
SCARAB/Modding API Users
Look for the mod 'Button Prompt Switcher' or 'Controller Fixes'. Try with that instead of this process :)
Setup the fix
  1. (If using an emulator) Map the controller in the emulator as per usual.
  2. Navigate to 'Managed' folder:
    Right-click Hollow Knight in your Steam Library > Manage > Browse Local Files
    (alternative: Right-click HK in Steam Library > Properties > Installed Files > Browse)
    Then, in the folder it opens:

    Windows:
    hollow_knight_Data\Managed\

    Mac:
    Right-click hollow_knight.app > Show Package Contents > Contents/Resources/Data/Managed/

  3. Rename Assembly-CSharp.dll to Assembly-CSharp.dll_BAK
  4. Download and paste in this edited version:
    Windows:
    ver 1.4.3.2: https://drive.google.com/file/d/1jw-uwDnAycR2GFeWDJKx2T3TMW-cJbxN/view?usp=sharing

    ver 1.5.78: https://drive.google.com/file/d/1B8N3Sx6m5dcnLwo5cRBcAK6ZCmFIa4WN/view?usp=sharing

    Mac:
    ver 1.4.3.2: https://drive.google.com/file/d/1QGUnBMMVQNeHIn6QQaPYwtzgrBdb45i8/view?usp=sharing

    ver 1.5.78: https://drive.google.com/file/d/1yeBOcS5nELTeKFStu8_tzky_N_n4bR52/view?usp=sharing
Cause (as I understand it)
The game always detects & 'attaches' the physical controller, but if there is no profile for that specific controller, we won't see any response from it. The profile links the inputs to the actions.
The emulated controller also gets attached, and as there is a profile for a 360 controller, it performs actions in the game.
The input manager will switch between the two controllers whenever it reads the other as the 'active controller'. When it goes to the physical device (with no profile) no action is performed therefore the unresponsive moments/interrupted inputs. For example, in the case of the double jump: if Jump is being held while the game switches from 360 controller > physical > 360, it's read as a press - release - press > Double-Jump.

The Series X controller gets detected as two devices. One of which has a profile in InControl the other doesn't.

In the case of wheel/pedals/flight sticks connected and no gamepad control, InControl is reading inputs from those devices and setting them as the active device, never considering the gamepad as the active device.
What the fix does
Previous method:
At the stage where each detected device gets attached, it checks if the name of the profile (and thus the type of controller) is 'XInput Controller' or 'Xbox 360 Controller'. If it is not one of those names, the device is not allowed to be attached.

@ InControl.InputManager.AttachDevice()
if (!inputDevice.Name.Equals("XInput Controller") && !inputDevice.Name.Equals("Xbox 360 Controller")) { return; }


Current method:
At the stage where each detected device gets attached, it checks if there is a profile for the device. If there isn't, the device is prevented from attaching.

@ InControl.InputManager.AttachDevice()

if (inputDevice.IsUnknown) { return; }
Other options
  • You can stick to the unmodded files if the emulator software you're using has a hide controller function. Many will use HIDGuardian for this.
    x360ce is good for this as it handles the HIDGuardian setup for you.
    I believe DS4Windows also incorporates HIDGuardian and has a hide controller setting.

    Applies to Windows:
    HIDGuardian has been replaced with HidHide. You can stick to unmodded files if you combo the controller emulator software you're using with HidHide. Configure HidHide to hide the physical controller from the game. Or if the issue is no control due to wheel/pedals/flight sticks etc, block them from the game with HidHide (or unplug...).

  • Applies to Windows: try Steam Input instead of the emulator you're currently using. (On Mac, in my experience, Steam Input doesn't hide the physical controller from the game. Steam Input on Windows hides the physical controller from the game)

  • Edit Assembly-CSharp.dll using dnSpy and add your controller to a suitable/new profile