Jump to content

Apache Special For Joystick/Controller/HOTAS Keybinds


Recommended Posts

Remember how some modules have had those useful "ON else OFF" type keybinds? Here are are the ones that I have personally found useful. They can be used for two-way switches that only send a signal in one way. You can find these types of switches on the Virpil CM2/CM3 and the Thrustmaster Warthog, for example.

These are working in DCS version 2.7.11.22041
Their use or effectiveness in other DCS versions is not guaranteed. The files are likely to be reset/erased if you do a DCS repair or update. Please keep a backup in a safe location. Do not do these mods if you are not comfortable or prepared to edit some DCS code by hand. These changes are safe for Single Player and Multiplayer to include Intregity Check.

Instructions: 
- Copy the code that you want from one of the boxes below the instructions.
- Paste the code into one these files:...
  `C:\...\DCS World OpenBeta\Mods\aircraft\AH-64D\Input\AH-64D_PLT\joystick\default.lua`
  `C:\...\DCS World OpenBeta\Mods\aircraft\AH-64D\Input\AH-64D_CPG\joystick\default.lua`

at this location near the top:
image.png

After restarting DCS you should see your new keybind:
image.png

Feel free to request keybinds after you have attempted to add it yourself and made sure that the request has not already been fulfilled elsewhere in this thread. For those who are successful, please share the knowledge and fun! Enjoy!


Custom Block (For keeping things orderly)

---------------------------------------------
-- Custom -----------------------------------
---------------------------------------------


Trigger Guard

{    down = hotas_commands.CYCLIC_TRIGGER_GUARD,        up = hotas_commands.CYCLIC_TRIGGER_GUARD,    cockpit_device_id = devices.HOTAS_INPUT,        value_down =  1.0, value_up = 0.0,        name = _('Weapons Trigger Guard - OPEN else CLOSE'),    category = {_('Cyclic Stick'), _('HOCAS'), _('Custom')}},
{    down = hotas_commands.CYCLIC_TRIGGER_GUARD,        up = hotas_commands.CYCLIC_TRIGGER_GUARD,    cockpit_device_id = devices.HOTAS_INPUT,        value_down =  0.0, value_up = 1.0,        name = _('Weapons Trigger Guard - CLOSE else OPEN'),    category = {_('Cyclic Stick'), _('HOCAS'), _('Custom')}},

 

Ignition / Battery Switch

{    down = electric_commands.MIK_EXT,                up = electric_commands.MIK_EXT,                cockpit_device_id = devices.ELEC_INTERFACE,        value_down =  0.5, value_up = 0.0,        name = _('Master Ignition Switch - BATT else OFF'),        category = {_('Left Console'), _('Power Lever Quadrant'), _('Custom')}},
{    down = electric_commands.MIK_EXT,                up = electric_commands.MIK_EXT,                cockpit_device_id = devices.ELEC_INTERFACE,        value_down =  0.0, value_up = 0.5,        name = _('Master Ignition Switch - OFF else BATT'),     category = {_('Left Console'), _('Power Lever Quadrant'), _('Custom')}},


APU Cover

{    down = engine_commands.APU_StartBtnCover_EXT,    up = engine_commands.APU_StartBtnCover_EXT,    cockpit_device_id = devices.ENGINE_INTERFACE,    value_down =  0.0, value_up = 1.0,        name = _('APU Pushbutton Cover - CLOSE else OPEN'),        category = {_('Left Console'), _('Power Lever Quadrant'), _('Custom')}},
{    down = engine_commands.APU_StartBtnCover_EXT,    up = engine_commands.APU_StartBtnCover_EXT,    cockpit_device_id = devices.ENGINE_INTERFACE,    value_down =  1.0, value_up = 0.0,        name = _('APU Pushbutton Cover - OPEN else CLOSE'),        category = {_('Left Console'), _('Power Lever Quadrant'), _('Custom')}},


CMWS Operation Switch AUTO / BYPASS

