TARGET Script to use two Thrustmaster T16000 Joysticks with E:D

Umm... how do you switch the stick scripts over - so a "South-Paw" can use them. Left hand joystick = control axis and Right Hand Joystick = Power / thrust etc.

There is two different ways:

- The TARGET software does not know about "right" and "left" joystick, it only knows in which order Windows registered them. So to get the intended configuration (left joystick recognized as "Stick1"), you just have to plug your joysticks in different USB slots, until the order is correct. You only to do this once: if you don't unplug your joysticks, the order will be consistent after reboot.

- Or, if you do the small hack I've explained above (which is necessary to get the 2 POV hats working anyway), you can just switch a single value in the script: at line 23:

Code:
define JOYSTICKS_INVERTED 0

replace 0 with 1 if the joysticks are not in the correct order.

I just wished you could get a quality Left Handed HOTAS set up - but no one makes them. :mad: I'm sure they would sell enough of them, even if they charged 50% more -to justify a production run. Any Left Handed flight sim would buy it.... as no-one makes any others.

The only one I'm aware of was a home-made modification of the CH Products HOTAS. I don't know if that person still makes the modification (the post is from 2006...), but maybe you could ask them?

http://www.ch-hangar.com/forum/index.php/topic/3104-the-leftyhotas/
 
HI, many thanks for the reply.

Regarding the CH HOTAS 'South Paw' Mod - I had emailed this chap, several times - but no reply - sadly.

Its just annoying really - as CH make some of the best Flight sticks out there - so you think they could offer a left handed MOD for an increased cost.
 
Question

Hi,

Here is a script I wrote to use two Thrustmaster T16000 joysticks with ED:

https://www.dropbox.com/s/j6zvgt5r51uzhpb/Elite_v1.0.tmc

One advantage of using a second joystick for controlling the speed is that it's easy to find the sweet spot for maneuverability (since it's the rest position of the joystick). However, there is two problems:
  1. If you want to stand still for a while, or cruise at full speed, keeping the joystick pulled or pushed is tenuous.
  2. When you switch Flight Assist off, you generally want to drop your speed to 0 and maintain it there. Again, it's cumbersome with a joystick.

Using the Thrustmaster TARGET software, I wrote a script to correct this two issues. It has the following features:

  • You set a default speed using the slider of your left joystick. This speed will be used when the joystick is at rest. (Note that currently, you can set the default speed by increment of 25% of your max speed).
  • If you push or pull the left joystick, you change the speed relative to the default speed.
  • You can set up a button to act as a FA toggle. Each time you turn FA Off, your default speed is set to 0. When you turn it back on, you return to your previous default speed. (Note that this feature is disabled by default, as the choice of the correct button for this is very personal)
  • You can set up a button to act as a "shift" modifier. When held down, all other buttons have a different binding; this gives access to 22 functions without moving your hands off the sticks. (By default this is bound to the left trigger, but you can change or disable it)
  • When you push the left joystick at maximum speed, a JOY32 button event is generated. This can be useful if you bind it to the engine boost. There is also a JOY31 button event when the stick is pulled to null speed (can be used for reverse). Note that in order to easily bind them in the ED options, these same bindings are also found on the buttons on the base of the joystick.
  • I tried to make the script easy to customize. There are various options and bindings at the start of the file that you can change, without any coding knowledge.
  • One drawback of using this script, is that due to what seems to be a bug in the TARGET software, the POV hat of your second joystick won't be available. I'll try to contact Thrustmaster support to see if there is a fix or workaround.

How to use the script

  1. First you need to install the Thrustmaster TARGET software, if it's not already done.
  2. Start the "TARGET Script Editor" (not the TARGET GUI). Note that you may need to start it in administrator mode, depending on your version of windows and your UAC settings.
  3. Obviously you need to download the script (the link is at the top of the post).
  4. Open the script in TARGET, go to the "tools" tab, and click the "Run" arrow in the toolbar.
  5. To test the script, you can click on the "Device Analyzer" button in the toolbar.
  6. Unfortunately, I didn't find any reliable way to tell which joystick is the left one, and which is the right one. The software pick them in an arbitrary order, and the only way to change it seems to randomly plug the joysticks to new USB slots, until they are recognize in the correct order. Stop the script and restart it to check it.

