Make Logitech Extreme 3d PRO Strafe with hat

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
baylock
Posts: 31
Joined: Fri, 11. Apr 08, 09:57
x4

Make Logitech Extreme 3d PRO Strafe with hat

Post by baylock » Sun, 17. Nov 13, 18:02

Just did a little tinkering with the inputmap.xml file, and sofar have found a way to make the ship strafe with the hat

Step 1. Go into game and clear all KEYBOARD strafe commands "WSAD" By default.

Open file inputmap.xml in Notepad++
Add new lines at Line 165 (Im not sure if location is important but that is where mine are.

Add the following lines:

Code: Select all

 <state id="INPUT_STATE_STRAFE_LEFT" source="INPUT_SOURCE_JOYBUTTONS" code="INPUT_XBUTTON_DPAD_LEFT"/>
  <state id="INPUT_STATE_STRAFE_RIGHT" source="INPUT_SOURCE_JOYBUTTONS" code="INPUT_XBUTTON_DPAD_RIGHT"/>
  <state id="INPUT_STATE_STRAFE_UP" source="INPUT_SOURCE_JOYBUTTONS" code="INPUT_XBUTTON_DPAD_UP"/>
  <state id="INPUT_STATE_STRAFE_DOWN" source="INPUT_SOURCE_JOYBUTTONS" code="INPUT_XBUTTON_DPAD_DOWN"/>
Enjoy strafing, ill do some more tinkering when time allows, worked with a quick test in free to play mode for me, i hope this helps.


FYI, those commands/bindings are a direct copy and paste from the ones for changing primary / secondary weapon using the hat, so this trick may work for other joysticks

stones1601
Posts: 11
Joined: Tue, 19. Apr 11, 04:57

Post by stones1601 » Sun, 17. Nov 13, 18:48

Nice, I have the same stick and the "logitech profiler" that comes with it is quite robust. I've been using that to set up the pov hat to register as WASD keystrokes meaning you can keep the keyboard binds as is. Also have Q and E set up for roll on the twist axis but as it's just emulating keystrokes it's quite jerky as there's no nice analog control.

Any chance you've come up with a solution for binding a roll axis on your adventures in the inputmap.xml?

baylock
Posts: 31
Joined: Fri, 11. Apr 08, 09:57
x4

Post by baylock » Sun, 17. Nov 13, 19:03

Any chance you've come up with a solution for binding a roll axis
That one can be done in the games settings menu, just select the roll option under the controller settings, rebind and twist the joystick, it shows up as something stupid like 'right trigger' or something, but it works. if its backward just go into the invert options and change the setting there.

Now if only there was something referring to targeting in the file.

Also, the profiler didn't work for me at all.... maybe i was doing something wrong??
Dont worry, i think i just figured it out...

stones1601
Posts: 11
Joined: Tue, 19. Apr 11, 04:57

Post by stones1601 » Sun, 17. Nov 13, 19:22

Doh, Feel a bit silly missing that one :) Cheers mate.

Btw i always use the profiler with a global persistent profile that i swap depending on game. I remember the auto profile switching setting it has annoying the hell out of me back in my Freespace days.

Thanks again.

WhoCares01
Posts: 35
Joined: Mon, 22. Mar 10, 21:08
x3tc

Post by WhoCares01 » Mon, 18. Nov 13, 00:43

Independently, I found that the same changes work also to strafe with the hat switch of the Thrustmaster T.16000M. So we have two of the most popular low-cost joysticks covered :wink:

Varrow
Posts: 2
Joined: Sat, 18. Jul 09, 21:03
x4

Post by Varrow » Wed, 20. Nov 13, 07:19

I have found this works with a Thrustmaster HOTAS Warthog. I didn't deleat anything, I just added the lines at the 2nd last line of the file before the "</inputmap>"

JClosed
Posts: 627
Joined: Thu, 23. Dec 04, 01:56
x3tc

Post by JClosed » Wed, 20. Nov 13, 08:00

Well - I am used to do strafing with the keyboard, but very nice!