{    down = CMWS_commands.CMWS_BYPASS_AUTO_SW_EXT,    up = CMWS_commands.CMWS_BYPASS_AUTO_SW_EXT,    cockpit_device_id = devices.CMWS,                value_down =  0.0, value_up = 1.0,        name = _('CMWS Operation Switch - AUTO else BYPASS'),    category = {_('CMWS Control Panel'), _('Custom')}},
{    down = CMWS_commands.CMWS_BYPASS_AUTO_SW_EXT,    up = CMWS_commands.CMWS_BYPASS_AUTO_SW_EXT,    cockpit_device_id = devices.CMWS,                value_down =  1.0, value_up = 0.0,        name = _('CMWS Operation Switch - BYPASS else AUTO'),    category = {_('CMWS Control Panel'), _('Custom')}},


CMWS Flare Safe / Arm

{    down = CMWS_commands.CMWS_ARM_SAFE_SW_EXT,         up = CMWS_commands.CMWS_ARM_SAFE_SW_EXT,    cockpit_device_id = devices.CMWS,                value_down =  0.0, value_up =  1.0,        name = _('CMWS Flare Squibs Switch - SAFE else ARM'),    category = {_('CMWS Control Panel'), _('Custom')}},
{    down = CMWS_commands.CMWS_ARM_SAFE_SW_EXT,         up = CMWS_commands.CMWS_ARM_SAFE_SW_EXT,    cockpit_device_id = devices.CMWS,                value_down =  1.0, value_up =  0.0,        name = _('CMWS Flare Squibs Switch - ARM else SAFE'),    category = {_('CMWS Control Panel'), _('Custom')}},


CMWS Mode

{    down = CMWS_commands.CMWS_CMWS_NAV_SW_EXT,         up = CMWS_commands.CMWS_CMWS_NAV_SW_EXT,    cockpit_device_id = devices.CMWS,                value_down =  1.0,    value_up =  0.0,    name = _('CMWS Mode Switch - CMWS else NAV'),            category = {_('CMWS Control Panel'), _('Custom')}},
{    down = CMWS_commands.CMWS_CMWS_NAV_SW_EXT,         up = CMWS_commands.CMWS_CMWS_NAV_SW_EXT,    cockpit_device_id = devices.CMWS,                value_down =  0.0,    value_up =  1.0,    name = _('CMWS Mode Switch - NAV else CMWS'),            category = {_('CMWS Control Panel'), _('Custom')}},


CMWS Power

{    down = CMWS_commands.CMWS_PWR_EXT,                 up = CMWS_commands.CMWS_PWR_EXT,            cockpit_device_id = devices.CMWS,                value_down =  0.0,        value_up =  -1.0,    name = _('CMWS PWR Switch - ON else OFF'),                category = {_('CMWS Control Panel'), _('Custom')}},
{    down = CMWS_commands.CMWS_PWR_EXT,                 up = CMWS_commands.CMWS_PWR_EXT,            cockpit_device_id = devices.CMWS,                value_down =  -1.0,        value_up =  0.0,    name = _('CMWS PWR Switch - OFF else ON'),                category = {_('CMWS Control Panel'), _('Custom')}},


Parking Brake

{    down = gear_commands.AH64_ParkingBrake_EXT,        up = gear_commands.AH64_ParkingBrake_EXT,        cockpit_device_id = devices.GEAR_INTERFACE,    value_down = 1.0, value_up = 0.0,    name = _('Parking Brake Handle - Pull else Stow'),        category = {_('Systems'), _('Custom')}},
{    down = gear_commands.AH64_ParkingBrake_EXT,        up = gear_commands.AH64_ParkingBrake_EXT,        cockpit_device_id = devices.GEAR_INTERFACE,    value_down = 0.0, value_up = 1.0,    name = _('Parking Brake Handle - Stow else Pull'),        category = {_('Systems'), _('Custom')}},




PLT NVS MODE Switch