Hopefully that will be useful to some. If you have any question about it, don't hesitate to ask. If you have suggestions for new features, I'm open to suggestions (within reason ^_^).

For example I'm not sure about the default speed increment: would it be useful to be able to set the default speed more precisely? Hopefully more experienced pilots could give me some feedback on this (i.e. maybe sometime in a dogfight it would be useful to have a default speed slight above or below the sweet spot?).

Hello,

Thanks for the guide. However, I'm very new to joysticks and scripting. I have 2 joysticks. One is a Thrustmaster T16000M and the othe is a Saitek Cyborg Evo. I have Alpha version 1.1 so both joysticks are not recognised independently. Would your script above work for my Cyborg joystick or is this only for 2 T16000M joysticks?

Is there any help you can give me regarding getting my cyborg and T16000M supported in Alpha 1.1?

Cheers
 
Would your script above work for my Cyborg joystick or is this only for 2 T16000M joysticks?

Unfortunately, no. The Target software only works with Thrustmaster joysticks, so you won't be able to combine the sticks, which is mandatory for Alpha 1.1.

However, you might be able to use it in combination with UJR (Universal Joystick Remapper, there is a thread about it in the forum). Run my script first, so that you can use the T16000M for throttle, then run UJR to combine the Thrustmaster virtual joystick with your real Cyborg. I've never tried, so I can't guaranty that this will work...
 
Thanks for the script - dual T1600m owner here.

However, when I compile and run it, I get the following error:

Running script: C:\Users\john\Desktop\Elite_v1.0.tmc
*** Allocated ProcInstances found from the previous run: use FreeProcInstance() ***
Mapped plugin module "C:\Program Files (x86)\Thrustmaster\TARGET\Plugins\sys.dll"
Compile Succeeded.
Physical USB HID devices managed by script!
Currently plugged USB HID devices[2]:
1: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
2: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
USB HID device with hardware id "VID_044F&PID_0404" cannot be found
USB HID device with hardware id "VID_044F&PID_0402" cannot be found
USB HID device with hardware id "VID_044F&PID_b351" cannot be found
USB HID device with hardware id "VID_044F&PID_b352" cannot be found
USB HID device with hardware id "VID_044F&PID_0400" cannot be found
USB HID device "T.16000M"(USB\VID_044F&PID_B10A\5&2594CE40&0&4) selected
Virtual HID devices managed by script!
Connecting virtual joystick...Done
Device name set to Thrustmaster Combined
Connecting virtual keyboard...Done
Connecting virtual mouse...Done
USB HID device with hardware id "USBVID_044F&PID_B10A" cannot be found

main returned 0

It seems to build the virtual stick with all the axes and buttons in place, but the sticks are unresponsive.

Is there an issue with how Windows is assigning IDs to my sticks?
 
USB HID device with hardware id "USBVID_044F&PID_B10A" cannot be found

main returned 0

That's really strange: the two T16000 are apparently detected at the start, but then at least one disappear...

What version of Windows are you using? I had some trouble when I switched to windows 8.1, as the system would put my devices in stand by mode; may be that's your problem?
 
Yeah, Win 8.1 RTM. Did you stick with 8.1 and figure it out, or end up reverting?

Before launching the script, Windows detects both sticks without any issue - I can launch the properties for each and verify they are active.
 
Yeah, Win 8.1 RTM. Did you stick with 8.1 and figure it out, or end up reverting?

I followed the procedure (the one labelled as "workaround") found here: http://support.microsoft.com/kb/2900614/en-us

I'm not 100% sure your issue is the same as mine, as that was some time ago.

Do you use a modified "target.tmh" file (as I described above)? If so, maybe you could try without it.

Could you also try to run an empty script, and see if it gives you the same error?

If all else fail, sometimes unplugging the sticks and plugging them into different USB ports can help. Even if it seems a little too black magic for my taste.
 
