joystick hook

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Post Reply

joystick hook

marcop000
Cadet 2nd Class
Posts: 58
Joined: Fri Dec 27, 2019 7:08 pm

Post by marcop000 » Fri Mar 20, 2020 5:02 pm

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.
Last edited by JeremyaFr on Sun Jul 19, 2020 12:38 pm, edited 1 time in total.
Reason: Change title

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Mar 20, 2020 8:10 pm

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.

marcop000
Cadet 2nd Class
Posts: 58
Joined: Fri Dec 27, 2019 7:08 pm

Post by marcop000 » Sat Mar 21, 2020 3:44 pm

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 ?

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Mar 21, 2020 4:08 pm

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".

marcop000
Cadet 2nd Class
Posts: 58
Joined: Fri Dec 27, 2019 7:08 pm

Post by marcop000 » Sat Mar 21, 2020 5:22 pm

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)

User avatar
blue_max
Lieutenant Commander
XWAU Member
Posts: 1290
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Mar 22, 2020 5:11 am

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.

marcop000
Cadet 2nd Class
Posts: 58
Joined: Fri Dec 27, 2019 7:08 pm

Post by marcop000 » Sun Mar 22, 2020 8:36 am

Hi blue_max,

I looking for this:

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

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Mar 29, 2020 4:53 pm

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.

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Apr 04, 2020 4:07 pm

UPDATE

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

You can download it with XwaHooksSetup.

User avatar
ual002
Lieutenant
XWAU Member
Posts: 809
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu Apr 09, 2020 4:09 am

Wait, so does this mean my x56 rhino will work now?
Image Image Image Image Image

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Apr 09, 2020 10:26 am

The best way to know the answer is to test.

User avatar
ual002
Lieutenant
XWAU Member
Posts: 809
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu Apr 09, 2020 6:28 pm

Everybody coaxing me back into the fray it seems. lol
Image Image Image Image Image

User avatar
ual002
Lieutenant
XWAU Member
Posts: 809
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Thu Jun 11, 2020 1:20 pm

Ok, reading this further... This affects force feedback and not native support for multiple control devices without the use of Vjoy correct?
Image Image Image Image Image

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Jun 11, 2020 4:05 pm

Correct.
For now, it's only for force feedback.

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Jun 25, 2020 7:02 pm

UPDATE

Hello,
I've updated the joystick hook.

I've included the patch that allows small movments.

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Jul 19, 2020 12:51 pm

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.

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Sep 04, 2020 12:05 pm

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:
xwa_hook_joystick_ff_WIP_2009041345.zip
You do not have the required permissions to view the files attached to this post.

User avatar
ual002
Lieutenant
XWAU Member
Posts: 809
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Fri Sep 04, 2020 3:51 pm

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.
Image Image Image Image Image

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Sep 15, 2020 3:54 pm

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.

xwa_hook_joystick_ff_WIP_2009151745.zip

WARNNG: This fix will not work until the cockpit look hook is updated.
You do not have the required permissions to view the files attached to this post.

Banished
Recruit
Posts: 2
Joined: Thu Sep 03, 2020 11:12 am

Post by Banished » Tue Sep 15, 2020 6:07 pm

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?

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Sep 15, 2020 6:43 pm

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.

Banished
Recruit
Posts: 2
Joined: Thu Sep 03, 2020 11:12 am

Post by Banished » Tue Sep 15, 2020 7:01 pm

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

User avatar
blue_max
Lieutenant Commander
XWAU Member
Posts: 1290
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Tue Sep 15, 2020 7:41 pm

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

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2559
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Sep 16, 2020 3:42 pm

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.

xwa_hook_joystick_ff_WIP_2009161740.zip
You do not have the required permissions to view the files attached to this post.

User avatar
Ace Antilles

Admiral (Moderator)
Posts: 4591
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Sun Sep 20, 2020 2:55 am

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.
You do not have the required permissions to view the files attached to this post.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

Post Reply