1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Thurstmaster Target Script For Warthog Throttle + Saitek Tq Profile

Discussion in 'PC Discussion' started by Drakoz, Feb 28, 2018.

  1. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Update: Latest version of the script is v3.1 - Released April 1, 2020.

    Download from post #40 below (<-- Click to be taken to post 40).

    Adds several new locomotives and a few minor fixes. See post #40 for details.

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

    What is this? Use a Thrustmaster Warthog Throttle to run trains in Train Sim World

    The download contains a Thrustmater TARGET Script that allows a Thrustmater Warthog to accurately control all locomotive levers in TSW, no skipping over locomotive lever notches, no major out of sync issues or frustration getting the in game lever to move where you want it. Yes, it is an axis to keyboard mapper, but unlike others I have seen this one works nearly as well as if Dovetail actually supported a DirectX Game controller. Sadly, though, I cannot use the TARGET Scripting language to make this work with a RailDriver or other game controllers that are not TARGET compatible.

    You can see videos of this in action in post #25 (<-- Click to be taken to post 25).

    Thrustmaster Warthog Throttle
    For most locomotives, the right lever controls the throttle or throttle/brake, the left lever controls the brakes (selected with the FLAPs switch), and the little lever controls the reverser. Functions can be remapped as desired, or the script can be modified to support other TARGET supported Thrustmaster devices (e.g. TWCS Throttle, HOTAS Cougar Throttle, MFD panels to add more buttons, etc.). I have mapped commonly used functions to the Warthog buttons and switches.

    [​IMG]

    Thrustmaster TWCS Throttle

    The new version of the script adds support to use a TWCS Throttle along side the Warthog Throttle to add an extra axis (split out a brake lever to reduce need to use the FLAPs switch). This can easily be changed to support the HOTAS Cougar throttle as well. You could even replace the Warthog Throttle and use just the TWCS by making a DIY 3 axis lever box and attach it to the RJ12 connector on the TWCS (see image below). This gives an inexpensive 4 axis lever box to run TSW, for those looking for a less expensive solution vs. the Warthog.
    [​IMG]

    Why am I doing this? Because I can't stand using a keyboard or Xbox controller to run a train. Using the mouse is OK but still not good enough. I want to have the tactile feel of a real controller. I used Thrustmaster TARGET to program these devices because it is a very powerful scripting language. No other scripting language I've seen makes this possible (short of writing a custom program, but then again TARGET is basically an interpreted C language). I own a RailDriver, but sadly, even the macro language from PI Engineering isn't quite good enough to do what I did in TARGET with the Thrustmater controllers. I may one day convert my efforts here into a custom program that will support all game controllers including the RailDriver, but for now I have chosen to focus on using TARGET.

    The script is free (though donations are accepted to help buy DLC to add more locomotive support). I have to custom program every locomotive in TSW, so the major down side is not all locomotives are supported yet. You can modify it to suite your needs if you understand basic TARGET scripting. And to be frank, the Warthog Throttle actually feels better as a controller than using a RailDriver. But yes, it is a little more expensive than a RailDriver.

    I don't intend people will go out and buy a Warthog Throttle just for Train Sim World, but if you are a flight sim fan, maybe you already have one. The Warthog Throttle normally comes with the Warthog Joystick, but you can buy the Warthog Throttle as a stand alone device for about $250. If you are a flight sim fan, the Warthog is an excellent throttle for airplanes and helicopters as well.

    Please read through the included documentation. It is very complete. Come back here to ask any questions if you need help, or want to request support for a locomotive I haven't programmed yet. If you are savvy with TARGET scripting, I can work with you to add locomotives yourself for DLC I haven't bought yet. Just contact me.

    Regards,
    Michael




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

    Below is my original post when I created this thread. You can ignore this info - it is included for historical purposes only.

    I created a TARGET Script for the Thrustmaster Warthog Throttle 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, 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/TSW_TARGET_Script_Drakoz_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.
     
    Last edited: Jun 26, 2020
    • Like Like x 2
    • Helpful Helpful x 1
  2. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    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/TSW_TARGET_Script_Drakoz_v2.0.zip
     
  3. TrainSim-Jay

    TrainSim-Jay Guest

    This is amazing!

    Thank you for sharing, awesome work :D

    - Jay
     
  4. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    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/TSW_TARGET_Script_Drakoz_v2_1.zip
     
    • Like Like x 1
  5. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    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.
     
    • Like Like x 1
  6. Foxman

    Foxman New Member

    Joined:
    Mar 26, 2018
    Messages:
    4
    Likes Received:
    0
    Thanks heaps for this project, I'm currently working my way through and trying to get it all setup for use with my TWCS, MFD's and T16000 since I don't have the Warthog sadly. Gradually getting the hang of it but bloody hell...DTG really could do us all a huge favour and add the ability to map USB devices and analogue axes directly!
     
    Last edited: May 2, 2018
  7. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Glad someone is trying it out, though sorry to hear you have to change it up to work with the TWCS. The analog axis stuff should map directly to the TWCS analog axis, though sadly with only one unsprung throttle axis, it won't be quite the same. How are you mapping the axis?
     
  8. Foxman

    Foxman New Member

    Joined:
    Mar 26, 2018
    Messages:
    4
    Likes Received:
    0
    I've been working on getting the buttons mapped (decided to start on the stuff I can sort out quickly and easily first :)) so I haven't decided how best to handle the primary axis yet. Was thinking I might try using the T16k for the throttle lever and the TWCS as either independent or auto brake (or toggle between them). Or maybe I get really adventurous and use both my T16k's to setup 3 axes...

    Either way, your scripts are utterly invaluable!
     
  9. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    I've been working on Afterburner replacement notches to give detents for the lever positions for different locomotives. The one pictured below is for the BR43 (left throttle lever is the 7 position brake, right throttle lever is the 6 position throttle). It doesn't work for higher notch counts (e.g. 9 notches for the GP/SD-38/40 doesn't work - not enough space between notches). But it will help a great deal with other engines like the AC4400CW, BR166, or ACS64 where a center notch is important, or for the BR66 for the 3 position brake levers.

    [​IMG]
     
    Last edited: May 10, 2018
    • Like Like x 1
  10. Foxman

    Foxman New Member

    Joined:
    Mar 26, 2018
    Messages:
    4
    Likes Received:
    0
    Nice work! Keen to see the final product :D
     
  11. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    I have been 3D printing them (FDM like on a RepRap, or a MakerGear in my case). They are functional, but of course, these printers don't always make the most pretty parts. Now that I have the percent range figured out (where to put the notches to match a given percent movement on the axis), I can quickly try out parts for other engines.
     
  12. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Here is a picture of the 6 different AB Notch parts needed to support all the engines in TSW. These are the prototypes I printed on my desktop 3D printer, so they look a little rough, but work great. This gives custom physical notches on the Warthog Throttle for each different engine type, hence providing a feature that even the RailDriver does not offer.

    These notches also work with similar engines in Train Simulator using CobraOne's "TS2017 Raildriver and Joystick Interface" which enables DirectX controllers like the Warthog Throttle to work with Train Simulator.

    [​IMG]

    To use them, you replace the original Warthog Afterburner Notch (pictured lower left) with the one for the engine you are using.

    I won't say using a Warthog Throttle is better than a RailDriver - I don't own one so I can't compare. But with these notches, and the excellent build quality and feel of a Warthog Throttle, it makes an excellent rail controller. And of course, the RailDriver does not work for TSW at this time. I have seen several eBay listings for Warthog Throttles in the $200 - $250 range (just the throttle, without the joystick), and the current Amazon price for a Throttle by itself is $270.

    I haven't posted any files for these because I haven't really seen much interest in my TARGET script for TSW. But if you are interested, let me know and I'll see what I can do to make these available.
     
    • Helpful Helpful x 1
  13. Foxman

    Foxman New Member

    Joined:
    Mar 26, 2018
    Messages:
    4
    Likes Received:
    0
    Well...now I want to buy the WH throttle. Might be tough to justify the expense so soon after a bunch of other peripheral purchases recently though ha!

    Damned fine work there mate and it can only get better when DTG add proper USB peripheral support.
     
  14. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Because I don't have Rapid Transit or West Somerset Railway, I can't add support for these to my script. If you own these and want to use the script with them, please contact me. If I get some basic information for these DLC, I can add support quickly.

    Also, if you have used my script please let me know. Honestly, I still don't even know if the script works correctly on all computers as there are some timing factors involved. It should work, but it would be nice to confirm that. Thanks.
     
  15. Carlos Alexandre

    Carlos Alexandre New Member

    Joined:
    Aug 11, 2018
    Messages:
    7
    Likes Received:
    0
    Thrustmaster Warthog Throttle émuito caro aqui no Brasil
    :($$$$$
     
  16. Carlos Alexandre

    Carlos Alexandre New Member

    Joined:
    Aug 11, 2018
    Messages:
    7
    Likes Received:
    0
    Hi .. do you have video using the control in TSW?
    Thank you


    [QUOTE = "Drakoz, post: 26061, member: 5178"] Atualizei meu script Thrustmaster TARGET para adicionar o NEC NY ACS-64. Veja a lista de alterações abaixo.

    Alterar:
    • Adicionado suporte para o ACS-64.
    • Corrigido erro com as setas CTRL no switch coolie. Agora todas as 4 direções executam a função CTRL-arrow.
    • Adicionados limpadores de janela ao interruptor APPAT e APALT, agora você pode alterar a velocidade dos limpadores, ou mover o interruptor do limpador para frente / para trás em uma única posição, dependendo da locomotiva.
    • Adicionado um pulso de "ressincronização" nas extremidades da trajetória do eixo no caso de uma pressão de tecla ter sido perdida, e capacidade de "mexer" o eixo em cerca de 2% da trajetória para enviar pressionamentos de tecla extras para mover a alavanca do jogo para o deslocamento total. Isso ajuda a lidar com as últimas situações em que o eixo Warthog fica fora de sincronia com a alavanca no TSW.
    Baixe aqui:
    http://akhara.com/drop/TrainSimWorld/TSW_TARGET_Script_Drakoz_v2_1.zip [/ QUOTE]
     
  17. Carlos Alexandre

    Carlos Alexandre New Member

    Joined:
    Aug 11, 2018
    Messages:
    7
    Likes Received:
    0
    Hi .. do you have video using the control in TSW?
    Thank you
     
  18. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    I started a video, but never completed it. Are you using the script with a Warthog or with a different Thrustmaster device?
     
    • Like Like x 2
  19. Carlos Alexandre

    Carlos Alexandre New Member

    Joined:
    Aug 11, 2018
    Messages:
    7
    Likes Received:
    0
    I have no control.
    I was thinking of buying the TSW but I gave up for lack of a control to use the simulator
     
  20. Carlos Alexandre

    Carlos Alexandre New Member

    Joined:
    Aug 11, 2018
    Messages:
    7
    Likes Received:
    0
    I do not control this because it is very expensive here in Brazil.
    600 dolar (USA) = R$ 2.500,00 (Brasil)
     
  21. Ralph Atkins

    Ralph Atkins New Member

    Joined:
    Nov 14, 2018
    Messages:
    1
    Likes Received:
    0
    Have not tried the script yet but I am. I have Rapid Transit what info do you need.
     
  22. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Sorry for the delayed response.

    To help setup a new profile for an engine I don't own, I first need to create the table of control positions for all the levers (e.g. if a lever has 7 positions, I need to know that so I can create those 7 positions in the table). It looks like the Talent engine in RT is very similar to the Amtrak ACS-64 for the basic levers (throttle/brake on the left, the other brake lever on the right, and a reverser). Also, there are certain buttons or switches which are good to have programmed on the Warthog Throttle.

    Second, I need to have someone who owns the module verify that the time delays I program in the table are correct. For example getting the brake/throttle lever out of the neutral position to 1% throttle probably requires a long press (like 300ms) of the throttle forward button, but then increasing that throttle from 1% to say 5% is no delay at all. Press the throttle forward button, and the lever immediately moves. So I'll need help verifying I got the delays right. Read the PDF instructions that come with my download above for a more complete explanation.

    If you are still interested, I can use the manual for the Talent engine and youtube videos to figure out the controls. I'll program them in my script and post the result. Then you can help me test/tweak it, or you are welcome to tweak it yourself to get the timing right if you want to dive into it.

    Alternatively, if you start with the ACS-64 mode on my script and try that while running the Talent engine in RT, you may find it is already close or correct for the throttle/brake lever. But the right hand brake lever on the Talent is different than the ACS-64 and I would have to fix that. The reverser might already be correct. So try that and let me know if the reverser and throttle/brake lever at least work.

    Let me know how you want to help, and we'll get it done.
     
    Last edited: Dec 6, 2018
  23. smtaucm

    smtaucm New Member

    Joined:
    Dec 16, 2018
    Messages:
    1
    Likes Received:
    0
    Fantastic work on the script Drakoz!
    It's worked perfectly for me so far and has completely changed my view of this game.

    I spent this afternoon reading through your code to figure out how to add new engines and have managed to to make a rough but working version for the Class 45 from the Northern Trans-Pennine: Manchester - Leeds add-on that came out this week. I may have a crack at the Class 101 and 47 later on this week.

    Thanks again!
     
  24. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Glad to hear it!

    If you want, send me what you have (my email address is at the end of the Word file I included in the set of files) and I'll take a look to see if there are any suggestions I can make, answer questions, or help you clean it up. We can work through email, or I'm happy to get on Skype or other direct communication to help out as well. Then if you don't mind, I would like to release your efforts here to everyone else.

    I was looking over the script last week, as well, to see if I can add other engines I don't have by just seeing how the engines work. Most of them work similar to an engine I have already added. The only think I can't do is verify the timing of the button presses, but if I can add the tables with a guess at the timing, then it will be much easier for someone with the engine to test it and get it working.

    There are enough engines now, that I also need to break the script up into separate scripts for each engine, or groups of engines. I didn't do this at first because there is a lot of common code for all the engines, but I just need to break that common code out into a separate include file. Then it will still be easy to manage, but no pressing a button combo to change to a different engine.
     
  25. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    I posted some videos showing how to use my Thrustmaster TARGET script. I made these videos back in March, but didn't publish them because they got too long and maybe too technical. But several people have asked for videos to see how this works, so I decided to publish them anyway. I guess better to post something rather than nothing at all.

    Part 1 video here (see the entire playlist below):


    Here is a general demo of using the Warthog in TSW - for people that just want to see it in action:


    Here is the entire playlist:
    https://www.youtube.com/playlist?list=PLqB6OrmhBjeGIxAuxg5x6TB4YHyA7xcHs

    And the video demonstrating TrackIR is here:
     
    Last edited: Jun 26, 2020
    • Like Like x 2
    • Helpful Helpful x 1
  26. Pensfanvw

    Pensfanvw Member

    Joined:
    Nov 27, 2018
    Messages:
    66
    Likes Received:
    57
    Thanks Drakoz. I find this very intriguing!
     
  27. Juan Manuel Luengo

    Juan Manuel Luengo Member

    Joined:
    Dec 13, 2016
    Messages:
    69
    Likes Received:
    52
    Drakoz: Everything is very interesting. One question: If I buy the thurstmaster throttle and download the script files... How can I get the models of the notches to be used with the different locomotives?

    I have a friend who has a printer 3D, but ...

    Thanks.
     
  28. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    I've been quiet here for a while, but I bought a few new routes (all the TSW 2020 Deluxe package routes) and I'm updating the TARGET script to support more locomotives. The LIRR M7 is done, and I'm adding the locomotives from the Peninsula Corridor now. A couple people have also contacted me and I am working with them to update the script for engines I don't own. Stay tuned for new stuff coming soon.

    I'll buy a couple more routes before the end of the Winter Sale and do the locomotives for those as well. If you have a request, speak up as it might affect my choice on what to buy. I can't buy them all, but I'll do what I can.
     
  29. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Juan, sorry for not responding about the 3D printed models. It's been a tough year since I had an accident and broke some bones. I'm happy to send you the files. Just PM me.

    Or if there is strong interest, I could put the models up on Shapeways for people without access to a 3D printer.
     
  30. Juan Manuel Luengo

    Juan Manuel Luengo Member

    Joined:
    Dec 13, 2016
    Messages:
    69
    Likes Received:
    52
    Greetings. I'm sorry about your accident and I hope your bones are fine. Thank you for your offer. Happy (and better) year 2020, for you and the whole community.
     
  31. VION

    VION Active Member

    Joined:
    Dec 8, 2016
    Messages:
    226
    Likes Received:
    72
    Hello Drakoz,
    I tested your valuable data using the Free2space mouse mimic head tracking camera with my TrackIR soft and the Saitek Throttle Quadrant as I own two piece of them; after tweaking a lot some values in the Logitech profiler soft, the result is not so much smooth finaly. No doubt a axis mapping in game options and the Track IR support natively by the game would be a better choice.
    Anyway thank you for your effort; I appreciate greatly this possibility. Tested but not convinced for the gameplay at this time.

    Have a nice and good end of week
    Cheers
    Gerard
     
  32. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Here is an update to the TARGET Script for TSW. This is a Work in Progress update. Meaning, I am still adding new locomotives to it and I have not updated documentation, but the locomotives that are new have been tested. The download only includes the TARGET script files. If you are new to this script, download and install the v2.1 package first. Then just copy the v2.2 WIP files over the v2.1 installation. If you understand TARGET scripts, this will all be obvious when you see the files. If not, read the documentation in the v2.1 download.

    Download here - v2.2 200102-1 WIP Update:
    http://akhara.com/drop/TrainSimWorld/TSW_TARGET_Script_Drakoz_v2_2-200102-1-WIP.zip

    For convenience, here is a link to the previous full package - v2.1:
    Nothing new here if you already downloaded the v2.1 package before.
    http://akhara.com/drop/TrainSimWorld/TSW_TARGET_Script_Drakoz_v2_1.zip

    This Youtube Playlist shows some examples of how to use the script.
    https://www.youtube.com/playlist?list=PLqB6OrmhBjeGIxAuxg5x6TB4YHyA7xcHs


    What's new...

    Thrustmaster Warthog TARGET Script for Train Sim World
    Version 2.2 (200102-1-WIP)


    WIP means Work in Progress. Be aware of the following:
    • The script is still being tested. As always, if you find a problem, please let me know.
    • Only the .tmc and .ttm files have been provided. Copy into your TARGET Scripts folder to use them. See the previous release (v2.1) for the complete package including the Beep program and other documentation and files you may be interested in. This update assumes you are familiar with the previous release that contains all the extra files.
    • Several other locomotives will be added to the script in the coming weeks. Then this version will be called "complete" and released as a full package.
    • Changes have been made that may not match the documentation from previous versions of the script. Updated documentation will be completed after the new locomotives have been added.
    See the v2.1 Package (TSW_TARGET_Script_Drakoz_v2_1.zip) for the complete set of files and an explanation of how to install and use this script. It is assumed you already have a basic understanding of how to use TARGET scripts (how to compile and run them). Ask questions if you need help.

    See the included Excel file (TrainSimWorld_Generic_Warthog Controller Layout.xlsx) for a layout of
    how the commands are mapped to the Thrustmaster Warthog Throttle.

    Supported Locomotives

    To change to a different locomotive, press and hold the MSP button, then press the LDGH (Landing Gear Horn Silence Button) several times to cycle through the supported locomotives. Watch the TARGET Script Editor output window, listen to the beeps (if you installed the BEEP program), or look at the LEDs on the Warthog to see which locomotive is selected.
    • SD40-2, GP38-2, GP40-2 (CSX Heavy Haul, NEC New York, Peninsula Corridor)
    • GE AC4400CW (CSX Heavy Haul)
    • British Rail Class 43 HST (Great Western Express)
    • British Rail Class 166 (Great Western Express)
    • British Rail Class 66 (Great Western Express)
    • Amtrak ACS-64 (NEC New York)
    New Locomotives Supported
    • LIRR M7 EMU (Long Island Railroad New York to Hicksville Route)
    • BR Class 45 (Northern Trans-Pennine: Manchester Leeds Route)
    • BR Class 47 (Northern Trans-Pennine: Manchester Leeds Route)
    • BR Class 101 (Northern Trans-Pennine: Manchester Leeds Route) - may support BR Class 101 in Tees Valley Line: Darlington – Saltburn-by-the-Sea Route (untested)
    • EMD F40PH-2CAT and F40PH-2CAT CAB CAR (Peninsula Corridor: San Francisco - San Jose Route)
    Support coming soon for locomotives in the following DLC:
    • West Somerset Railway Route
    • Ruhr-Sieg Nord: Hagen - Finnentrop Route
    • BR Heavy Freight Pack Loco (DLC for Northern Trans-Pennine: Manchester Leeds Route)
    • Main Spessart Bahn: Aschaffenburg - Gemünden
     
    • Like Like x 1
  33. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Gerard, thanks for the feedback. Ya. I wish I could make the Saitek throttle quadrants work with the TARGET script (well, it is possible, but a lot of custom programming). The Saitek software (like most programming software for game controllers) just doesn't cut it. I provided the Saitek profiles as an example of how to make it work, but I use the Warthog and my TARGET script exclusively in TSW. Still hoping one day DTG will add proper game controller support to TSW, but not holding my breath.
     
    • Like Like x 1
  34. VION

    VION Active Member

    Joined:
    Dec 8, 2016
    Messages:
    226
    Likes Received:
    72
    In all case your software and effort to help is greatly appreciated. As right now the Warthog is a very priced controller, only few fortunate gamers can get plenty of happy gameplay. In other side that don't prevent the others to play nicely with a Xbox controller which is natively supported by this game. Sure I would like to use my two Saitek TQ instead the Xbox but still nicely playable with this last one.
    And your saitek profiles helped me a lot as a base to tweak and improve some axis behaviors but it is limited using the Saitek software to get a smooth and flawless movement.
    May be 2020 will be a surprising Year to give great improvement for this game. We hope all to be able to map as desired either the keyboard keys or custom controllers as we would like.
     
    • Like Like x 1
  35. tiger-spiele

    tiger-spiele New Member

    Joined:
    Feb 16, 2020
    Messages:
    3
    Likes Received:
    0
    Hey Drakoz,
    I just bought TSW and really like your script.

    Would you terribly mind to send me the files for the notches?
     
  36. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    I haven't decided what to do about the 3D printed notches just yet. I had to change them radically to get them to print correctly on my printer and I don't think those changes will work on other printers. I must have something wrong with my printer software or something else I missed. I will test print them on a friend's printer to find out. But....

    Before I do that, I need to get the next version of the script out. I made some radical changes to it to make it easier to modify not only the button controls, but also the assigned axis. The script updates are done, but I need to finish the documentation.
     
    • Like Like x 1
  37. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    I don't have the Canadian National Oakville route yet, but a quick test by another user indicates that the GP9 and GP38 of the CN DLC works with the GP38/GP40/SD40 profile in my script. Thanks J.P. for letting me know.
     
  38. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Here is an update to the TARGET Script for TSW. This is the big 3.0 update. It includes several new locomotives as well as significant changes in how the script works. It works the same as before, but for anyone wanting to make changes, the script is easier to work with now and it is easier to select a profile. This is a full release. All files required are in the ZIP file. See the PDF instructions for how to install it. You will need to move or reinstall the wbeep.exe program with v3.0 of the script (now defaults to C:\bin\Sounds).

    Download here - v3.0 Update:
    http://akhara.com/drop/TrainSimWorld/TSW_TARGET_Script_Drakoz_v3_0.zip

    What's new...

    Thrustmaster Warthog TARGET Script for Train Sim World
    Version 3.0
    • Doubled the number of supported engines since the previous full release (and a few more coming soon).
    • The common functions for all engines were mapped in a more consistent manner (e.g. wind shield wipers, cruise control, locomotive headlight/taillight control, cab or console lights, sand, etc.).
    • New audio feedback features were added including text to speech which is used to announce the profile that has been selected, and the ability to play .WAV files. The WAV file feature is disabled by default, but it is available for user customization.
    • Engine profile can be selected up or down the list using two buttons (no more accidentally passing the profile and having to count through all profiles over again to get to the one you want), or quickly select the profile using the Warthog THR_FC lever so you don’t have to press a button 20 times to get to a profile.
    • The script uses a configuration file to save the last profile selected and will default to that profile next time the script is loaded.
    • When selecting a locomotive profile, the order of the selection list is now sorted by world region (e.g. N. America, Britain, Germany) and then by locomotive type number (e.g. BR Class 40, 45, 47).
    • Speed improvements made to make the axis to keyboard mapping more responsive (not as much lag).
    • The Thrustmaster TWCS Throttle has been added to the script to work in aid to the Warthog.
    • The script was significantly modified to make it easier to add or change which game controller axis controls which levers in TSW. It is now very easy to change from using a Warthog to using a TWCS or HOTAS Cougar for example as well as combine axes for multiple Thrustmaster devices to work together.
    • Added the ability to map an axis to output complex keyboard combos (e.g. SHIFT-A, CTRL-A, ALT-A). This was important to support cruise control features on the German locomotives.
    See the v3.0 Package (TSW_TARGET_Script_Drakoz_v3_0.zip) for the complete set of files and an explanation of how to install and use this script. It is assumed you already have a basic understanding of how to use TARGET scripts (how to compile and run them). Ask questions if you need help.

    See the included Excel file (TrainSimWorld_Generic_Warthog Controller Layout.xlsx) for a layout of
    how the commands are mapped to the Thrustmaster Warthog Throttle.

    Supported Locomotives

    To change to a different locomotive, there is a new procedure. Press and hold the MSP button, then press the LDGH button to advance to the next profile, or press the APENG button to go to the previous profile. You can also use the THR_FC axis on the Warthog to more quickly cycle through profiles (move forward to increment profile, backward to decrement profile). Watch the TARGET Script Editor output window, listen to the beeps (if you installed the BEEP program), or look at the LEDs on the Warthog to see which locomotive is selected. When you release the MSP button, the name of the selected profile will be spoken aloud as confirmation.
    • SD40-2, GP38-2, GP40-2
    • GE AC4400CW
    • British Rail Class 43 HST
    • British Rail Class 166
    • British Rail Class 66
    • Amtrak ACS-64
    • LIRR M7 EMU
    • BR Class 45
    • BR Class 47
    • BR Class 101 - may support BR Class 101 in Tees Valley Line: Darlington – Saltburn-by-the-Sea Route (untested)
    • EMD F40PH-2CAT and F40PH-2CAT CAB CAR
    New Locomotives Supported
    • CN GP38-2 and GP-9 (tested and supported by GP38/GP40/SD40 profile)
    • Amtrak SW1000 Switcher
    • BR Class 08 and 09
    • BR Class 40
    • DB BR 143
    • DB BR 182
    • DB BR 185.2
    Support coming soon for the following locomotives:
    • DB BR 1442 Talent 2 (Rapid Transit)
    • DB DoppelStockwagen Control Car (part of DB BR 182 Loco DLC for Rapid Transit)
    • BR Class 33 (Loco DLC for West Somerset Railway)
    • BR Class 52 (Loco DLC for West Somerset Railway)
    • DB BR 155 (Loco DLC for Ruhr-Sieg Nord)
    • BR Class 37/5 (Tees Valley Line)
    • BR Class 31 (Loco DLC for Tees Valley Line)
    • DB BR 767.2 DABpbzfa Control Car (Ruhr-Sieg Nord: Hagen - Finnentrop Route DLC)
    • DB BR 146.2 (Main Spessart Bahn: Aschaffenburg - Gemünden DLC)
    • DB BR 766.2 DBpbzfa Control Car (Main Spessart Bahn: Aschaffenburg - Gemünden DLC)
    • Amtrak ex-Metroliner Cab Control Car IVb (part of Amtrak SW1000 Switcher DLC)
     
    • Like Like x 3
  39. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    A note about the Text to Speech function in the TSW TARGET Script...

    I forgot to mention in my documentation for the v3.0 script that Text to Speech might not work for some people depending on your Internet Security settings, or if you have removed, or never run, or never installed Internet Explorer. In fact one person got a false positive on their virus program because of it. The issue is because I am using a Microsoft Windows program (mshta.exe) and VBScript (Visual Basic Script) to execute a speech command from the Windows Speech API. Because this is part of Internet Explorer, tighter than default security settings, or other issues with Internet Explorer may prevent it from working or even flag as a false positive. If you are concerned about all this, or just don't want to deal with it, see below for how to disable Text to Speech in my script. If it becomes a problem for many people, I will disable it by default in a future release, and those that want to use it will have to enable it instead.

    How to get Speech working

    If Speech isn't working for you, try running Internet Explorer once and exiting it. I mean Internet Explorer, not Microsoft Edge or Chrome. This may configure your Internet Security Settings and allow things to work. If you have changed your Internet Security settings to be more stringent than the default, that may also affect it. But there are too many security settings for me to suggest what you should change if you want it to work. Best I can suggest is to set your security settings back to the default. Also, if you removed or never installed Internet Explorer, you may need to reinstall it. mshta.exe is installed by default with Internet Explorer when Windows is installed, but if you selected an advanced install, it is possible to not install Internet Explorer, or you can remove it later in Windows Settings, or the Control Panel and possibly prevent this from working.

    To check your Internet Security settings, hit the Windows key, and type "Internet options" without the quotes and it should show the Internet Options control panel in the top of the list. Click on that. Then go to the Security tab. The security levels you have set for Local Intranet (or maybe Trusted Sites) is what affects things like my Text to Speech function.

    How to disable Text to Speech

    If you are concerned about all this, or you just don't want text to speech in the TSW script, you can disable the function in my script by changing the line that says:

    define SpeakEnabled 1

    to the following:

    define SpeakEnabled 0

    Want to know more...

    If you want to see my code that does all this, look for the Speak() function, on or around line 1514 in the .tmc file. I have comments and web links there that explain what I am doing, and what mshta.exe is. It is a very useful function, but if too many people have problems getting it to work, I may have to use a different solution.
     
  40. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Thrustmaster Warthog TARGET Script for Train Sim World
    Version 3.1


    Here is the v3.1 update. It mainly includes new locomotives. It works the same as v3.0. See the PDF instructions for how to install and use it. If you haven't updated to v3.0, you will need to move or reinstall the wbeep.exe program to C:\bin\Sounds. All is explained in the documentation.

    Please leave me a comment or a Like if you are using this. Very few people have contacted me about the script, so I don't have much feedback about how well it is working or what changes people would like to see. Those that have contacted me have often gotten WIP (work in progress) versions and had significant input on changes.

    Download here - v3.1:
    This is a full release - you do not need to download any previous versions.
    http://akhara.com/drop/TrainSimWorld/TSW_TARGET_Script_Drakoz_v3_1.zip

    What's new...
    • Added the following locomotives
      • Amtrak ex-Metroliner Cab Car IVb
      • BR Class 31
      • BR Class 33
      • BR Class 37 (uses same profile as BR40)
      • BR Class 52
      • DB BR Class 155
      • DB BR Class 146.2 (uses same profile as DB BR 185.2)
      • DB BR 766.2 and 767.2 Control Cars
      • DB BR 1442-1 Talent 2
    • Fixed an issue with locomotive selection when using the THR_FC lever. Now, THR_FC will be ignored until it is moved to the center first when changing profiles.
    • Fixed a couple issues with the FLAPs switch when changing profiles. No longer need to cycle the FLAPs switch when changing profiles.
    • Fixed direction of BR 101 Reverser control.
    • Set Warthog Throttle Speed Brake switch to decrease the Sand Switch when pushed forward (so now SPDB = Sand, and SPDF = SanDecreasePress).
    • Added Warthog Throttle LTB button to also press the AWS Reset function.
    • For locomotives with a Brake Pin and Neutral/Shutdown position, wait for Pin to disengage before entering Neutral/Shutdown. This affects locomotives like BR 31, 33, 37, 40, 45.
    • A few minor improvements to the axis mapping tables for various locomotives.
    See the file “Drakoz_TrainSimWorld-Release_Notes.txt” for complete details about updates.

    It is assumed you already have a basic understanding of how to use TARGET scripts (how to compile and run them). Ask questions if you need help.

    See the included Excel file (TrainSimWorld_Generic_Warthog Controller Layout.xlsx) for a layout of
    how the commands are mapped to the Thrustmaster Warthog Throttle. The PDF documentation also has comments specific to each locomotive including notes about using the TSW TARGET Script, but also notes about using the locomotives in TSW generally (things that are not documented in Dovetail's manuals).

    Supported Locomotives

    To change to a different locomotive, press and hold the MSP button, then press the LDGH button to advance to the next profile, or press the APENG button to go to the previous profile. You can also use the THR_FC axis on the Warthog to more quickly cycle through profiles (move forward to increment profile, backward to decrement profile). Watch the TARGET Script Editor output window, listen to the beeps (if you installed the BEEP program), or look at the LEDs on the Warthog to see which locomotive is selected. When you release the MSP button, the name of the selected profile will be spoken aloud as confirmation. If speech isn't working for you, or you get an error or virus warning, see the PDF documentation for notes on how to solve the problem or disable speech.

    • LIRR M7 EMU
    • GP38-2, GP40-2, SD40-2 (GP9 should also work, but not fully tested)
    • EMD F40PH-2CAT
    • EMD F40PH-2CAT CAB CAR
    • Amtrak ACS-64
    • Amtrak SW1000R
    • GE AC4400CW
    • Amtrak ex-Metroliner Cab Car IVb
    • BR Class 08
    • BR Class 09
    • BR Class 31
    • BR Class 33
    • BR Class 37 and BR Class 40
    • BR Class 43 HST
    • BR Class 45
    • BR Class 47
    • BR Class 52
    • BR Class 66
    • BR Class 101
    • BR Class 166
    • DB BR 143
    • DB BR 155
    • DB BR 182
    • DB BR 146.2 and DB BR 185.2
    • DB BR 766.2 and 767.2 Control Cars
    • DB BR 1442-1 Talent 2
    Support coming soon for the following locomotives:
    No more planned at this time. When the next sale occurs, I'll probably buy a couple more DLC and add new locomotives at that time. If your favorite locomotive is not supported, contact me and we can add support together. I am willing to work with people over Skype or Discord, screen sharing and such to make this happen. I just can't afford to buy all the DLC at full price, though, so the newest locomotives won't be done until they go on sale or someone is able to work with me over video conferencing to add DLC I don't own.
     
    • Like Like x 2
    • Helpful Helpful x 1
  41. origlugonian

    origlugonian New Member

    Joined:
    Feb 16, 2020
    Messages:
    1
    Likes Received:
    0
    Don't worry, I will keep you current on the latest routes and engines. As they become sale items!
     
  42. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Thanks, any support is greatly appreciated!
     
  43. tiger-spiele

    tiger-spiele New Member

    Joined:
    Feb 16, 2020
    Messages:
    3
    Likes Received:
    0
    Hey Drakoz,

    I have an idea on how to implement the PZB into the script.
    I'd suggest to move the driver awareness systems (SiFa&PZB) to the Warthog stick.
    PZB Acknowlege Button2 (Weapon Release[top right red button])
    PZB Overwrite Button6 (Gun Fire [trigger fully pulled])
    PZB Release Button5 (Master Mode Control[Indexfinger Button;top front right])
    SiFa Button4 (Pinkie Lever)

    that way, one has the feeleing of pushing the buttons, but does not have to take the left hand from the Levers, to acknowledge the SiFa.


    Perhaps make that config an optinal one, that can be enabled by pressing for example MSP+Button6(of the stick).

    PS: and if you are a real MVP and implementing the stick into the script already, could you please implement the trim-POV-Hat for view pan?
     
    Last edited: Apr 23, 2020
  44. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    It is easy to make these changes to the script. I can't make them and publish a new version right now, so I'll explain what to do. This is all using the basic simple TARGET MapKeyIO() commands. No special programming needed.

    I have all the Warthog Joystick button MapKeyIO() commands in the TSW Script, but commented out because I don't use the Joystick. But if you want to add the PZB and Sifa commands as you describe, you can edit the respective lines as follows (find the lines similar to the lines below, and replace them with the lines below). These lines start somewhere near line 235 in the .tmc file.

    This adds the 3 PZB buttons, and also the Sifa enable/disable as you asked. Plus it adds the view pan controls to HAT1 (the POV hat). For the view pan commands, if the UP and DOWN are backwards vs. your preference, swap DARROW and UARROW for H1U and H1D. I didn't have a chance to test if I got it right.

    Make these changes, and these commands will apply to all locomotives. If you want to move them around to other buttons, all the Joystick buttons and hats are there, commented out in my file. So you can make the following changes to any button easily. Hopefully you'll see how from my example below. Or ask for help here.

    Code:
    // MapKeyIO(&Joystick, TG1, 0, 0);
    // MapKeyRIO(&Joystick, TG1, 0, 0);
       MapKeyIO(&Joystick, TG2, 0, PZBOverride);
    
       MapKeyIO(&Joystick, S1, 0, PZBRelease);
       MapKeyIO(&Joystick, S2, 0, PZBAcknowledge);
    // MapKeyIO(&Joystick, S3, 0, 0);
       MapKeyIO(&Joystick, S4, 0, WarningDevEnable);
    
       MapKeyIO(&Joystick, H1U, L_CTL+DARROW, DARROW);
       MapKeyIO(&Joystick, H1D, L_CTL+UARROW, UARROW);
       MapKeyIO(&Joystick, H1L, L_CTL+LARROW, LARROW);
       MapKeyIO(&Joystick, H1R, L_CTL+RARROW, RARROW);
    
    BTW, the view pan commands added to the POV hat are exactly the same as the Coolie Hat on the Warthog Throttle. I think that is what you meant, right?
     
    • Like Like x 1
  45. tiger-spiele

    tiger-spiele New Member

    Joined:
    Feb 16, 2020
    Messages:
    3
    Likes Received:
    0
    Hey,
    thanks for the quick answer.

    I currently use another utility for the SiFa and PZB buttons, but I'll try to integrate them in the script as you suggested.

    I don't know, currently using CTRL+Aroows is no different for me then using the arrows by themselfs...
    This means, that the camera for me does not pan, but rather moves the position of the camera... i'd like to use the POV Hat to look around in the cab while driving (like i'd do if i had a headtracker)
     
  46. Jack O'Track

    Jack O'Track Active Member

    Joined:
    Oct 29, 2019
    Messages:
    214
    Likes Received:
    73
    Thanks for all your hard work. I have tried Target twice in the past with flight simulators and a Warthog set.
    Learned as many others that they work better without Target, via the settings within the sims.
    I use JoyID and USBdeview in case of problems. Is there a way to bypass Target?
     
  47. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Not in this case. It is TARGET that makes this possible. TSW has no direct support for DirectX game controllers (other than the Xbox controller), so there is no way to make a Warthog Throttle work with TSW without using TARGET.
     
  48. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    77
    Likes Received:
    99
    Just noticed Thrustmaster is released a new 2 axis throttle controller. It works with TARGET and costs about $100. Since it has two axis like the Warthog (left/right throttle), it should be easy to make this work almost exactly the way the Warthog Throttle works. The Reverser would have to be configured to work with a switch instead of a lever, and it has far fewer switched and buttons in general, but switches and buttons can be provided easily with any DirectX device using common macro software. It is the axis programming in TARGET that is the big deal.

    If there is interest, I'll look into it.

    TCA Quadrant Airbus edition
    https://www.thrustmaster.com/en_US/products/tca-quadrant-airbus-edition

    [​IMG]
     
    • Like Like x 1
  49. MameAddict

    MameAddict New Member

    Joined:
    Aug 19, 2020
    Messages:
    1
    Likes Received:
    0
    Hi.
    Congratulations for your great work!.
    I'm going to buy this TCA Quadrant Airbus edition to use it in FS 2020, and it would be great if it could be used in Train Sim World 2 too.

    Thank you in advance!

     
  50. maxipolo12

    maxipolo12 Active Member

    Joined:
    Apr 24, 2020
    Messages:
    208
    Likes Received:
    136
    You have a better follow up than DTG himself :D
     
    • Like Like x 1

Share This Page