I wanted to use the hat switch for something else. As you know the hat switch has 8 settings. And the radial menu has (most times) 6 choices. So - 8 settings must be enough to make menu choices possible. I really don't know if it is possible to map the hat setting to the menu, but that should be nice. I did not had time yet to take a look at it. Maybe some time later this day..

[Edit]

Ok - found keyboard mapping:

Code: Select all

<action id="INPUT_ACTION_DIALOG_1" source="INPUT_SOURCE_KEYBOARD" code="INPUT_KEYCODE_1"/>
  <action id="INPUT_ACTION_DIALOG_2" source="INPUT_SOURCE_KEYBOARD" code="INPUT_KEYCODE_2"/>
  <action id="INPUT_ACTION_DIALOG_3" source="INPUT_SOURCE_KEYBOARD" code="INPUT_KEYCODE_3"/>
  <action id="INPUT_ACTION_DIALOG_4" source="INPUT_SOURCE_KEYBOARD" code="INPUT_KEYCODE_4"/>
  <action id="INPUT_ACTION_DIALOG_5" source="INPUT_SOURCE_KEYBOARD" code="INPUT_KEYCODE_5"/>
  <action id="INPUT_ACTION_DIALOG_6" source="INPUT_SOURCE_KEYBOARD" code="INPUT_KEYCODE_6"/>
  <action id="INPUT_ACTION_DIALOG_BACK" source="INPUT_SOURCE_KEYBOARD" code="INPUT_KEYCODE_ESCAPE"/>
  <action id="INPUT_ACTION_DIALOG_BACK" source="INPUT_SOURCE_JOYBUTTONS" code="INPUT_XBUTTON_RIGHT_THUMB"/>
  <action id="INPUT_ACTION_DIALOG_CLOSE" source="INPUT_SOURCE_KEYBOARD" code="INPUT_KEYCODE_DELETE"/>
  <action id="INPUT_ACTION_DIALOG_CLOSE" source="INPUT_SOURCE_JOYBUTTONS" code="INPUT_XBUTTON_BACK"/>
Now looking for the hat switch mapping.. Stay tuned... :wink:

[/Edit]

[Edit]

Hmm... cannot find 8 separated hat switch assignments, only up, down, left, right. Maybe it's not possible? I have to make a search for it. Not much luck until now.. i will keep searching..

[Edit]

[Edit again]

I think I found something:

It found in some places the keywords (in circular order clockwise) :

JOY_BTN_POV1_U
JOY_BTN_POV1_UL
JOY_BTN_POV1_L
JOY_BTN_POV1_DL
JOY_BTN_POV1_D
JOY_BTN_POV1_DR
JOY_BTN_POV1_R
JOY_BTN_POV1_UR

I have no idea if these will be recognized by X Rebirth. I going to give it a try. If it works I think I will map up and down to back and close menu, and the rest to the selection. I am still not sure if this will work comfortable (or at all), but I keep you all informed...

[/Edit again]

Liquidpinky
Posts: 62
Joined: Mon, 18. Jan 10, 18:09
x3tc

Post by Liquidpinky » Wed, 20. Nov 13, 10:15

So far Strafe is working a treat now with my Cyborg Fly5, I can finally start to comfortably play the game.

Looking forward to JClosed's findings with the menu to give that whirl as well if it works. Fingers crossed.

JClosed
Posts: 627
Joined: Thu, 23. Dec 04, 01:56
x3tc

Post by JClosed » Wed, 20. Nov 13, 11:35

Until now not much success..

The keywords I have found are not recognized (frankly: that was to be expected), so I tried another button mapping. I found out the button numbers for the hat are 33 to 40 (33 up and clockwise to 40).

Unfortunately mapping with: INPUT_XBUTTON_33 etc. does not seem to work for menu's. Probably in menu mode the program refuses to accept key presses from the controller, because it is using the X/Y movement.

I am afraid I probably have to delve a bit deeper into the inner workings of the engine, but if it is hard-coded there is not much I can do..

I won't give up that easy, but it will take some more time to figure this out..

Post Reply

Return to “X Rebirth - Scripts and Modding”