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 Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    Hopefully TSW2 will support DirectX game controllers soon after release. But thanks for the comment. Not sure I will buy the Airbus controller, but with some help from you or anyone else who has one, I can probably make some simple changes to get it working.

    As for TSW2, not sure if my TARGET script will work with it. As long as they keep the same control system (keep the same key press delay times required to get levers to move in locomotives), then my script should work with TSW2.
     
  2. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    If you have tried my script in TSW2, please let me know if it worked. Sorry, I haven't bought TSW2, but it would really help me to know if it works or not. Of course it will only work on locomotives that my script supports, which means all Sand Patch Grade locos and the standard Peninsula Corridor locomotives.

    RailDriver and DirectX game controller support is on the Roadmap for TSW2, which means they are actually working on it, but that could still be a while before it comes. So l'm asking to see if I will need to work on support specifically for TSW2 as well in the mean time, or if supporting TSW DLC is good enough to support TSW2.

    Thanks.
     
  3. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    Dovetail just released a Beta of TSW2 that supports the Raildriver! DirectX is not yet supported, so it doesn't yet replace my script if you are still using it for your Warthog or TWCS. I haven't tested my script in TSW2 yet, but I will be doing that in the next few days. I assume it works. But of course, I hope very soon Dovetail will make my script obsolete and we can all enjoy proper game controller support in TSW2.

    Thank you Dovetail.
     
    Last edited: Dec 23, 2020
    • Like Like x 2
  4. Basti

    Basti New Member

    Joined:
    Feb 9, 2021
    Messages:
    1
    Likes Received:
    0
    Hello everyone, I just wanted to ask if you need to install target in order to use the logitech throtlle quadrant or yoke? I moved the files into the specific folder and also installed the drivers but I don't know how to get them working in TSW.
     
  5. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    You do not need to install TARGET to use the Logitech profiles I provided. Those profiles are intended to work with the Logitech/Saitek Profile software for the Logitech/Saitek Pro Flight Yoke or Pro Flight Throttle Quadrant. They have nothing to do with Thrustmaster.

    To use them, you need to install the Logitech/Saitek profile software for your yoke or throttle quadrant (which may be a different download from the drivers for your device - I forget if they are separate installers or not), copy the profiles I provided to the proper directly as explained in the readme file with my files, and then load the profile into the Logitech profile software. That last step is probably the part you are missing. You must load the profile software and then select the desired profile to enable it.
     
  6. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    Update on testing my script with TSW2...

    I have seen some locomotives have slightly different control timing for TSW vs. TSW2. For example, the timing for the Automatic brake on the GP/SD38-40 locomotives is slightly different when going into Handle Off, so in TSW2, sometimes, my script fails to move the auto brake through full travel (gets out of sync vs. the in game lever).

    In most cases, the script works fine for TSW2, but you may experience out of sync issues more often on some controls. If you are having trouble with this on a particular locomotive, let me know here, and I will fix it. I can't verify them all right now as I have to re-check every loco one at a time, but if people report issues with specific locomotives, I can fix them quickly and release an update.

    Again, very few people use this script, so if something isn't working for you, speak up and I'll do my best to help. But if I don't hear anything, I likely won't fix issues for a very long time.

    Looking at the roadmap for TSW2 and game controller support, it looks like they are going through the same process I have, having to design controller support on a per locomotive basis, which means it could be a long time before all locomotives are supported. I will continue supporting my script until Dovetail makes my efforts obsolete, but it looks like that will be a while. Regardless, I will always support the script for TSW.
     
  7. Nuggit82

    Nuggit82 New Member

    Joined:
    May 1, 2020
    Messages:
    15
    Likes Received:
    0
    Hi Drakoz, first of all... have been using your script for a while. Just bought TSW2 now and looked through the supported locos and cant find DB BR 406 ICE 3M in the list, any plans to adding this?
    Or would it be possible to provide a tutorial how to create the scripts myself? (perhaps its rocket science and not even worse looking into)...
    Thanks for great contribution.:)
    /N
     
  8. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    It will a few weeks before I can get back to updates for my script. I will add the 406 ICE then as well as a couple other DLC I got recently. Or I am happy to work with you to learn how to do it. It is simple in basic concept, but more complex to make it work well. Lots of little techniques I use with different locomotives depending on the complexity of the loco's controls. So difficult to make a tutorial.

    If you understand programming a little, you should be able to figure a lot out. Hit me up with questions, or I'm happy to get on a voice call (and screen sharing) to show you a few things to make it more clear.
     
  9. tiger-spiele

    tiger-spiele New Member

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

    I have done a bit of editing in the profile of the GP38/SD40, to make them usable in the game Derail Valley.

    Am I allwoed to share the edited script with other people, who might want to drive trains in Derail valley with their Warthogs?
    You will of course be mentioned as the creator of the script, and i have not removed any of your headers in the scripts.
     
  10. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    tiger-spiele The script is offered as an example of TARGET programming, so I would hope others can use it for different games. Yes, please make sure people know the origins of the script. I don't say that so much for crediting me, but to make sure people have access to discussion, history, and knowledge about using the script.

    Please let me know where you post it if it is a public forum. I haven't bought Derail Valley (considered it), but I would be happy to participate in discussions about it and would love to see your work. Thanks!
     
    • Like Like x 1
  11. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    I bought a Thrustmater TCA Throttle Quadrant Airbus edition to try on my script with TSW.

    It works well. I plan to use it along side my Warthog so I will have 5 levers (reverser, throttle, dynamic brake, automatic brake, and independent brake). I will also make a version of the script to use the TCA Quadrant stand alone, where the right lever is the locomotive throttle, and the left lever can be switched on the fly to control the 3 different brake levers (just like I have setup the Warthog Throttle).

    [​IMG]

    I like the feel of the TCA levers, but if you throw them all the way forward quickly (like shutting off the locomotive throttle), it will lift the front of the throttle quadrant - it is a balance thing. By default, the levers have detents, but you can disable that to get smooth lever operation. The latches on the levers (to enable reverse thrust on an Airbus jet) are easy to operate, and you can disable them to get full travel of the lever if desired. I set up the left lever where flipping the latch and pulling back enabled bail off, but disabled the right lever latch to get full travel for the locomotive throttle. All levers use hall effect sensors - so no issues with horrible pots going bad.

    Sadly, it has very few buttons and switches which is a BIG disappointment.

    You can stack two of them side by side to get 4 levers and a few more switches.

    You can also buy the TCA Quadrant Addon (Thrustmaster TCA Airbus Quadrant Add-on - MyPilotStore.com) which adds 2 more levers and a few more switches. So up to 6 levers are possible using two TCA Airbus Quadrants and a single Quadrant Addon pack.

    [​IMG]

    Aside from the limited number of switches, I think Thrustmaster has a winner here. I have been recommending the Logitech/Saitek 3 lever throttle quadrants for years as the best generic "lever" game controller (not for TSW, but for TS and flight sims). But the Saitek quadrant uses pots which go bad eventually. That won't be an issue with hall effect sensors on the TCA products. So these are my new suggested generic "lever" for gaming.

    I am not recommending everyone go out and buy the TCA Quadrant and Quadrant addon just to work with my script. But as I have said all along, if you are a flight sim fan and own one of these Thrustmaster throttle quadrants (Warthog Throttle, TWCS, or now the TCA Quadrants), these devices are great for flight sims, and my script lets you use them with TSW as well.

    BTW, I bought the TCA Quadrant for cheap, $120 from MyPilotStore.com - Thrustmaster TCA Quadrant Airbus Edition - MyPilotStore.com. Normal price is more like $160. Looks like they have a good price on the Add-on Levers too. But that isn't available yet.
     
    Last edited: Mar 25, 2021
  12. TKessel

    TKessel New Member

    Joined:
    May 5, 2021
    Messages:
    2
    Likes Received:
    0
    So I just stumbled across this and it made me to finally register to the forums!

    Drakoz thank you so much for this Target Script! I would really love to see it updated in the future! I would like to support your work if this is possible.
     
  13. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    TKessel Thanks for letting me know.

    What TSW routes/engines are you most interested in, and TSW or TSW2? I have some new DLC for TSW that I haven't yet added to my script, and I still need to adjust the script to work with TSW2 vs. TSW (there are some slight differences in the key press timing). I hope to make these updates in the next few months, but a new job has me busy for the moment.

    Support is always appreciated, but not necessary. Just let me know what DLC you care about and if I haven't added it yet, I'll try to add it. Most important is if you find any issues, let me know and I'll fix them sooner than later. There is always a chance updates to the game will break things, or as shown with TSW2, the timing in my script for TSW doesn't always work for TSW2. Thanks!
     
  14. VION

    VION Active Member

    Joined:
    Dec 8, 2016
    Messages:
    242
    Likes Received:
    86
    Hello Drakoz,
    Just coming back on this very pleasant work you done, I recently bought the TM Throttle quadrant and Stick airbus edition to play with MSFS2020.
    I'm mainly interested for TSW2 now and have mainly the TSW locos ADD'ons to play in TSW2.
    I discovered the TM Script editor software and tested some basics command of programmation inside but just to test them. For MSFS I don't use any script but for another flight sim P3D v5, I use the TARGET GUI to map my Stick Pov as keyboards keys pulse.
    I have learn all the documentation coming with the TARGET Script program; but for now I'm a bit confuse as so much ways there to execute same action we wish. To execute some basic command that is enough easy but for some complex else, I don't know how to do. I'm not an expert in C language but understood the power of this scripting method.
    Here is not the subject I wanted to talk about.
    Question: does your TARGET Script works using the TM Airbus Throttle Quadrant or do I have to modify some command in your Warthog script to be able to use the TM Airbus Throttle Quadrant please?
    To read you soon
    All the best is coming.
     
  15. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    Yes, my current script can be easily modified to enable the TCA Throttle Quadrant, but I haven't released these changes yet. If you understand the script (the KeyAxis() ) command, it isn't hard to add your TCA for a couple locomotives to try it out. I have an example below. Otherwise, I am adding this to the script as I have time, but I can't promise anything soon. I have to add it and test every locomotive one by one.


    Technical details....

    You can try the TCA Throttle now with the current script. But you have to disable all the detent positions on the TCA Quadrant, including the setting that creates the reverse thrust detent. This makes the TCA levers work for full travel on the locomotive levers, but we loose the ability to do Bailoff. I have made an update for the KeyAxisDirectional() command that will allow using the TCA Quadrant Reverse Thrust setting for Bail off. It works great, but I can't release it until I finish my current changes.

    To add the TCA Quadrant, you would have to create new KeyAxis() commands for your locomotive of choice to use the TCA Quadrant and the axis you desire.

    For example below is the code I added to my script (but haven't released yet) for the SD/GP38/40 locomotives. See the last few lines for the TCA Quadrant and notice the differences vs. the KeyAxis() commands for the Warthog Throttle and the TWCS Throttle. The commands for specific Locomotive levers are exactly the same except you must assign the TCS Quadrant and axis, and you must also use the AXIS_REVERSED command at the end of the KeyAxisDirectional() command (like I had to with the TWCS Throttle as well). This is because both the TWCS throttle and the TCA Throttle give their position data in reverse compared to the Warthog Throttle.

    Also, in my example below, I only mapped the TCA Quadrant to drive the Automatic Brake and the Independent Brake. So now I use a Warhog Throttle and the TCA side by side to give me 4 full size levers to control the locomotive throttle and the Independent, Automatic, and Dynamic Brakes all on their own levers now. No more using the FLAPS swtich to flip the function of the brake lever. If you buy 2 TCA Throttle Quadrants, you can use both at the same time and get 4 levers, or you can add a TCA Quadrant Add-on (when it is available - I think they just hit the market finally), which adds the 2 extra side levers, and that gives you 4 levers. Use 2 TCA Quadrants and the TCA Add-on, and you get 6 levers, and all 6 can be used with my script by just adding the appropriate KeyAxis() commands for each lever. This is a nice setup as 6 levers is enough to handle all the levers on the German locomotives, for example, without any axis swapping.

    If you only have the TCA Throttle Quadrant, you'll need to assign a 3 position switch on the TCA to control selection of the brake levers. You do that by changing the "define UMDAxis" command in the .ttm file.

    Sadly, the TCA does not have a lever that can be used to control the reverser, and there aren't very many buttons and switches on it either. This is the big disappointment on the TCA Quadrant.

    I know this may be confusing, but if you care to try to add the TCA yourself, I wanted to give you a starting point at least.

    Oh, and don't forget, you'll have to upgrade to the latest version of TARGET to support the TCA Airbus Stick and Throttle.

    Code:
        // Warthog THR_RIGHT axis config - engine throttle
        KeyAxis(&Throttle, THR_RIGHT, 'o', AXMAPEXEC("KeyAxisDirectional(&Throttle, THR_RIGHT, &pro_SD40GP38_ThrZoneList, &pro_SD40GP38_ThrActionUP, &pro_SD40GP38_ThrActionDN);"));
        // Warthog THR_LEFT axis config using UMD Switch - U=dynamic brake, M=automatic brake, D=indepedent brake
        KeyAxis(&Throttle, THR_LEFT, 'u', AXMAPEXEC("KeyAxisDirectional(&Throttle, THR_LEFT, &pro_SD40GP38_DynZoneList, &pro_SD40GP38_DynActionUP, &pro_SD40GP38_DynActionDN);"));
        KeyAxis(&Throttle, THR_LEFT, 'm', AXMAPEXEC("KeyAxisDirectional(&Throttle, THR_LEFT, &pro_SD40GP38_AutoZoneList, &pro_SD40GP38_AutoActionUP, &pro_SD40GP38_AutoActionDN);"));
        KeyAxis(&Throttle, THR_LEFT, 'd', AXMAPEXEC("KeyAxisDirectional(&Throttle, THR_LEFT, &pro_SD40GP38_IndZoneList, &pro_SD40GP38_IndActionUP, &pro_SD40GP38_IndActionDN);"));
    
        // TWCS Throttle axis config - dynamic brake
        KeyAxis(&TWCSThrottle, TTHR, 0, AXMAPEXEC("KeyAxisDirectional(&TWCSThrottle, TTHR, &pro_SD40GP38_DynZoneList, &pro_SD40GP38_DynActionUP, &pro_SD40GP38_DynActionDN, AXIS_REVERSED);"));
    
        // TCA Throttle Quadrant QT_RIGHT axis config
        KeyAxis(&TCAQuadrant12, QT_RIGHT, 'o', AXMAPEXEC("KeyAxisDirectional(&TCAQuadrant12, QT_RIGHT, &pro_SD40GP38_AutoZoneList, &pro_SD40GP38_AutoActionUP, &pro_SD40GP38_AutoActionDN, AXIS_REVERSED);"));
        // TCA Throttle Quadrant QT_LEFT axis config
        KeyAxis(&TCAQuadrant12, QT_LEFT, 'o', AXMAPEXEC("KeyAxisDirectional(&TCAQuadrant12, QT_LEFT, &pro_SD40GP38_IndZoneList, &pro_SD40GP38_IndActionUP, &pro_SD40GP38_IndActionDN, AXIS_REVERSED);"));
    
     
    Last edited: Jun 5, 2021
  16. VION

    VION Active Member

    Joined:
    Dec 8, 2016
    Messages:
    242
    Likes Received:
    86
    Good evening Drakoz,
    I have just read your reply on Tuesday, whereas you had replied to me on Saturday; I have taken note of your code example. As the Target script merges several real controllers into one virtual controller, and as I also have a Saitek Flight Throttle Quadrant next to the TCA Throttle Quadrant, would it be possible for me to use both devices to get five virtual axes in total. Of course I saw and read in your demonstration videos, that the levers of the Saitek TQ did not react as expected but had an annoying tendency to mimic successive key presses. In your example code, I wonder why you don't use the "mapAxis" command instead of Keyaxis; as far as I understand with TSW2, it waits for keystrokes and not the movement of any axis. This is certainly why you use the "keyaxis" command.

    With the help of your code, I will test and normally everything should work but I will also try to include my Saitek Throttle Quadrant even if it is not a thrustmaster one since in their script usage document, the TARGET program can include any type of USB controller. While waiting to buy a Thrustmaster airbus addon edition, I'm going to experiment with the Saitek TQ. In any case, I'm going to dive back into the script documentation to learn how to use all the commands and see more specifically the function declarations to use them in a script. A long time ago, in the early days of consumer computing and the windows system in 1987/89, I tried to make small code programs in Qbasic to reproduce sine curves on the screen and vary their frequency. It was the beginning of scientific calculators with graph displays. I have always been interested in programming; Visual Basic was quite intuitive and gave good results. But reading books on programming I soon realised that it wasn't my favourite thing to do because of all the weird names used in the codes. What always appealed to me were arrays that could be used in the code as a source of data used in a loop instead of iterating the same loop until it was conditionally exited.
    Anyway, I'm going to dive back into this TARGET script to try to bring out something interesting for our TSW2 game and for personal satisfaction too.
    I am long, so I apologize.
    See you soon.
    Very warmly.

    Translated with www.DeepL.com/Translator (free version)
     
  17. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    Yes, it is possible to use a Saitek Throttle Quadrant with the TCA, but they must work independantly. TARGET does not support Saitek controllers. I cannot combine the Saitek and Thrustmaster controllers into a virtual controller because TARGET does not allow that for non-Thrustmaster devices. The Saitek profiles I provide work only with the Logitech/Saitek Profile software. Most other game controllers have simple software like this which will do the same thing.

    [Edit - I confused MapAxis and KeyAxis - so I have added this paragraph and fixed my mistakes in paragraphs below] You said MapAxis(), but MapAxis() has nothing to do with axis to keystroke functions (move an axis and press keyboard keys as the axis moves). MapAxis() maps a Thrustmaster Axis (like the Right Throttle) to a DirectX axis (such as DX_X_AXIS). KeyAxis() is the TARGET command for mapping an axis to press keystrokes as it moves, but KeyAxis() doesn't do what I need to make TSW work.

    For a simple lever like the independant brake, the Saitek profile works OK if you use it carefully (move it slowly), as I describe in my video. But for complex levers like the automatic brake on most locomotives, the Saitek profile software lacks the ability to perfectly control the key presses, hence the Saitek lever and the locomotive lever get out of sync almost immediately. Even TARGET does not have this ability using built in commands like KeyAxis() using AXMAP1 or AXMAP2. That is why I had to create the custom function, KeyAxisDirectional(), which is used with TARGET's KeyAxis() command similar to AXMAP1() or AXMAP2(). It solves the sync problems by making sure TSW and the axis don't get out of sync.

    In fact, TARGET's KeyAxis() command (with AXMAP1() or AXMAP2()) is very similar to what the Saitek Profile software can do. Again, most game controllers today come with simple profile software that can do an axis to key function. Two forms of axis to key press are available - 1) press one key when moving the axis forward, press another key when moving the axis backward, or 2) set a number of zones, and press a key when you enter a zone. Problem is with 2, you get the same key press whether you enter the zone with a forward axis movement or an backward axis movement. But to make things work with TSW, I need 1 and 2 at the same time - I need zones and the ability to press one key when moving forward into a zone, and a different key when moving backwards into a zone. My KeyAxisDirectional() command does both 1 and 2 at the same time. I have not see any other game controller software that has this kind of axis to key mapper. Even KeyAxis() only supports 1 or 2 (using AXMAP1 or AXMAP2), but not both at the same time. You can't use AXMAP1() and AXMAP2() at the same time. So I created KeyAxisDirectional().


    Sadly, TARGET only supports the following USB devices (which are all Thrustmaster devices). The VID numbers are the USB ID's and TAGET is hard coded to support only these VIDs. TARGET doesn't even support all Thrustmaster devices, just the ones below. This info can be seen in the top of the target.tmh file.

    Throttle = "VID_044F&PID_0404" Warthog Throttle
    Joystick = "VID_044F&PID_0402" Warthog Joystick
    LMFD = "VID_044F&PID_b351" Left MFD Panel
    RMFD = "VID_044F&PID_b352" Right MFD Panel
    HCougar = "VID_044F&PID_0400" HOTAS Cougar Stick and Throttle
    T16000 = "VID_044F&PID_B10A" T.16000 Joystick (Right hand setup)
    T16000L = "VID_044F&PID_B10B" T.16000 Joystick (Left hand setup)
    TWCSThrottle = "VID_044F&PID_B687" TWCS Throttle (throttle that comes wiht T.16000 HOTAS Setup)
    TFRPRudder = "VID_044F&PID_B679" TFRP Rudder (through a USB dongle to allow hooking up the TRFP Rudder stand alone)
    TFRPHARudder = "VID_044F&PID_B68F" TFRPHA Rudder Pedal Set
    JoystickF18 = "VID_044F&PID_0403" F18 stick on Warthog Joystick base
    A320Pilot = "VID_044F&PID_0405" Airbus TCA Joystick in Pilot Config
    A320Copilot = "VID_044F&PID_0406" Airbus TCA Joystick in CoPilot Config
    TCAQuadrant12 = "VID_044F&PID_0407" Airbus TCA Throttle - set to Throttle 1&2
    TCAQuadrant34 = "VID_044F&PID_0408" Airbus TCA Throttle - set to Throttle 3&4

    Note the TCA throttle Add-On is supported through the TCA Throttle Quadrant.

    Also, Thrustmaster sells a dongle (the T.RJ12 USB adapter) that is basically a 3 axis to USB converter that is TARGET compatible. See my post #5 in this thread where I talk about it (click here to go to post #5).

    Here is a link to Thrustmaster's page on the T.RJ12 - Click Here. But it might be hard to buy one today.

    Ya, I did the same with my first IBM PC type computer in the '80's. It was really neat to create mathematical graphs on the computer back then using simple BASIC.


    Yes, and you'll notice that KeyAxisDirectional() uses arrays to work - as I am sure you have seen in the "Drakoz_TrainSimWorld_Warthog.ttm" file. So when I create a new profile for a locomotive, I am mostly creating those tables.
     
    Last edited: Aug 12, 2021
  18. VION

    VION Active Member

    Joined:
    Dec 8, 2016
    Messages:
    242
    Likes Received:
    86
    Hello Drakoz,
    You have effectively explained to me why I will not be able to use the Saitek TQ in the TARGET application; so I will give up my tests on this subject because I had already experimented with the use of the Saitek TQ using your script but with the software that comes with the Saitek by making some adjustments on the delays and macro commands but unfortunately it had not really convinced me and you explain here very well why.
    While rereading last night the whole document about the use of the TARGET Script, I noticed that the Keyaxis() command was explained and included in the tmh header; as said in the document it is used to use controller axes to simulate keyboard presses which in the case of TSW2 is the main object. You will forgive me because I had skimmed the explanatory document without reading further.
    In any case it will give me an additional impulse to dive back into the throes of programming.
    Thank you in any case for all that you do. Concerning the native support of Track IR, I think it's in the development program of TSW2 in a not so distant future; it will be already a very good progress for the pleasure of the gameplay.
    I wish you all the best.
    Thanks again for your research and efforts.
    Very warmly.
    Gerard
    PS: I forgave to ask where to find the short words for the physical buttons and Hat Pov and axis on the TCA Airbus edition please if you know ?

    Translated with www.DeepL.com/Translator (free version)
     
    Last edited: May 26, 2021
  19. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    Gerard, Thanks for your comments. If you have more questions, just ask. The included document with the script is a little out of date for the technical explanation section, but still useful to understand the concept.

    To find the short words for the physical buttons and HAT POV and axis names, look in the Thrustmaster defines.tmh file.
     
  20. philnash69

    philnash69 New Member

    Joined:
    Jun 20, 2021
    Messages:
    1
    Likes Received:
    1
    Just bought TSW2 which was on discount with East Coast DLC. I was shocked and disappointed at the lack of controller support in this sim. As a flight simmer, sims live and die on their controller support, but it seems console support is deemed more important. Any, Drakoz you are my saviour and thankyou for all the hard work you put into this. Although the Class 377 isn't in your engine list, using the Target script with the AC4400 config. is workable and far better than keyboard
     
    • Like Like x 1
  21. kris.l.hanson

    kris.l.hanson New Member

    Joined:
    Jul 30, 2021
    Messages:
    1
    Likes Received:
    0
    Drakoz What tremendous work on what has been a long-time gap in the basic TSW 2 functionality. I had no issues with your script (using the Thrustmaster Warthog). Great job and thank you.
     
  22. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    I have started major updates to my script to add the TCA Throttle Quadrant in support of the Warthog. More on that in a moment. But I wanted to answer your question above in more detail.

    Here is the list of words used to reference the TCA Throttle, and TCA Add-on axes and buttons. Don't forget, TARGET supports 2 TCA Throttles at the same time which can give 4 axes. They are called TCAQuadrant12 and TCAQuadrant34. You would use them as &TCAQuadrant12, for example, in place of &Throttle in my script.

    If you have questions, just ask.

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

    Following list is from defines.tmh, updated with my comments.

    Applies to the following devices:
    alias TCAQuadrant12 // TCA Throttle set as device 12
    alias TCAQuadrant34 // TCA Throttle set as device 34

    Note, this allows 2X the following set of buttons and axes. So 8 DirectX Axis are possible
    using 2 TCA quadrants, each with a TCA Add-On connected to them.


    // ----------------------------------- TCA Quadrant interface --------------------------------
    // TCA Quadrant Buttons
    define QT_BTN1 0 // - Left Axis Red Button
    define QT_BTN2 1 // - Right Axis Red Button
    define QT_BTN3 2 // - Left ENG Switch
    define QT_BTN4 3 // - Left ENG Switch
    define QT_BTN5 4 // - Left Push Button
    define QT_BTN6 5 // - Right Push Button
    define QT_BTN7 6 // - MODE Switch set to CRANK
    define QT_BTN8 7 // - MODE Switch set to IGN/START

    // TCA Quadrant - Left Axis Virtual Buttons
    define QT_VL_BTN1 8 // - Button 1 (axis all the way forward)
    define QT_VL_BTN2 9 // - Button 2 (axis middle forward)
    define QT_VL_BTN3 10 // - Button 3 (axis middle back)
    define QT_VL_BTN4 11 // - Button 4 (axis all the way back)

    // TCA Quadrant - Right Axis Virtual Buttons
    define QT_VR_BTN1 12 // - Button 1 (axis all the way forward)
    define QT_VR_BTN2 13 // - Button 2 (axis middle forward)
    define QT_VR_BTN3 14 // - Button 3 (axis middle back)
    define QT_VR_BTN4 15 // - Button 4 (axis all the way back)

    // TCA Quadrant Add-On Buttons - Flap Lever (right hand lever)
    define QF_BTN1 16 // - Flap - Push Button
    define QF_BTN2 17 // - Flap - RUD TRIM Left
    define QF_BTN3 18 // - Flap - RUD TRIM Right
    define QF_BTN4 19 // - Flap - PARK BRK

    // TCA Quadrant Add-On Buttons - Speed Brake Lever (left hand lever)
    define QS_BTN1 20 // - Gear UP/DN Lever (in UP position)
    define QS_BTN2 21 // - AUTO BRK Position 1 (full CCW)
    define QS_BTN3 22 // - AUTO BRK Position 2
    define QS_BTN4 23 // - AUTO BRK Position 3
    define QS_BTN5 24 // - AUTO BRK Position 4
    define QS_BTN6 25 // - AUTO BRK Position 5 (full CW

    // TCA Quadrant Add-On - Speed Brake Virtual Buttons
    define QS_V_BTN1 26 // - Button 1 (axis all the way forward - RET)
    define QS_V_BTN2 27 // - Button 2 (axis middle forward)
    define QS_V_BTN3 28 // - Button 3 (axis middle - 1/2)
    define QS_V_BTN4 29 // - Button 4 (axis middle back)
    define QS_V_BTN5 30 // - Button 5 (axis all the way back - FULL)

    // DirectX Axes
    define QT_LEFT IN_POSITION_AXIS_X // Throttle Left axis - TCA Quadrant
    define QT_RIGHT IN_POSITION_AXIS_Y // Throttle Right axis - TCA Quadrant

    define QF_FLAP IN_POSITION_AXIS_Z // Flap Axis - TCA Quadrant Add-On Right Axis
    define QS_SPEED IN_POSITION_AXIS_RZ // Speed Axis - TCA Quadrant Add-On Left Axis

    // For Plug In Rudder Pedals
    define QR_LEFT IN_POSITION_AXIS_RY // Rudder Left Pedal Axis
    define QR_RIGHT IN_POSITION_AXIS_RX // Rudder Right Pedal Axis
    define QR_RUDDER IN_POSITION_AXIS_SLIDER1 // Rudder Axis
     
  23. Drakoz

    Drakoz Active Member

    Joined:
    Jan 29, 2018
    Messages:
    100
    Likes Received:
    115
    Finally I have time to do major updates to the TARGET script. Here is a list of what I am doing. I hope to release this in a few weeks.

    Here is the list of what I am doing:

    - Added TCA Quadrant to work along side the Warthog - gives 5 dedicated levers (reverser, throttle, dynamic brake on the Warthog, with automatic and independent brakes on the TCA Throttle).

    - Adding several new locomotives, including the standard TSW2 locos. I don't have much of the TSW2 only DLC. Speak up and let me know what TSW2 DLC is most interesting.

    - Breaking the script out into a TSW and TSW2 version because too many of the TSW2 locomotives are slightly different vs. TSW. Also, Dovetail is not adding new locos to TSW, so that script does not need the new TSW2 locomotives. But I will maintain the same features on both scripts.

    - Creating a TCA Quadrant only version of the script (no Warthog needed). That means you can run TSW/TSW2 with a $120 controller. Uses the same concept where the throttle is on the right lever, and the brakes are on the left lever, using the 3 position switch to select which brake the lever controls. Sadly, there is no axis for the reverser, so this will be controlled by the push buttons. Also, there are so few buttons and switches period that you will have to use the keyboard for most button/switch type functions. But locomotive levers can be controlled by the TCA Quadrant.

    - The TCA Quadrant version will also support use of a second TCA Quadrant, and/or the TCA Quadrant Add-on, giving up to 6 levers to control a locomotive. The TCA Quadrant Add-on isn't available right now, but I believe will start shipping again in September.

    If you have comments on how you would like the TCA Quadrant to work, please speak up. With so few buttons and switches, it is very limited for controlling things like the bell, horns, sand, AWS, wipers, etc. So it would be nice to hear comments on which button/switch functions are most important.
     
    • Like Like x 1
  24. JPS

    JPS New Member

    Joined:
    Feb 16, 2021
    Messages:
    3
    Likes Received:
    1
    Since no one answered (and I have access to the forums again): Anything 'murican! Then British, then German, in that order (I'm a hoarder, so I buy anything and everything). :P
     
    Last edited: Aug 25, 2021
    • Like Like x 1
  25. shawn.poll

    shawn.poll New Member

    Joined:
    Yesterday
    Messages:
    1
    Likes Received:
    1
    just like to say your script is fantastic and easy to us when i look at the script i think it must have taken alot of time and effort to do so many thanks. im looking forward to seeing what you come up whith next. and if dovetail games read this forum give him a job developing game controller suport as it 2021 after all nearly all games to date have controller support. again many thanks.
     
    • Like Like x 1

Share This Page