{	down = electric_commands.NVS_MODE_KNOB_EXT,		up = electric_commands.NVS_MODE_KNOB_EXT,		cockpit_device_id = devices.ELEC_INTERFACE,		value_down =  1.0,	value_up = 0.0,		name = _('PLT NVS MODE Switch - FIXED else NORM'),	category = {_('Left Console'), _('NVS Mode Panel'), _('Custom')}},
{	down = electric_commands.NVS_MODE_KNOB_EXT,		up = electric_commands.NVS_MODE_KNOB_EXT,		cockpit_device_id = devices.ELEC_INTERFACE,		value_down =  0.0,	value_up =  1.0, 	name = _('PLT NVS MODE Switch - NORM else FIXED'),	category = {_('Left Console'), _('NVS Mode Panel'), _('Custom')}},
{	down = electric_commands.NVS_MODE_KNOB_EXT,		up = electric_commands.NVS_MODE_KNOB_EXT,		cockpit_device_id = devices.ELEC_INTERFACE,		value_down = -1.0,	value_up =  0.0, 	name = _('PLT NVS MODE Switch - OFF else NORM'),	category = {_('Left Console'), _('NVS Mode Panel'), _('Custom')}},
{	down = electric_commands.NVS_MODE_KNOB_EXT,		up = electric_commands.NVS_MODE_KNOB_EXT,		cockpit_device_id = devices.ELEC_INTERFACE,		value_down = 0.0,	value_up =  -1.0, 	name = _('PLT NVS MODE Switch - NORM else OFF'),	category = {_('Left Console'), _('NVS Mode Panel'), _('Custom')}},



All of the above

---------------------------------------------
-- Custom -----------------------------------
---------------------------------------------

