Giter VIP home page Giter VIP logo

Comments (25)

samuelgr avatar samuelgr commented on June 10, 2024

Does it work with Start, Back, LS, and RS?

from xidi.

r2rX avatar r2rX commented on June 10, 2024

Start, Back, Left Stick, Right Stick and both stick buttons are registered and work in the game.

It seems that the game is detecting LT and RT on the Z axis. Within the options menu, there are several axis presets that can be selected for the secondary stick. They are as follows:

(Legend: direction of right analog stick=camera direction)

**Z-RX:**
left=up
right=down
up=none
down=none
LT=right
RT=left


**RX-Z:**
left=left
right=right
up=none
down=none
LT=down
RT=up


**Z-RY:**
left=none
right=none
up=up
down=down
LT=right
RT=left


**RY-Z:**
left=none
right=none
up=left
down=right
LT=down
RT=up


**RX-RY:**
left=left
right=right
up=up
down=down
LT=none
RT=none


**RY-RX:**
left=up
right=down
up=left
down=right
LT=down
RT=up

The ideal preset is RX-RY, where the camera controls are mapped solely on the right analog stick. However, LT and RT are not available to map any controls to under any combination.

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

It sounds like Xidi is not being loaded at all. Which version (dinput, dinput8, or winmm) of Xidi are you using? Are you sure it is the right version for this game?

from xidi.

r2rX avatar r2rX commented on June 10, 2024

Hey @samuelgr . I tested the 32bit version of dinput, dinput8 and winmm. The results, however, are the same irrespective.

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

This covers all three forms of Xidi; thanks for doing that test.

I did some digging, and it looks like this game (as well as a random selection of other games) loads DirectInput in a way that cannot be intercepted just by dropping in a replacement DLL file. In other words, getting Xidi loaded into this game will require some fairly invasive techniques.

The good news is I have a solution in mind and am reasonably confident it will work. The bad news is, while I do not anticipate it will take a terribly long time, at the moment I cannot provide an ETA on said solution.

from xidi.

r2rX avatar r2rX commented on June 10, 2024

This covers all three forms of Xidi; thanks for doing that test.

I did some digging, and it looks like this game (as well as a random selection of other games) loads DirectInput in a way that cannot be intercepted just by dropping in a replacement DLL file. In other words, getting Xidi loaded into this game will require some fairly invasive techniques.

The good news is I have a solution in mind and am reasonably confident it will work. The bad news is, while I do not anticipate it will take a terribly long time, at the moment I cannot provide an ETA on said solution.

Hey @samuelgr . Glad to have helped with the testing.

It's great that you have a solution in mind and we'll wait patiently till you release a build for us to test. Thanks again. :)

from xidi.

r2rX avatar r2rX commented on June 10, 2024

Hi @samuelgr . Hope you've been keeping well during this, shall we say, interesting year. Just wanted to send regards and we're awaiting progress with bated breath. :)

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

Hi @r2rX, thanks for the well-wishes, and to you as well. I should hopefully have something to share in the not-too-distant future.

from xidi.

r2rX avatar r2rX commented on June 10, 2024

Hi @r2rX, thanks for the well-wishes, and to you as well. I should hopefully have something to share in the not-too-distant future.

Awesome @samuelgr ! Looking forward to it. ;)

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

Good news: the technical solution I had in mind for this is implemented and seems to be working.

from xidi.

r2rX avatar r2rX commented on June 10, 2024

Great job @samuelgr ! Once it's available, I'll be sure to test it. ;)

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

I am still working on packaging this in a more user-friendly format, but for now here is a preview that can be used for testing. It is not a simple drop-in replacement for previous versions of Xidi - instructions on how to use this package follow.

Xidi-v1.1.0-pre.1_defiance.zip

Contained within this package is a new form of Xidi, a "hook module" that is intended to be loaded by Hookshot, another of my projects. To use this package:

  1. Extract the contents of the archive above to the directory containing the game's executable, defiance.exe.
  2. Download a release of Hookshot and place the files Hookshot.32.exe and Hookshot.32.dll into the same directory as the game's executable.
  3. Launch the game by doing a drag-and-drop operation in File Explorer. Drag defiance.exe and drop it on top of Hookshot.32.exe.

