HOTAS Warthog POV Hat + Strafing Issue (Resolved, kinda)

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

User avatar
Rook_US
Posts: 10
Joined: Sat, 1. Dec 18, 05:17
x4

HOTAS Warthog POV Hat + Strafing Issue (Resolved, kinda)

Post by Rook_US »

Currently having some trouble with the vertical and horizontal strafing: When binding Strafe up, down, left and right to one of the POV Hat switches, it only seems to function as a 4 way hat switch instead of 8 way. Restricting lateral movement.

As an aside, due to the POV hat issues, I bound the Throttle's ministick to strafe, trouble is I lose the ministick occasionally. Only get it back after disconnecting & reconnecting the throttle. Anyone else getting this?
Also, bound some "look" controls to one of the hats, and that doesn't seem to be working at all. Maybe it's tied to the "mouse look" function? Will have to investigate.

p.s. Really great job with this one gents. So far, she feels like a heavily upgraded X3 AP. Looking forward to seeing where yall take it.

EDIT:
So, I've resolved this problem using the TARGET software. I'm going to copy my target script below in a spoiler.

Disclaimer: I haven't perfected this script yet. I just threw it together to get myself flying again. As such, your mileage may vary. Trouble I had with using Target software, and where you may run into problems, is that it rebound some/all of the buttons and switches to new DX buttons. I know there is a limit on how many buttons a controller can use, so it must have surpassed the limit, because many of the buttons stopped registering in X4. Basically, instead of binding the buttons to DX 1-X, it shifted them to something like DX 20-X. To get around this, I reassigned some of the buttons to DX 1-8, so that the game could recognize them again, but I didn't do all of them. Nor did I convert all of the switches to on/off toggles. Just the ones I am using. Thankfully, editing the script is really easy. So... If anyone out there needs help.. send me a PM or reply to this thread.

To put it simply though, you'll need to get the Target GUI up for your device. Open Target GUI, press New Configuration. Name it, give it a directory. Press Ok. Next screen, click the box associated with the device(s) you want to edit (I only changed the Throttle). Click Next, then Next again. This should bring you to a window where you can manipulate the view of the throttle with your mouse (click and drag), hover over buttons and switches to get their name/identifier. Alternatively, you can double click them and pull their identifier from the center section (Assign Parameters). Then, I opened the script in a text editor and, with the Target GUI open, I was able to pull the identifiers it used for the different buttons and switches, plug those into the script file, and assign them DX buttons. Just copy and paste for the most part.

If you're new to this and just want to run with the script as it is, fire up TARGET Script Editor, press menu, new, paste the script into the program, save it first, then run it. Launch the game, bind the buttons/switches as you normally would. You'll want to go back through all of your bindings again anyways, since most of them have probably changed. If you find any buttons/switches that aren't binding, let me know. Oh, also, you'll probably need to go into Manage Controllers/Joysticks in X4 and add "Thrustmaster virtual game controller" to the list.
Spoiler
Show
include "target.tmh"
int main()
{
Configure(&HCougar, MODE_EXCLUDED);
Configure(&Joystick, MODE_EXCLUDED);
Configure(&T16000, MODE_EXCLUDED);
Configure(&T16000L, MODE_EXCLUDED);
Configure(&LMFD, MODE_EXCLUDED);
Configure(&RMFD, MODE_EXCLUDED);
Configure(&TFRPRudder, MODE_EXCLUDED);
Configure(&TWCSThrottle, MODE_EXCLUDED);
if(Init(&EventHandle)) return 1;
SetKBRate(32, 50);
SetKBLayout(KB_ENG);
MapKey(&Throttle, CHF, PULSE+DX1);
MapKey(&Throttle, CHB, PULSE+DX2);
MapKey(&Throttle, LDGH, PULSE+DX3);
MapKey(&Throttle, APENG, PULSE+DX4);
MapKey(&Throttle, CSU, '9');
MapKey(&Throttle, CSD, '0');
MapKey(&Throttle, CSR, '=');
MapKey(&Throttle, CSL, '-');
MapKey(&Throttle, EACON, PULSE+’DX5’)); // EAC UP
MapKeyR(&Throttle, EACON, PULSE+’DX5’)); // EAC RLS
MapKey(&Throttle, EACOFF, 0)); // EAC DOWN
MapKey(&Throttle, RDRNRM, PULSE+’DX6’)); // RDRALT UP
MapKeyR(&Throttle, RDRNRM, PULSE+’DX6’)); // RDRALT RLS
MapKey(&Throttle, RDRDIS, 0)); // RDRALT DOWN
MapKey(&Throttle, APPAT, PULSE+’DX7’)); // APP UP
MapKeyR(&Throttle, APPAT, PULSE+’DX7’)); // APP UP RLS
MapKey(&Throttle, APAH, 0)); // APP CTR
MapKey(&Throttle, APALT, PULSE+’DX8’)); // APP DWN
MapKeyR(&Throttle, APALT, PULSE+’DX8’)); // APP DWN RLS
MapKey(&Throttle, APAH, 0)); // APP CTR
MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCX, 0, 0, 0, 0, 0);
MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCY, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_RIGHT, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_LEFT, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_FC, 0, 0, 0, 0, 0);

}
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
}
I've also set the EAC, RDR ALTM, and LASTE switches as toggle switches/DX keys (read like joystick keys in X4's config menu). They function like on/off switches which I use for Travel, SETA, and the scan modes.. For these switches, you need to make sure they're all in the "Off" position before getting started.