Haven't tried the double hat switch fix yet, so no, haven't used that one.

Here's a dump from a blank script, when executed:

Running script: C:\Users\john\Desktop\Untitled.tmc
*** Allocated ProcInstances found from the previous run: use FreeProcInstance() ***
Mapped plugin module "C:\Program Files (x86)\Thrustmaster\TARGET\Plugins\sys.dll"
Compile Succeeded.
Physical USB HID devices managed by script!
Currently plugged USB HID devices[2]:
1: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
2: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
USB HID device with hardware id "VID_044F&PID_0404" cannot be found
USB HID device with hardware id "VID_044F&PID_0402" cannot be found
USB HID device with hardware id "VID_044F&PID_b351" cannot be found
USB HID device with hardware id "VID_044F&PID_b352" cannot be found
USB HID device with hardware id "VID_044F&PID_0400" cannot be found
USB HID device "T.16000M"(USB\VID_044F&PID_B10A\5&1168E4FA&0&2) selected
Virtual HID devices managed by script!
Connecting virtual joystick...Done
Device name set to Thrustmaster Combined
Connecting virtual keyboard...Done
Connecting virtual mouse...Done

main returned 0
 
It may be worth noting that I'm using the front panel USB ports on my case, which Windows might be treating as a hub. I'll try moving them to rear motherboard ports next.

Edit: no dice!
 
Last edited:
I see two other possibilities:

  1. Since we the beta now accept multiple joysticks, we don't need to combine them anymore. In the script, you can change, at line 21, the value of JOYSTICKS_COMBINED from 1 to 0. The downside is that you can't use anymore the shift mode to affect both joysticks (it will only affect the left "throttle" joystick).
  2. Alternatively, you could try to add "&REV_0500" at lines 117 and 121:

    Code:
    		if(JOYSTICKS_INVERTED){
    			&Stick1 = GetIndexJoy(SelectUsbDevice("VID_044F&PID_B10A&REV_0500"));
    			&Stick2 = &T16000;
    		} else {
    			&Stick1 = &T16000;
    			&Stick2 = GetIndexJoy(SelectUsbDevice("VID_044F&PID_B10A&REV_0500"));
    		}

    (Maybe you have a slightly different version of the T16000m and the ID I used is not recognized.)

Hopefully one of these solutions will do the trick...
 
I now use a more traditional HOTAS setup, but I did enjoy the dual sticks setup a lot.

Don't hesitate to ask if you have any trouble running the script (if you inted to use it, that is).

I'll probably do a final update, to give a finer grained control of the "default speed".
 
oh sounds great, i will try it later today... :) :eek:

i open the script and changed combined line 21 i guess to 0. after that compile. How to use this with ED? Or how tocheck everything works fine?

Thanks for any hint

----------------------------------------

This is the output:
Running script: C:\Users\config\Documents\_ED_\Elite_v1.0.tmc
Mapped plugin module "C:\Program Files (x86)\Thrustmaster\TARGET\Plugins\sys.dll"
Compile Succeeded.
Physical USB HID devices managed by script!
Currently plugged USB HID devices[2]:
1: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
2: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
USB HID device with hardware id "VID_044F&PID_0404" cannot be found
USB HID device with hardware id "VID_044F&PID_0402" cannot be found
USB HID device with hardware id "VID_044F&PID_b351" cannot be found
USB HID device with hardware id "VID_044F&PID_b352" cannot be found
USB HID device with hardware id "VID_044F&PID_0400" cannot be found
USB HID device "T.16000M"(USB\VID_044F&PID_B10A\6&23E79E2A&0&4) selected
Virtual HID devices managed by script!
Connecting virtual joystick...Done
Device name set to Thrustmaster Combined
Connecting virtual keyboard...Done
Connecting virtual mouse...Done
Script stopped!

Runtime Error: Bad alias in mapButtons ( line 222 in Elite_v1.0.tmc )

-------------------------------------------------------------------------------------


is it possible to use both sticks in follow way i hope. With the left i would like to use yaw, roll, pitch with the RZ; Y and X. With the right one the y for throtle flight up and down... and the buttons for hyper, jump, boost etc...
 