{   down = hotas_commands.CYCLIC_TRIGGER_GUARD,     up = hotas_commands.CYCLIC_TRIGGER_GUARD,    cockpit_device_id = devices.HOTAS_INPUT,       value_down =  1.0, value_up = 0.0,      name = _('Weapons Trigger Guard - OPEN else CLOSE'),    category = {_('Cyclic Stick'), _('HOCAS'), _('Custom')}},
{   down = hotas_commands.CYCLIC_TRIGGER_GUARD,     up = hotas_commands.CYCLIC_TRIGGER_GUARD,    cockpit_device_id = devices.HOTAS_INPUT,       value_down =  0.0, value_up = 1.0,      name = _('Weapons Trigger Guard - CLOSE else OPEN'),    category = {_('Cyclic Stick'), _('HOCAS'), _('Custom')}},
{   down = electric_commands.MIK_EXT,               up = electric_commands.MIK_EXT,              cockpit_device_id = devices.ELEC_INTERFACE,    value_down =  0.5, value_up = 0.0,      name = _('Master Ignition Switch - BATT else OFF'),     category = {_('Left Console'), _('Power Lever Quadrant'), _('Custom')}},
{   down = electric_commands.MIK_EXT,               up = electric_commands.MIK_EXT,              cockpit_device_id = devices.ELEC_INTERFACE,    value_down =  0.0, value_up = 0.5,      name = _('Master Ignition Switch - OFF else BATT'),     category = {_('Left Console'), _('Power Lever Quadrant'), _('Custom')}},
{   down = engine_commands.APU_StartBtnCover_EXT,   up = engine_commands.APU_StartBtnCover_EXT,  cockpit_device_id = devices.ENGINE_INTERFACE,  value_down =  0.0, value_up = 1.0,      name = _('APU Pushbutton Cover - CLOSE else OPEN'),     category = {_('Left Console'), _('Power Lever Quadrant'), _('Custom')}},
{   down = engine_commands.APU_StartBtnCover_EXT,   up = engine_commands.APU_StartBtnCover_EXT,  cockpit_device_id = devices.ENGINE_INTERFACE,  value_down =  1.0, value_up = 0.0,      name = _('APU Pushbutton Cover - OPEN else CLOSE'),     category = {_('Left Console'), _('Power Lever Quadrant'), _('Custom')}},
{   down = CMWS_commands.CMWS_BYPASS_AUTO_SW_EXT,   up = CMWS_commands.CMWS_BYPASS_AUTO_SW_EXT,  cockpit_device_id = devices.CMWS,              value_down =  0.0, value_up = 1.0,      name = _('CMWS Operation Switch - AUTO else BYPASS'),   category = {_('CMWS Control Panel'), _('Custom')}},
{   down = CMWS_commands.CMWS_BYPASS_AUTO_SW_EXT,	up = CMWS_commands.CMWS_BYPASS_AUTO_SW_EXT,  cockpit_device_id = devices.CMWS,              value_down =  1.0, value_up = 0.0,      name = _('CMWS Operation Switch - BYPASS else AUTO'),   category = {_('CMWS Control Panel'), _('Custom')}},
{   down = CMWS_commands.CMWS_ARM_SAFE_SW_EXT,      up = CMWS_commands.CMWS_ARM_SAFE_SW_EXT,    cockpit_device_id = devices.CMWS,               value_down =  0.0, value_up =  1.0,     name = _('CMWS Flare Squibs Switch - SAFE else ARM'),   category = {_('CMWS Control Panel'), _('Custom')}},
{   down = CMWS_commands.CMWS_ARM_SAFE_SW_EXT,      up = CMWS_commands.CMWS_ARM_SAFE_SW_EXT,    cockpit_device_id = devices.CMWS,               value_down =  1.0, value_up =  0.0,     name = _('CMWS Flare Squibs Switch - ARM else SAFE'),   category = {_('CMWS Control Panel'), _('Custom')}},
{   down = CMWS_commands.CMWS_CMWS_NAV_SW_EXT,     	up = CMWS_commands.CMWS_CMWS_NAV_SW_EXT,    cockpit_device_id = devices.CMWS,               value_down =  1.0, value_up =  0.0,    	name = _('CMWS Mode Switch - CMWS else NAV'),           category = {_('CMWS Control Panel'), _('Custom')}},
{   down = CMWS_commands.CMWS_CMWS_NAV_SW_EXT,      up = CMWS_commands.CMWS_CMWS_NAV_SW_EXT,    cockpit_device_id = devices.CMWS,               value_down =  0.0, value_up =  1.0,		name = _('CMWS Mode Switch - NAV else CMWS'),           category = {_('CMWS Control Panel'), _('Custom')}},
{   down = CMWS_commands.CMWS_PWR_EXT,              up = CMWS_commands.CMWS_PWR_EXT,            cockpit_device_id = devices.CMWS,               value_down =  0.0, value_up =  -1.0,    name = _('CMWS PWR Switch - ON else OFF'),              category = {_('CMWS Control Panel'), _('Custom')}},
{   down = CMWS_commands.CMWS_PWR_EXT,              up = CMWS_commands.CMWS_PWR_EXT,            cockpit_device_id = devices.CMWS,               value_down =  -1.0, value_up =  0.0,    name = _('CMWS PWR Switch - OFF else ON'),              category = {_('CMWS Control Panel'), _('Custom')}},
{	down = gear_commands.AH64_ParkingBrake_EXT,		up = gear_commands.AH64_ParkingBrake_EXT,	cockpit_device_id = devices.GEAR_INTERFACE,		value_down = 1.0, value_up = 0.0,		name = _('Parking Brake Handle - Pull else Stow'),		category = {_('Systems'), _('Custom')}},
{	down = gear_commands.AH64_ParkingBrake_EXT,		up = gear_commands.AH64_ParkingBrake_EXT,	cockpit_device_id = devices.GEAR_INTERFACE,		value_down = 0.0, value_up = 1.0,		name = _('Parking Brake Handle - Stow else Pull'),		category = {_('Systems'), _('Custom')}},
{	down = electric_commands.NVS_MODE_KNOB_EXT,		up = electric_commands.NVS_MODE_KNOB_EXT,	cockpit_device_id = devices.ELEC_INTERFACE,		value_down =  1.0, value_up = 0.0,		name = _('PLT NVS MODE Switch - FIXED else NORM'),		category = {_('Left Console'), _('NVS Mode Panel'), _('Custom')}},
{	down = electric_commands.NVS_MODE_KNOB_EXT,		up = electric_commands.NVS_MODE_KNOB_EXT,	cockpit_device_id = devices.ELEC_INTERFACE,		value_down =  0.0, value_up =  1.0, 	name = _('PLT NVS MODE Switch - NORM else FIXED'),		category = {_('Left Console'), _('NVS Mode Panel'), _('Custom')}},
{	down = electric_commands.NVS_MODE_KNOB_EXT,		up = electric_commands.NVS_MODE_KNOB_EXT,	cockpit_device_id = devices.ELEC_INTERFACE,		value_down = -1.0, value_up =  0.0, 	name = _('PLT NVS MODE Switch - OFF else NORM'),		category = {_('Left Console'), _('NVS Mode Panel'), _('Custom')}},
{	down = electric_commands.NVS_MODE_KNOB_EXT,		up = electric_commands.NVS_MODE_KNOB_EXT,	cockpit_device_id = devices.ELEC_INTERFACE,		value_down = 0.0, value_up =  -1.0, 	name = _('PLT NVS MODE Switch - NORM else OFF'),		category = {_('Left Console'), _('NVS Mode Panel'), _('Custom')}},



