Jump to content

Extra commands to default hotas warthog A-10c profile


Recommended Posts

Hi all

I'm looking for the Hotas Warthog default profile for A10C.

The reason is that I would like to add some extra commands via the TARGET.

Could someone help me?

 

Thanks in advance

Intel i7 4770,Gigabyte GA -H87-HD3,Corsair Vengeance 16Gb 1600MHz,SSD Samsung 840 Pro 128GB-OCZ TR150 480GB,Nvidia MSI GTX 1080ti Gaming X,TrackIR 5,Thrustmaster Hotas Warthog

Link to comment
Share on other sites

I don't think you can mix the default with target. What you can do is mix the default with Autohotkey.

Trackir4 using the latest Trackir 5 software, Win10 Pro [Creator Update] updated from Win7Pro Pro 64Bit, Intel® Core™ i5-2500 3.30 GHz 6M Intel Smart Cache LGA115 , GigaByte GA-Z68XP-UD4 Intel Z68 Chipset DDR3 16GB Ram, GTX MSI Gaming 1060 [6 GB] Video Card, Main Monitor 1 on left 1920x1080 Touchscreen Monitor 2 on right 1920x1080 .

Link to comment
Share on other sites

Actually you can create a TARGET profile for throttle only that will look like the throttle (without TARGET) from a DirectX point of view.

This will allow you to customize the throttle via TARGET on top of the default profile.

 

-1-

Get file _DefaultMap.tmh, this file contains a button mapping (ThrottleMap1) that will restore all default buttons for the throttle (i.e directX mapping).

You can't use it with the throttle+joystick because the directX mappings of the joystick and throttle will overlap.

 

The .tmc file is attached, this is the command that load the new mapping:

MapList(&Throttle,&ThrottleMap1); // _DefaultMap.tmh

-2-

Copy the content of \DCS World\Mods\aircraft\A-10C\Input\A-10C\joystick\Throttle - HOTAS Warthog.lua

Inside file \DCS World\Mods\aircraft\A-10C\Input\A-10C\joystick\Thrustmaster Combined.lua (make a backup for it first).

 

Also backup (and delete) file \Saved Games\DCS\Config\Input\A-10C\joystick\Thrustmaster Combined {7B669F90-9A15-11e2-8002-444553540000}.diff.lua

 

---

You can test the .tmc file alone and check (with windows controller test tool) that the throttle and the throttle+TARGET have the same DirectX output.

 

Step 2 ensures that the combined and the throttle will behave the same in DCS, you can test it, start the profile in TARGET, start DCS and check that the throttle switches and axis work correctly.

 

At this point you can add your custom stuff in the TARGET script.

 

---

EDIT: You can do the same for the joystick except you shouldn't have to redefine anything, an empty profile will do as the default mappings in TARGET are those of the naked joystick.

If you want to customize for throttle and joystick at the same time, I'm afraid that won't be possible, you'll need to rebuild a full TARGET profile that remaps every keyboard command to the HOTAS buttons before anything else.

_DefaultMap.tmh.txt

ThrottleOnly.tmc.txt


Edited by PiedDroit
Link to comment
Share on other sites

Actually, you can use TARGET with both Joystick and Throttle while maintaining them as independent controllers (i.e., not combined into a new virtual controller). It's just not very well documented.

 

In your .tmh file, you will have a line like

if(Init(&EventHandle)) return 1;

Change that to

if(Init(&EventHandle, CREATE_KEYBOARD+CREATE_MOUSE)) return 1;

That second parameter being passed restricts the script from creating the virtual controller - so the joystick and throttle (and any other TM controllers for that matter) will remain separate in the device list.

 

I don't think there's any way to do this with the TARGET GUI though.

Link to comment
Share on other sites

Actually, you can use TARGET with both Joystick and Throttle while maintaining them as independent controllers (i.e., not combined into a new virtual controller). It's just not very well documented.

 

In your .tmh file, you will have a line like

if(Init(&EventHandle)) return 1;

Change that to

if(Init(&EventHandle, CREATE_KEYBOARD+CREATE_MOUSE)) return 1;

That second parameter being passed restricts the script from creating the virtual controller - so the joystick and throttle (and any other TM controllers for that matter) will remain separate in the device list.

 

I don't think there's any way to do this with the TARGET GUI though.

Hi, I tried your method but it makes the joystick and throttle disappear completely from the windows controller list and the thrustmaster combined is not created either.

This way you can only emulate keystrokes, the axis are not seen at all.

What is the supposed effect of this code?

 

The code I posted above will keep the joystick and the throttle visible to DCS while allowing the user to customize the throttle output at the same time, with minimal change of configuration.

 

So, is there anything to add to achieve the same with the Init() modification? Maybe there's another code modification I don't have.

Thanks!

Link to comment
Share on other sites

...

So, is there anything to add to achieve the same with the Init() modification? Maybe there's another code modification I don't have.

Thanks!

 

Oops :music_whistling:

I had made a bunch of changes back and forth at one time while figuring out how it all worked, and had multiple target.tmh files that were doing different things.

 

You will also need to Configure() the devices you want to keep separate. So it will end up like:

   Configure(&Joystick, MODE_KEEPENABLED);
   Configure(&Throttle, MODE_KEEPENABLED);
   if(Init(&EventHandle, CREATE_KEYBOARD+CREATE_MOUSE)) return 1;

I think that should be all.

  • Like 1
Link to comment
Share on other sites

Oops :music_whistling:

I had made a bunch of changes back and forth at one time while figuring out how it all worked, and had multiple target.tmh files that were doing different things.

 

You will also need to Configure() the devices you want to keep separate. So it will end up like:

   Configure(&Joystick, MODE_KEEPENABLED);
   Configure(&Throttle, MODE_KEEPENABLED);
   if(Init(&EventHandle, CREATE_KEYBOARD+CREATE_MOUSE)) return 1;

I think that should be all.

Oh that's sneaky :D

I'll keep you posted when I have tried it, no time today.

Link to comment
Share on other sites

  • 3 weeks later...
Hi, I tested that today, I confirm it works :thumbup:

This opens a new world of scripting possibilities!

 

Could you please post how your complete files are looking now? I´m trying to do exactly the same but am new to TARGET. This would be of great help to start with.

Thanks,

Xoxen

AMD Ryzen 7 5800X3D, MSI MPG X570 Gaming Plus, 64GB Crucial Ballistix DDR4-3600 CL16, Asus TUF Gaming RTX 4080 OC, Windows 10 64bit Home Premium, TrackIR 5 with TrackClip: Pro!, Virpil MongoosT-50CM3 Base + TM Warthog Stick + 7cm extension + WINWING Orion 2 with F-15EX grips, Cougar MFDs with 8" displays, Saitek Rudder Pedals, Samsung Odyssey G9 49" 5120x1440 @120 Hz

Link to comment
Share on other sites

  • 2 months later...
Could you please post how your complete files are looking now? I´m trying to do exactly the same but am new to TARGET. This would be of great help to start with.

Thanks,

Xoxen

Sorry I missed this post :cry:

I don't have a script using the CREATE_KEYBOARD+CREATE_MOUSE hack right now (I just did some throw away tests for now).

Is that what you need?

 

If you need some generic TARGET programming I can just dump one of my scripts here - or maybe it would be better to create a new thread with your requests.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...