My config, bound in X4:
LASTE switch
  • PATH = Long Range Scan Mode
  • ALT/HDG position is "Off" for both
  • ALT = Scan mode
EAC ARM = Travel mode

RDR ALTM NRM = SETA

Strafe is bound to the Throttle's forward HAT switch, the one at your pointer finger. I used keyboard presses for this, just to test it. Works fine. I use 9, 0, -, and =. Thankfully, you don't really need to remember that.

Alright, that's long enough. Hope it helps someone.

- Rook
anarchynow
Posts: 2
Joined: Thu, 6. Nov 08, 05:59
xr

Re: HOTAS Warthog POV Hat + Strafing Issue (Resolved, kinda)

Post by anarchynow »

Thanks for this! Just got a Warthog and throttle myself and I think this will help me a lot.

Ill give it a try and report back!
User avatar
BigBANGtheory
Posts: 3180
Joined: Sun, 23. Oct 05, 12:13
x4

Re: HOTAS Warthog POV Hat + Strafing Issue (Resolved, kinda)

Post by BigBANGtheory »

Yeah I needed to use TARGET to get the controls mapped and working.

In particular the head look commands (in the absence of TrackIR) weren't working when directly mapped to the Joystick hat switch, I had to map those controls to keyboard commands in TARGET then use the keyboard commands in the X4 config.
dtdionne
Posts: 32
Joined: Wed, 30. Oct 19, 08:03
x4

Re: HOTAS Warthog POV Hat + Strafing Issue (Resolved, kinda)

Post by dtdionne »

I know this is an old thread but I’m curious if you were able to eliminate dependency on the actual mouse, for the menus and map, using target.
User avatar
Rook_US
Posts: 10
Joined: Sat, 1. Dec 18, 05:17
x4

Re: HOTAS Warthog POV Hat + Strafing Issue (Resolved, kinda)

Post by Rook_US »

Unfortunately, I haven't messed with assigning menu/map controls using Target.
dtdionne wrote: Tue, 12. Nov 19, 21:52 I know this is an old thread but I’m curious if you were able to eliminate dependency on the actual mouse, for the menus and map, using target.
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: HOTAS Warthog POV Hat + Strafing Issue (Resolved, kinda)

Post by Angsaar »

dtdionne wrote: Tue, 12. Nov 19, 21:52 I know this is an old thread but I’m curious if you were able to eliminate dependency on the actual mouse, for the menus and map, using target.
Not on a Warthog or with target, but I have things configured like this:

Button (?) - Interactions Menu - Menu Select

Button (?) - Options Menu - Menu Back

Hat 1 - Vertical/Horizontal Strafing - Menu Tabs/Pages

Hat 2 - Next/Previews Object/Component Targeting - Menu Item Scrolling

X/Y Axis - Map Panning
Z Rotation - Map Rotation

I think it covers much of my use at the moment, but on occasion I do rely on the mouse for quick map interaction (it's to the right of the stick, on the same height and really easy to reach)

Maybe you could get by with a hat or dual axis for the in-game mouse emulation, but might be tricky to get used to.

Edit: I also make heavy use of Pause, so cumbersome controls are less of an issue.
dtdionne
Posts: 32
Joined: Wed, 30. Oct 19, 08:03
x4

Re: HOTAS Warthog POV Hat + Strafing Issue (Resolved, kinda)

Post by dtdionne »

Excellent info man, thank you. Right now I have the stick POV bound to cursor which is the mouse and cms press bound to menu select and emulate left mouse. The only real issue I have is that the left mouse emulation is being prioritized over menu select.

Return to “X4: Foundations”