Take a look at https://github.com/Munkwolf/dcs-community-keybinds for a ton of more keybinds you may find useful.


Edited by Bailey
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, petsild said:

I would like to set the NVS On / Off switch via the template I am not successful.

3-way switches are kind of tricky. Thanks for the suggestion.
Added PLT NVS MODE Switch

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

Are you referring to the red 2-way toggles on the CM3 throttle? They're actually ON-ON switches as opposed to ON-OFF, so I've got them configured as 2 different logical buttons. I only got the throttle on Thursday, but I wish I'd known about your great solution when I was still using my Warthog. The ON-OFF configuration was so annoying when there was no way to easily circumvent it.

  • Like 1
Link to comment
Share on other sites

36 minutes ago, Bailey said:

3-way switches are kind of tricky. Thanks for the suggestion.
Added PLT NVS MODE Switch

 
cool 🙂

🖥️MSI PRO Z690-A DDR4, Kingston 3600 MHz 64 Gb, i5 12600K, Gigabyte RTX 4090, Samsung SSD 970 EVO Plus,🕹️VKB NXT Premium.

Link to comment
Share on other sites

50 minutes ago, frostycab said:

Are you referring to the red 2-way toggles on the CM3 throttle? They're actually ON-ON switches as opposed to ON-OFF, so I've got them configured as 2 different logical buttons. I only got the throttle on Thursday, but I wish I'd known about your great solution when I was still using my Warthog. The ON-OFF configuration was so annoying when there was no way to easily circumvent it.

"Yes" and "no". The red switches are ON-OFF out of the box. You (as have I) can make them ON-ON via the VIRPIL software. The same can be done with the Warthog via TARGET. Many ways to go about it. Lots of choices. 

  • Like 2
Link to comment
Share on other sites

18 minutes ago, Bailey said:

"Yes" and "no". The red switches are ON-OFF out of the box. You (as have I) can make them ON-ON via the VIRPIL software. The same can be done with the Warthog via TARGET. Many ways to go about it. Lots of choices. 

I'm loving the throttle regardless, though the software makes TARGET look simple. Currently trying to work out if there's some way of changing the RGB on the button based on flags in DCS like you can do with the Streamdeck, but I don't really understand any of this stuff.

Link to comment
Share on other sites

15 minutes ago, frostycab said:

I'm loving the throttle regardless, though the software makes TARGET look simple. Currently trying to work out if there's some way of changing the RGB on the button based on flags in DCS like you can do with the Streamdeck, but I don't really understand any of this stuff.

Target is hieroglyphics. 

I am wondering the sane with the leds. I *think* Winwing does something like that. 

Link to comment
Share on other sites

9 minutes ago, Bailey said:

Target is hieroglyphics. 

I am wondering the sane with the leds. I *think* Winwing does something like that. 

I did find this yesterday, but I can't work out how to use it. Seems to read (some) of the data when I tried with the Hornet, but no idea how to make it output anything to the LEDs

https://forum.virpil.com/index.php?/topic/2561-vpc-link-tool/

I just found this as well, so going to have a look in a bit. It'll probably be beyond my skill level though. I'm still struggling to make sense of how to get which button to light up when, let alone get external signals.

 