The reason why this is all needed is that this game does not load DirectInput via the standard DLL mechanism the way other games do. Rather, it uses COM, which causes Windows to bypass Xidi entirely. Launching the game in this way allows this process to be intercepted such that DirectInput requests can be redirected back to Xidi.

@r2rX please give this a go and let me know how things work or if you need any help. Thanks for offering to help me test.

from xidi.

r2rX avatar r2rX commented on June 10, 2024

I am glad to report that it is working beautifully, @samuelgr .

All buttons, including the triggers, are registered properly and it works great now! Additionally, going in to the game's controller options, setting the gamepad type to analogue and the secondary stick to Z-RZ has both analog sticks working perfectly.
Note: The D-pad buttons aren't recognized but I honestly don't recall if they originally did and I don't have a DInput pad to confirm this.

Force feedback is the only thing that isn't working (as it's greyed out in the controller options menu). Not sure if this is easy to get working or if you'd be interested in looking at it but that's the only niggle I can report back. :D

@r2rX please give this a go and let me know how things work or if you need any help. Thanks for offering to help me test.

My sincerest pleasure, dude. If anyone is due thanks, it's to you. With this effort, you've ensured there's a means for fans (old and new) to have full XInput controller support for this game (actually, with this now it's the whole LoK series!). And for any other titles that interact with DirectInput as Defiance does, via COM, they should also work (although not tested...I wouldn't mind helping out but I don't know of any other titles that do utilize COM in this manner). So thank you very much!

EDIT: I had mentioned the prospect of making it more user-friendly (preferably launching the games shortcut or .exe directly without dragging and dropping) but I forgot you mentioned that in the previous post so I know you're on the case. ;)

All-in-all, fantastic job dude! Please let me know if there's any other feedback or testing you'd like me to run.

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

I am glad to report that it is working beautifully, @samuelgr .

Wonderful, very glad to hear it. I will mark this issue as closed, with the fix being the hook module.

Note: The D-pad buttons aren't recognized but I honestly don't recall if they originally did and I don't have a DInput pad to confirm this.

I was wondering about that myself, but I tried the game without Xidi and did not see the d-pad working there either. There is nothing special about the way the d-pad is presented in either case, so it is possible the game just ignores all POVs.

EDIT: I had mentioned the prospect of making it more user-friendly (preferably launching the games shortcut or .exe directly without dragging and dropping) but I forgot you mentioned that in the previous post so I know you're on the case. ;)

Yes, and I completely agree with the suggestion. I think this is something better fixed in Hookshot than in Xidi, and in any case I plan to get that done before packaging up a release.

In the meantime, if you want to keep using the pre-release package to play the game, you can create a shortcut to Hookshot.32.exe, right-click the shortcut and get to its properties, then in the "Target" field add the full path to defiance.exe right after the path to Hookshot.32.exe. So for example the "Target" field might look like this (make sure to include the quote characters): "D:\Legacy of Kain Defiance\Hookshot.32.exe" "D:\Legacy of Kain Defiance\defiance.exe".

Force feedback is the only thing that isn't working

Force feedback is currently not implemented in Xidi, but it is on my radar as a possible new feature for a future version.

If anyone is due thanks, it's to you.

Appreciated. I am glad to see that people other than myself are using Xidi and am happy to make it work with as many games as I reasonably can.

from xidi.

r2rX avatar r2rX commented on June 10, 2024

In the meantime, if you want to keep using the pre-release package to play the game, you can create a shortcut to Hookshot.32.exe, right-click the shortcut and get to its properties, then in the "Target" field add the full path to defiance.exe right after the path to Hookshot.32.exe. So for example the "Target" field might look like this (make sure to include the quote characters): "D:\Legacy of Kain Defiance\Hookshot.32.exe" "D:\Legacy of Kain Defiance\defiance.exe".

Thanks for the tip. The shortcut works fine. 👍

Force feedback is currently not implemented in Xidi, but it is on my radar as a possible new feature for a future version.

