Thrustmaster TARGET Script for Warthog Throttle + Saitek TQ

General Discussion Topics

Moderator: Moderators

Locked
User avatar
Drakoz
Getting the hang of things now
Posts: 20
Joined: Sat Jan 27, 2018 9:26 am
Location: San Jose, CA

Thrustmaster TARGET Script for Warthog Throttle + Saitek TQ

Post by Drakoz »

I created a TARGET Script to control the GP38-2, SD40-2, GP40-2, AC4400CW engines in Train Sim World. Yes I currently only have TSW: CSX Heavy Haul. No guarantees it will work with other engines. Most the commuter engines from the other DLC have combined throttle/dynamic brake levers. If those levers are similar to the AC4400CW throttle/brake lever, then this may work, but probably not perfectly. Modifying the script for other engines isn't difficult, so when I get other DLC's, I will update the script.

Hopefully, Dovetail Games will add analog game controller support to TSW eventually so that a kludge like this isn't necessary. If you desire such a feature, go to Dovetail's forums for TSW and let them know.

You can download it here. Read the _README.txt file and the PDF documentation for details and usage.
http://akhara.com/drop/TrainSimWorld/TS ... z_v1.0.zip

The script isn't perfect as it is mapping axes to perform keypresses. Also included are some profiles for the Saitek Throttle Quadrant and the Throttle Quadrant that comes with the Saitek ProFligtht Yoke. You can control the reverser, throttle, independent brake, dynamic brake, and automatic brake all with the Warthog Throttle (Warthog Joystick not needed). The Warthog Left Throttle axis can be set to control all 3 brake levers with a toggle switch. But the Saitek profiles take care of the independent and automatic brake levers so you don't have to task swap on the Warthog Left axis.

If you have wanted to see advanced programming in TARGET, this is an excellent script to learn from. It isn't hugely complicated once you see what I did, but it does go way beyond simple MapKey() commands.
User avatar
Drakoz
Getting the hang of things now
Posts: 20
Joined: Sat Jan 27, 2018 9:26 am
Location: San Jose, CA

Re: Thrustmaster TARGET Script for Warthog Throttle + Saitek TQ

Post by Drakoz »

I just got Great Western Express. I will update this script to work with the engines in GWE soon, plus I should be able to add support for Rapid Transit and NEC NY engines even though I don't have those DLC.
User avatar
Drakoz
Getting the hang of things now
Posts: 20
Joined: Sat Jan 27, 2018 9:26 am
Location: San Jose, CA

Re: Thrustmaster TARGET Script for Warthog Throttle + Saitek TQ

Post by Drakoz »

I did a major update to my TARGET script for controlling TSW engines with a Thrustmaster Warthog Throttle. It works much better now.

- Supports all engines except the DB BR 442 Talent 2 EMU from Rapid Transit (I don't have that DLC - if you have RT and are willing to do some testing, I can add Talent 2 support). I will add support for the Amtrak ACS-64 when Northeast Corridor New York is released.
- Controls the throttle, or throttle/brake combined levers, reverser, as well as the dynamic, automatic, and independent brake levers for all supported engines.
- Now controls the throttle and brake levers in TSW through full travel with no need to use other toggle switches on the Warthog as "helper" switches.
- Use the Flaps switch to select the active brake lever - the script remembers the position you last set for each brake lever and ignores input until you move the lever to that position when changing brake functions. Hence, no issues being out of sync with the brake levers in TSW.
- Of course, it's TARGET - you can map any other functions to the Warthog Throttle that you like, or just use the default mapping I set up. You can add other Thrustmaster devices through this script as well.
- Adding support for additional engines is much easier now.

If you try this out, please let me know. I assume it works the same on other computers as it works on mine, but unless I hear otherwise, I won't know. I know a Warthog Throttle is a bit high end for a train simulator, but I know some of you are flight sim fans and have these things. The tactile feel of using real levers (and a set as nice as the Thrustmaster Warthog Throttle) to drive a train makes using TSW much more immersive.

The Saitek Throttle Quadrant profiles are still included, but I stopped using them as this new version works better even with having to share all three brake levers on one axis by using the Flaps switch to select the active brake lever.

I also included a mod to make TrackIR work using FreePIE. It's just a script that maps TrackIR head movement to control the mouse look. FreePIE supports this with a very simple script.

The TARGET script is still just an axis to keyboard mapper so it isn't perfect, but it works amazingly well. DTG will need to add real axis support to TSW to make it perfect.

Download here:
http://akhara.com/drop/TrainSimWorld/TS ... z_v2.0.zip
User avatar
Drakoz
Getting the hang of things now
Posts: 20
Joined: Sat Jan 27, 2018 9:26 am
Location: San Jose, CA

Re: Thrustmaster TARGET Script for Warthog Throttle + Saitek TQ

Post by Drakoz »

Updated my Thrustmaster TARGET script to add the NEC NY ACS-64. See list of changes below.

Changes:
- Added support for the ACS-64.
- Fixed mistake with CTRL-arrows on the coolie switch. Now all 4 directions perform CTRL-arrow function.
- Added window wipers to the APPAT and APALT switch so now you can change speed of wipers, or move the wiper switch forward/backward a single position depending on the locomotive.
- Added a "resync" pulse at ends of axis travel in case a keypress was missed, and ability to "wiggle" the axis by about 2% of travel to send extra keypresses to move in game lever to full travel. This helps deal with those last few situations where the Warthog axis gets out of sync with the lever in TSW.

Download here:
http://akhara.com/drop/TrainSimWorld/TS ... z_v2_1.zip
User avatar
Drakoz
Getting the hang of things now
Posts: 20
Joined: Sat Jan 27, 2018 9:26 am
Location: San Jose, CA

Re: Thrustmaster TARGET Script for Warthog Throttle + Saitek TQ

Post by Drakoz »

BTW, it is possible to modify this script for other TARGET compatible Thrustmaster devices (HOTAS Cougar, TWCS Throttle, T.16000M joystick, TFRP Rudder, or T.RJ12 USB adapter). With a little DIY, you can even make your own custom locomotive controller that uses this script.

The TWCS Throttle (which can be bought for cheap) or the HOTAS Cougar can each provide 4 axes suitable for controlling locomotive levers. Both the Cougar and TWCS allow for plugging in a rudder pedal set (which has 3 axes). The rudder connector accepts analog signals (0-5V). So you can make a custom DIY 3 axis lever set, or maybe buy one and pull out the wires from its 3 pots or hall effect sensors and connect them directly into the Cougar or TWCS. The 4th axis comes from using the actual Cougar or TWCS throttle axis.

Thrustmaster also sells a USB device called the T.RJ12 USB Adapter which does the same thing. It is normally used to plug the TFRP rudder pedal set directly to your PC without having to go through a TWCS, but it has the same 3 axis input that the TWCS has. The T.RJ12 costs $15. So for $15 plus your DIY lever set, I believe this will provide 3 axis that are compatible with my script.

This isn't for everyone, but for those few of you that have built your own rail driver like device, and are disappointed that TSW does not support it yet, my TARGET script is a path toward getting it to work.

If DTG eventually adds proper game controller support to TSW, what ever you do for your DIY setup will still be immediately compatible because all this stuff is still compatible as a normal DirectX game controller. You just won't need my script anymore.
Locked

Return to “[TSW] General Discussion”