Edited by frostycab
Link to comment
Share on other sites

3 hours ago, frostycab said:

I did find this yesterday, but I can't work out how to use it. Seems to read (some) of the data when I tried with the Hornet, but no idea how to make it output anything to the LEDs

https://forum.virpil.com/index.php?/topic/2561-vpc-link-tool/

I just found this as well, so going to have a look in a bit. It'll probably be beyond my skill level though. I'm still struggling to make sense of how to get which button to light up when, let alone get external signals.

 

 

Maybe a topic for another thread, but I got it working after much trial and error. Mostly error. Everything that you see below is flashing appropriately. I play in VR so I wont see these, but I am glad to help.
image.png
If you make a thread, feel free to @ me if you want my input. There were lots of ways to go wrong and your module may require some unique code (which I have figured out too, for the apache at least.)


Edited by Bailey
Link to comment
Share on other sites

43 minutes ago, Bailey said:

Maybe a topic for another thread, but I got it working after much trial and error. Mostly error. Everything that you see below is flashing appropriately. I play in VR so I wont see these, but I am glad to help.
image.png
If you make a thread, feel free to @ me if you want my input. There were lots of ways to go wrong and your module may require some unique code (which I have figured out too, for the apache at least.)

 

Thanks. I think I will start a thread on that later today or tomorrow. Your picture helped me with a test using the mcp_CanopyOpen flag. I didn't realise that you needed 2 entries for each flag, though I'm not sure why yet. LOL Defo going to need help though, as my parameters list on the left panel looks nothing like yours and bears very little resemblance to anything on the aircraft. I'll @ you in the thread when I've written something meaningful.

Link to comment
Share on other sites

Before I delve too deeply and bork something, I'd appreciate a double-check...

1) I  downloaded quaggles , and put the extracted Input Injector folder into x/users/me/saved games/DCSopenbata

2) Then went to https://github.com/Munkwolf/dcs-community-keybinds  and found dcs-community-keybinds/InputCommands/FA-18C/Input/FA-18C/joystick/default.lua   . 

Besides the fact I have no idea how to download this( I'm new to Github), the question for the Group here is  what do I do with it? I've read some readme's that indicate they  go into Saved Games, but I haven't seen where in there to put them. 

3) After that, then what?

BTW, pardon the bold type

"You see, IronHand is my thing"

Link to comment
Share on other sites

1 hour ago, Airwolf466 said:

Before I delve too deeply and bork something, I'd appreciate a double-check...

1) I  downloaded quaggles , and put the extracted Input Injector folder into x/users/me/saved games/DCSopenbata

2) Then went to https://github.com/Munkwolf/dcs-community-keybinds  and found dcs-community-keybinds/InputCommands/FA-18C/Input/FA-18C/joystick/default.lua   . 

Besides the fact I have no idea how to download this( I'm new to Github), the question for the Group here is  what do I do with it? I've read some readme's that indicate they  go into Saved Games, but I haven't seen where in there to put them. 

3) After that, then what?

BTW, pardon the bold type

I have no I idea. I’d suggest trying to find the project thread here on the forums. If it does not exist, then make an individual post if you don’t get answers here. 

Link to comment
Share on other sites

  • 3 weeks later...
1 hour ago, fabio.dangelo said:

My custom configuration that up to 2.7.11 worked with the new update last night is no longer recognized.

Do you also have this problem?

I haven’t tried yet. I suggest comparing all of the lua versions you have and seeing what may be different. If nothing appears odd you can take the new file and add things one at a time. If something breaks, you know where it went wrong. 


Edited by Bailey
Link to comment
Share on other sites

  • 2 weeks later...

This is for my fellow Thrustmaster Warthog HOTAS owners. 

I want to get as much functionality on my HOTAS as I can so I matched the throttle behaviour on the A-10C and A-10C II.  So lifting up the throttles will move the engine power levels from off to idle for start up and idle to off again at shutdown . After that it switches back to the normal collective functionality. This was almost a direct copy paste from the A-10C II LULA file with some minor edits.