Fantastic! Once implemented, it should satisfy the main features necessary for a complete experience, at least from the users perspective.

Appreciated. I am glad to see that people other than myself are using Xidi and am happy to make it work with as many games as I reasonably can.

Here here!

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

The fix for this is part of v2.0.0. Hookshot also got some updates, so the process should be more user-friendly once the HookModule is set up.

from xidi.

r2rX avatar r2rX commented on June 10, 2024

The fix for this is part of v2.0.0. Hookshot also got some updates, so the process should be more user-friendly once the HookModule is set up.

Hey @samuelgr , great job! Xidi v2.0.0, with Hookshot, works as advertised. :) Once Force Feedback is implemented, it will help cement future proofing for full support of DInput titles!

Keep up the awesome work, dude. ;)

from xidi.

microsample avatar microsample commented on June 10, 2024

Triggers still not working for me, installed all available releases.
Tried pre-release, but Hookshot.32.exe gives error
the procedure entry point IsWow64Process2 could not be located in the dynamic link library KERNEL32.DLL
I'm using Windows 7, maybe there is a problem?

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

Both Xidi and Hookshot are built for Windows 10, with no promises whatsoever that they will work on older versions of Windows. IsWow64Process2 is an API introduced in Windows 10 v1511, hence the error.

from xidi.

UncleStark avatar UncleStark commented on June 10, 2024

Hello, guys. I use xidi 4.0.0 and Hookshot-v1.2.0. Triggers work in game, but vibration option still grayed. is there a fix for this?

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

@UncleStark could you please file a separate issue for this?

from xidi.

samuelgr avatar samuelgr commented on June 10, 2024

Actually I just did it myself. We can track vibration for this game in #23.

from xidi.

BParks21 avatar BParks21 commented on June 10, 2024

How would I do this and launch the game from steam and it hook the .exe? My game and hookshot are located in

"E:\Backup\Games\SteamLibrary\steamapps\common\legacy_kain_defiance

So I right clicked the game in my steam library and entered this in the properties

"E:\Backup\Games\SteamLibrary\steamapps\common\legacy_kain_defiance\Hookshot.32.exe" "E:\Backup\Games\SteamLibrary\steamapps\common\legacy_kain_defiance\defiance.exe"

but it doesn't load hookshot with the game?

from xidi.

r2rX avatar r2rX commented on June 10, 2024

@BParks21

  1. Make sure the latest Visual C++ Runtime for Visual Studio 2022 is installed (both X86 and X64 if on 64bit OS).
  2. Open the game folder and rename defiance.exe to _HookshotLauncher_defiance.exe
  3. Extract Hookshot.32.dll, Hookshot.32.exe and HookshotLauncher.32.exe from the Hookshot package into the game folder and rename HookshotLauncher.32.exe to defiance.exe .
  4. Extract Xidi.HookModule.32.dll and dinput8.dll, from the Win32 folder in Xidi package, into the game folder.

You don't need to add anything in the properties for the game on Steam so ensure the properties field is cleared before launching.

from xidi.

BParks21 avatar BParks21 commented on June 10, 2024

Doesn't seem to work, the setup for the game launches and says failed to initialize with current settings. I change them and it just keeps relaunching it. Maybe it doesn't work with my d3d8 to 9 wrapper. I got it working with the old method you posted but there was no way for me to launch it from steam. I'm using the known widescreen hack and the dxwrapper to get the game running properly. I have a dinput wireless adapter from mayflash that allows me to use practically any controller in dinput mode. I wanted to not have to switch to it and just use my series x controller. Oh well I'll just keep using my dinput wireless adapter.

Edit: Ok I got it working my problem was I forgot to edit the width and height in the sr3.ini which is one of the files for the widescreen hack. I had width and height set for my 4k tv and was forgetting to set the width and height for my 1440p monitor. The one I was trying to launch it on. After I changed it the hookshot instructions you gave worked. Thanks! Is the a way to adjust analog sensitivity or deadzone? I noticed there's less wiggle room for running/walking with the series x left stick.

from xidi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.