Last edited:
Runtime Error: Bad alias in mapButtons ( line 222 in Elite_v1.0.tmc )

That's strange, there shouldn't be any error at this line. Did you change anything else in the script? If not, could you try with the original version (i.e. with JOYSTICK_COMBINED set to 1)?

Once you have it running, you can use Windows' device properties dialog on the virtual controller to check if everything works. If this is the case, just launch ED and bind the axes and buttons in the settings.
 
Hi again, yes ialways change from 1 to 0. Will try original. what happen if everything works well? How ED support multiple Joysticks?? What do you know or think about UJR?

regards

snake

With original script get this:

Running script: C:\Users\config\Documents\_ED_\Elite_v1.0.tmc
Mapped plugin module "C:\Program Files (x86)\Thrustmaster\TARGET\Plugins\sys.dll"
Compile Succeeded.
Physical USB HID devices managed by script!
Currently plugged USB HID devices[2]:
1: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
2: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
USB HID device with hardware id "VID_044F&PID_0404" cannot be found
USB HID device with hardware id "VID_044F&PID_0402" cannot be found
USB HID device with hardware id "VID_044F&PID_b351" cannot be found
USB HID device with hardware id "VID_044F&PID_b352" cannot be found
USB HID device with hardware id "VID_044F&PID_0400" cannot be found
USB HID device "T.16000M"(USB\VID_044F&PID_B10A\6&10DF5966&0&4) selected
Virtual HID devices managed by script!
Connecting virtual joystick...Done
Device name set to Thrustmaster Combined
Connecting virtual keyboard...Done
Connecting virtual mouse...Done
USB HID device "T.16000M"(USB\VID_044F&PID_B10A\6&10DF5966&0&3) selected

main returned 0

But should i start the game manually or did TARGET do this. After start ED manually the sticks do not respond also under options in ED if i want to setup everything.

if start the original script i see under Joystick Control Panel a combined device which not react after i try to push pull or press anything on any joystick.

After stop the script i see two t16000m under same box in windows and then i can check anyone of the sticks with succed. Sorry for not native english :)
 
Last edited:
With original script get this:

Running script: C:\Users\config\Documents\_ED_\Elite_v1.0.tmc
Mapped plugin module "C:\Program Files (x86)\Thrustmaster\TARGET\Plugins\sys.dll"
Compile Succeeded.
Physical USB HID devices managed by script!
Currently plugged USB HID devices[2]:
1: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
2: "T.16000M" - "USB\VID_044F&PID_B10A&REV_0500"
USB HID device with hardware id "VID_044F&PID_0404" cannot be found
USB HID device with hardware id "VID_044F&PID_0402" cannot be found
USB HID device with hardware id "VID_044F&PID_b351" cannot be found
USB HID device with hardware id "VID_044F&PID_b352" cannot be found
USB HID device with hardware id "VID_044F&PID_0400" cannot be found
USB HID device "T.16000M"(USB\VID_044F&PID_B10A\6&10DF5966&0&4) selected
Virtual HID devices managed by script!
Connecting virtual joystick...Done
Device name set to Thrustmaster Combined
Connecting virtual keyboard...Done
Connecting virtual mouse...Done
USB HID device "T.16000M"(USB\VID_044F&PID_B10A\6&10DF5966&0&3) selected

main returned 0

Ok, this seems to work with the original script. No idea why setting COMBINED to 0 make it fail...

But should i start the game manually or did TARGET do this.

Yes, you should start the game manually. As long as you start it while the script is running, ED will recognize the virtual controller as a normal joystick.

After start ED manually the sticks do not respond also under options in ED if i want to setup everything.

if start the original script i see under Joystick Control Panel a combined device which not react after i try to push pull or press anything on any joystick.

Depending on your version of Windows, you may have to start the Target Script Editor as administrator, or a normal user. Have you tried both?
 
cool THX, try it when back from shopping, and give you feedback. thousand THX for support, nice from you. Can you check why setting to null produce this error?

regards raphael
 
Last edited:
Back
Top Bottom