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 'General Discussion' started by Drakoz, Feb 28, 2018.

  1. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    52
    Likes Received:
    80
    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: Feb 28, 2018
    • Upvote Upvote x 2
  2. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    52
    Likes Received:
    80
    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:
    52
    Likes Received:
    80
    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
     
    • Upvote Upvote x 1
  5. Drakoz

    Drakoz Member

    Joined:
    Jan 29, 2018
    Messages:
    52
    Likes Received:
    80
    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.
     
    • Upvote Upvote 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:
    52
    Likes Received:
    80
    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:
    52
    Likes Received:
    80
    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
    • Upvote Upvote 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:
    52
    Likes Received:
    80
    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:
    52
    Likes Received:
    80
    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.
     
    • Useful Useful 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:
    52
    Likes Received:
    80
    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:
    52
    Likes Received:
    80
    I started a video, but never completed it. Are you using the script with a Warthog or with a different Thrustmaster device?
     
    • Upvote Upvote 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:
    52
    Likes Received:
    80
    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:
    52
    Likes Received:
    80
    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:
    52
    Likes Received:
    80
    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:
     
    • Upvote Upvote x 1
    • Useful Useful x 1
  26. Pensfanvw

    Pensfanvw Member

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

    Juan Manuel Luengo Member

    Joined:
    Dec 13, 2016
    Messages:
    59
    Likes Received:
    42
    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.
     

Share This Page