Jump to content

Recommended Posts

Posted

Hi,

 

Is there a way to program the HAT Up of my T.Flight HotasX to do 2 commands at one go, ie, F1 (Cockpit View) + F5 (View Center)? I know this can be done using external programs like JoyToKey. But is it possible to do this using the joystick programmer in DCS?

AMD Ryzen 5 5600X | Gigabyte RTX 3070 Gaming OC 8GB | 64GB G.SKILL TRIDENT Z4 neo DDR4 3600Mhz | Asus B550 TUF Plus Gaming | 2TB Aorus Gen4
TM Warthog HOTAS | TrackIR 5 | Windows 10 Home x64 | 
My HOTAS Profiles

Posted
Probable by editing LUA files and assign one key (F1) "on press" and other (F5) "on release".

I'd love to do that! Exactly which .lua file would I edit?

CPU: i7 980x @ 4.2GHz RAM: 24gb Corsair Vengeance

MB: Gigabyte Sniper X58 w/onboard Soundblaster X-Fi

HD: SanDisk 480gb SSD OS: Win7 Pro 64bit

VIDEO CARD: EVGA GTX 980ti FTW

MONITOR: LG 34" Ultrawide 2560x1080

MP SERVER: ibuypower i7-4810MQ w/Win7 Home 64bit

GEAR: Saitek X-52 Pro; Combat Rudder Pedals; Throttle Quadrants. Thrustmaster MFD's, TrackIR 5 w/Pro Clip, Turtle Beach X-12 Headset

Posted

I do use modifiers or switches for other commands but it is not the same as having two commands performed one after another per button pressed.

 

In my case, I want my HAT Up (with modifier) to perform an F2 (return to cockpit view) immediately followed by NumPad 5 (center the view) because F2 will only bring you back to your last cockpit view position (which is not centered and gets kind of disorienting). But since consecutive commands per HAT stroke is not possible, I have to use HAT Down (with modifier) to do the NumPad 5 command.

 

The DCS in-game programmer could use some improvements like the ability to have toggle commands and consecutive commands per button pressed. In the meantime, I guess I may use JoyToKey.

AMD Ryzen 5 5600X | Gigabyte RTX 3070 Gaming OC 8GB | 64GB G.SKILL TRIDENT Z4 neo DDR4 3600Mhz | Asus B550 TUF Plus Gaming | 2TB Aorus Gen4
TM Warthog HOTAS | TrackIR 5 | Windows 10 Home x64 | 
My HOTAS Profiles

Posted
I'd love to do that! Exactly which .lua file would I edit?

 

E.g. here for the A-10C:

 

C:\Program Files\Eagle Dynamics\DCS World\Mods\aircraft\A-10C\Input\A-10C\joystick

 

Modify your controller's .lua or create one based upon default.lua with the name of your controller. For that check your local configuration in:

C:\Users\<username>\Saved Games\DCS\Config\Input\A-10C\joystick

 

For me, the file is called "Thrustmaster Combined {8C8E9840-E97C-11e5-8004-444553540000}.diff.lua", so drop the Windows Id and .diff, and my file is "Thrustmaster Combined.lua"

 

There are commands like this, with press and release:

{ pressed = iCommandViewUp, up = iCommandViewStop, name = _('View up'), category = _('View Cockpit')},

 

I guess you could add a new one like this, let's put it in category "View", just below the "-- View" comment in the file:

{ pressed = iCommandViewCockpit, up = iCommandViewCenter, name = _('My Reset View'), category = _('View')},

 

That is with the trick that Sokol said of using one command for "press" and another for "release". Not sure if you can assign a list of commands, for that try this instead:

 

{down = {iCommandViewCockpit, iCommandViewCenter}, name = _('My Reset View'), category = _('View')},

 

If this second method works, there would be no limit of actions per command.

 

Then, go to your stick configuration in DCS game, search for "My Reset View" inside category "View" and assign a joystick button.

 

Of course, if you prefer to have that command also for other controllers, just edit default.lua. Or for keyboard the appropriate .lua too.

 

The problem is that each time you repair or update the mod will be lost, so better install it with JSGME.

 

OTOH, for what you guys want to do I would go with your joystick programming software, they use to allow that and much more complex macros.

[sIGPIC][/sIGPIC]

  • Recently Browsing   0 members

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