If you own the A-10 module and the Trhustmaster Warthog HOTA looking at the LULA file for the Throttle HOTAS Warthog LULA file can give you some ideas..

 

{combos = {{key = 'JOY_BTN30'}}	,down = iCommandLeftEngineStop , up = iCommandLeftEngineStart,  name = _('Power Lever (Left) - OFF/IDLE') , category = {_("Special For Joystick"), _('Systems')}},
{combos = {{key = 'JOY_BTN29'}}	,down = iCommandRightEngineStop, up = iCommandRightEngineStart, name = _('Power Lever (Right) - OFF/IDLE'), category = {_("Special For Joystick"), _('Systems')}},
--{	down = iCommandLeftEngineStop,				up = iCommandLeftEngineStart,		value_down =  1.0,	value_up = 1.0,	name = _('Power Lever (Left) - OFF/IDLE'),		category = {_('Power Lever Quadrant')}},
--{	down = iCommandRightEngineStop,				up = iCommandRightEngineStart,		value_down =  1.0,	value_up = 1.0,	name = _('Power Lever (Right) - OFF/IDLE'),		category = {_('Power Lever Quadrant')}},

I top two lines of code were my additions to my LULA file. The bottom two lines were the original lines commented out for testing. I am just showing them so the original lines of code to make them easier to find in the file. 

My next edit might be to make the Boat Stitch change the video mode on the TDEAC from video to flir etc. 

 

EDIT: Well I double checked the keybinds for Off/Idle and they do actually work when raising the throttle levers on the Warthog Throttle.  No need to edit the LULA file to do this one. Now I guess I can play around with it and see if I can get some other buttons to work the way I want them to.


Edited by Bad Karma
Keybindings Do Work
  • Like 1
Link to comment
Share on other sites

I guess I need to make up for my previous blunder so here it is.

This is a function LULA command to get the Thustmaster Warthog Throttle Boat Switch to act as a video mode switch for the TADS. It will switch from FLIR, TV, and DVO.  Put the commands in the Joystick Lula file and then go to the keybindings and under custom you will see the new command. Set the forward switch on the Boat Switch to one and the rear switch position to the other command. 

 

The devices.TEDAC, tedac_commands.LHG_TADS_SENSOR_SELECT_SW command was found in the DECSWorld\Monds\Aircraft\AH-64D\Cockpit\Scripts\clickabledata.lula file

{	down = tedac_commands.LHG_TADS_SENSOR_SELECT_SW,		up = tedac_commands.LHG_TADS_SENSOR_SELECT_SW,					cockpit_device_id = devices.TEDAC, tedac_commands.LHG_TADS_SENSOR_SELECT_SW,	value_down =  1.0,	value_up = 0.0,		name = _('LHG_TADS_SENSOR_SELECT_SW UP'), category = {_('TEDAC'), _('Custom')}},
{	down = tedac_commands.LHG_TADS_SENSOR_SELECT_SW,		up = tedac_commands.LHG_TADS_SENSOR_SELECT_SW,					cockpit_device_id = devices.TEDAC, tedac_commands.LHG_TADS_SENSOR_SELECT_SW,	value_down =  -1.0,	value_up = 0.0,		name = _('LHG_TADS_SENSOR_SELECT_SW DOWN'), category = {_('TEDAC'), _('Custom')}},
  • Thanks 1
Link to comment
Share on other sites

@BIGNEWY Can this code be added to the default LUA so that it isn't lost during every update to the module?

I now have custom code for the Apache and the Hornet that gets erased after updates. Am I doing something wrong? Should my custom code be in my saved games folder instead of the DCSWorld/Mods/Aircraft/FA-18C\Input\FA-18C\joystick folder (etc.)?

Link to comment
Share on other sites

On 5/14/2022 at 3:12 PM, spikenet said:

Thanks for the custom scripts, I have been using the PNVS one on a single button on my collective to turn it on/off. Just wondering if there is a better way to do this with a single button as a toggle?

thanks

The last time I checked toggle buttons or functions need some code supplied by the module itself to keep track of the state of the switch. 

  • Thanks 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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