Page 1 of 5

joystick hook

Posted: Fri Mar 20, 2020 5:02 pm
by marcop000
Hi,

I have multiple controllers (cloche, thottle, pedals) and becouse the game don't support multiple controllers I use vjoy to merge it on one virtual controller.

This work, but the compromise is that I lose to force feedback becouse the game send the ffb to vjoy and not to real device.

I ask if there is way to "redirect" all ffb data to the first controller that support the force feedback that can be different from the device used to control the ship.

Re: direct input hook

Posted: Fri Mar 20, 2020 8:10 pm
by JeremyaFr
Hello,
You can try this patch:

Code: Select all

At offset 034A3E, replace 33C05E83C410C2080090 with 33C0405E83C410C20800.
I have not tested it.
If it works, I will create a hook for that.

Re: direct input hook

Posted: Sat Mar 21, 2020 3:44 pm
by marcop000
hi JeremyaFr,

thanks for your reply !!!

To be honest I don't have skill to create a hook.

I do only do a small change on some code in c++ but not more.

I suppose this is a binany change of dinput.dll. Is true ?

Do you have the possibility to send me the compiled dll or other to allow me to see if work ?

Re: direct input hook

Posted: Sat Mar 21, 2020 4:08 pm
by JeremyaFr
Hello,
A simple way to apply the patch is to use XwaExePatcher.

Open "patcher.xml" with Notepad and add that:

Code: Select all

  <Patch Name ="force feedback">
    <Item Offset="034A3E" From="33C05E83C410C2080090" To="33C0405E83C410C20800"/>
  </Patch>
Then run "XwaExePatcherWindow.exe", select "XWingAlliance.exe", and click on "Apply" next to the added "force feedback". The patch will be applied to "XWingAlliance.exe".

Re: direct input hook

Posted: Sat Mar 21, 2020 5:22 pm
by marcop000
hi JeremyaFr,

Many many thanks !!

Your patch work pefect at the first attemp and very easy to apply.

Thanks again ...

I don't known if this is the right place to ask:

Do you know where there are the lastest complete full dynamic cockpit with hypespace for x-wing , a-wing, etc..

(If possible ready to use)

Re: direct input hook

Posted: Sun Mar 22, 2020 5:11 am
by blue_max
marcop000 wrote:
Sat Mar 21, 2020 5:22 pm
Do you know where there are the lastest complete full dynamic cockpit with hypespace for x-wing , a-wing, etc..
You're probably looking for the VR mod. The latest public release is here:

https://www.dropbox.com/s/3dz5egxfboeg4 ... 1.zip?dl=0

Be aware that this version is not compatible with hook_d3d.dll. So if you update all the hooks, you'll have to disable that one.

Re: direct input hook

Posted: Sun Mar 22, 2020 8:36 am
by marcop000
Hi blue_max,

I looking for this:

https://www.youtube.com/watch?v=9BBFVMD-PrU

Re: direct input hook

Posted: Sun Mar 29, 2020 4:53 pm
by JeremyaFr
Hello,
Here is something to test.

I've included the joystick selected into a hook.

EDIT: link removed

This hook permits to select the joystick device with force feedback.

To select a joystick with force feedback, set JoystickDeviceIndex in "hook_joystick_ff.cfg".

The format is:
JoystickDeviceIndex = device index

The default value is 0, which select the first device.
When the value is -1, the last device will be selected.

Re: direct input hook

Posted: Sat Apr 04, 2020 4:07 pm
by JeremyaFr
UPDATE

Hello,
I've uploaded the xwa_hook_joystick_ff hook to OneDrive and GitHub.

You can download it with XwaHooksSetup.

Re: direct input hook

Posted: Thu Apr 09, 2020 4:09 am
by ual002
Wait, so does this mean my x56 rhino will work now?

Re: direct input hook

Posted: Thu Apr 09, 2020 10:26 am
by JeremyaFr
The best way to know the answer is to test.

Re: direct input hook

Posted: Thu Apr 09, 2020 6:28 pm
by ual002
Everybody coaxing me back into the fray it seems. lol

Re: direct input hook

Posted: Thu Jun 11, 2020 1:20 pm
by ual002
Ok, reading this further... This affects force feedback and not native support for multiple control devices without the use of Vjoy correct?

Re: direct input hook

Posted: Thu Jun 11, 2020 4:05 pm
by JeremyaFr
Correct.
For now, it's only for force feedback.

Re: direct input hook

Posted: Thu Jun 25, 2020 7:02 pm
by JeremyaFr
UPDATE

Hello,
I've updated the joystick hook.

I've included the patch that allows small movments.

Re: joystick hook

Posted: Sun Jul 19, 2020 12:51 pm
by JeremyaFr
UPDATE

Hello,
I've updated the joystick hook.

I've added a setting to enable or disable small movement.

Code: Select all

EnableSmallMovement = value

The default value is 1, which enable small movement.
When the value is 0, small movement is disabled.

Re: joystick hook

Posted: Fri Sep 04, 2020 12:05 pm
by JeremyaFr
WIP

Hello,
Here is a WIP version of the joystick hook.

You can now have the main axis and buttons on separate controllers.
You can define more than 16 buttons and 4 POVs.

The hook zip contains a tool to configure the hook settings.

XwaJoystickConfig_01.png
XwaJoystickConfig_02.png

Download link:
EDIT: link removed

Re: joystick hook

Posted: Fri Sep 04, 2020 3:51 pm
by ual002
And I have a working profile for the X-55 rhino. If anyone has interest I can post it here. I suspect the axis section might be different for you based on the order of your Stick/Throttle in windows.

Re: joystick hook

Posted: Tue Sep 15, 2020 3:54 pm
by JeremyaFr
WIP

Hello,
I've updated the WIP version of the joystick hook.

I've fixed a bug with the numpad keys to move the look view in the cockpit when no joystick is connexted.
I've also reduced the look move speed.

EDIT: link removed

WARNNG: This fix will not work until the cockpit look hook is updated.

Re: joystick hook

Posted: Tue Sep 15, 2020 6:07 pm
by Banished
So basically what your saying is that we will no longer have an option not to install the Effects anymore?

No doubt this will eventually be incorporated into standard Joystick Hook, but why can't this be added to the cockpit look hook?

My question is, If you already have a working Joystick and you don't have Blue max's effects installed, will this impact any aspect of an already working game?

Re: joystick hook

Posted: Tue Sep 15, 2020 6:43 pm
by JeremyaFr
The joystick hook works with or without the effects.

For now, the above fix (related to numpad keys) will have no effect when the cockpit look is present. I'm not the maintainer of this hook.

With the WIP version of the joystick hook, there is a breaking change: the button settings from "config.cfg" file (joybuttonX settings) or the in-game menu will no longer work. You have to configure the buttons in the "JoystickConfig.txt" file or use the "XwaJoystickConfig.exe" tool.

Re: joystick hook

Posted: Tue Sep 15, 2020 7:01 pm
by Banished
That's fine thanks, as long as there isn't any need to have to install the effects, we should be able have a choice whether we want to install the effects or not, just saying they should be kept separate from your Hooks, sorry not everyone likes the Effects package and Dynamic cockpit stuff

Re: joystick hook

Posted: Tue Sep 15, 2020 7:41 pm
by blue_max
I will update the Cockpit Look Hook as Jeremy requested; but I would expect that you can also remove this hook altogether if you don't like/need it so that it doesn't interfere with Jeremy's joystick hook.

EDIT: Here's the updated cockpitlook hook, with the changes requested by Jeremy:

https://www.dropbox.com/s/3yvga6xz56m5q ... 5.zip?dl=0

Re: joystick hook

Posted: Wed Sep 16, 2020 3:42 pm
by JeremyaFr
WIP

Hello,
I've updated the WIP version of the joystick hook.

Now the Joystick Config tool automatically saves the "JoystickConfig.txt" file when the window is closed.

EDIT: link removed

Re: joystick hook

Posted: Sun Sep 20, 2020 2:55 am
by Ace Antilles
JeremyaFr wrote:
Wed Sep 16, 2020 3:42 pm
WIP
Hello,
I've updated the WIP version of the joystick hook.
MAJOR BUG!
With this hook you can't target ships using T or most keys correctly. It won't move from the ship you are on.
It's stuck in place no matter what you press, sometimes using Y can correct it.
I've tracked this down to the newest Joystick Hook. It's not related to the Cockpit Hook too afaik.

The one included below doesn't have the issue.