Jump to content

DCS Input Command Injector Mod - Add custom binds in your saved games folder instead of having to merge them with developer changes each update


Recommended Posts

Summary
A mod that allows you to configure custom input commands inside your Saved Games/DCS/ folder instead of inside your game folder, when DCS is run these commands are merged in with the default aircraft commands. This method avoids having to manually merge your command changes into each aircrafts default commands when DCS updates.

 

The goal of this mod
Commonly in DCS users with unique input systems will need to create custom input commands to allow them to use certain aircraft functions with their HOTAS. Some examples are:

  • Configuring 3 way switches on a Thrustmaster Warthog HOTAS to control switches the module developer never intended to be controlled by a 3 way switch
  • Configuring actions that only trigger a cockpit switch while a button is held, for example using the trigger safety on a VKB Gunfighter Pro to turn on Master Arm while it's flipped down and then turn off Master Arm when flipped up
  • Adding control entries that the developer forgot, for example the Ka-50 has no individual "Gear Up" and Gear Down" commands, only a gear toggle

In my case, on my Saitek X-55 Throttle there is an airbrake slider switch that when engaged registers as a single button being held down, when the slider is disengaged the button is released. In DCS by default few aircraft support this type of input so a custom input command is needed, in my case for the F/A-18C:

{down = hotas_commands.THROTTLE_SPEED_BRAKE, up = hotas_commands.THROTTLE_SPEED_BRAKE, cockpit_device_id = devices.HOTAS, value_down = -1.0, value_up = 1.0, name = 'Speed Brake Hold', category = {'Quaggles Custom'}},


Until now the solution was to find the control definition file DCSWorld\Mods\aircraft\FA-18C\Input\FA-18C\joystick\default.lua and insert your custom command somewhere inside of it, if you weren't using a mod manager then every time the game was updated your change would be erased and you'd need reinsert your commands into the files for every aircraft you changed.

 

If you were using a mod manager such as OVGME if you reapplied your mod after an update and the developers had changed the input commands things could break and conflict.

 

With this mod you should just need to re-enable it after every DCS update with OVGME and your custom commands are safe with no need no change anything.

 

Link with install instructions, download and some examples: https://github.com/Quaggles/dcs-input-command-injector


Edited by Quaggles
  • Like 3
  • Thanks 5
Link to post
Share on other sites
Summary
A mod that allows you to configure custom input commands inside your Saved Games/DCS/ folder instead of inside your game folder, when DCS is run these commands are merged in with the default aircraft commands. This method avoids having to manually merge your command changes into each aircrafts default commands when DCS updates.
 
The goal of this mod
Commonly in DCS users with unique input systems will need to create custom input commands to allow them to use certain aircraft functions with their HOTAS. Some examples are:
  • Configuring 3 way switches on a Thrustmaster Warthog HOTAS to control switches the module developer never intended to be controlled by a 3 way switch
  • Configuring actions that only trigger a cockpit switch while a button is held, for example using the trigger safety on a VKB Gunfighter Pro to turn on Master Arm while it's flipped down and then turn off Master Arm when flipped up
  • Adding control entries that the developer forgot, for example the Ka-50 has no individual "Gear Up" and Gear Down" commands, only a gear toggle
In my case, on my Saitek X-55 Throttle there is an airbrake slider switch that when engaged registers as a single button being held down, when the slider is disengaged the button is released. In DCS by default few aircraft support this type of input so a custom input command is needed, in my case for the F/A-18C:
{down = hotas_commands.THROTTLE_SPEED_BRAKE, up = hotas_commands.THROTTLE_SPEED_BRAKE, cockpit_device_id = devices.HOTAS, value_down = -1.0, value_up = 1.0, name = 'Speed Brake Hold', category = {'Quaggles Custom'}},


Until now the solution was to find the control definition file DCSWorld\Mods\aircraft\FA-18C\Input\FA-18C\joystick\default.lua and insert your custom command somewhere inside of it, if you weren't using a mod manager then every time the game was updated your change would be erased and you'd need reinsert your commands into the files for every aircraft you changed.
 
If you were using a mod manager such as OVGME if you reapplied your mod after an update and the developers had changed the input commands things could break and conflict.
 
With this mod you should just need to re-enable it after every DCS update with OVGME and your custom commands are safe with no need no change anything.
 
Link with install instructions, download and some examples: https://github.com/Quaggles/dcs-input-command-injector

Whoa! This sounds awesome! Gonna check it out.
Thanks!

Sent from my MAR-LX1A using Tapatalk

  • Like 1
Link to post
Share on other sites

This sounds absolutely fantastic.  Well done!  I can't wait to check it out and I'm excited to see that you posted this in the recent Hoggit post regarding crowd-sourcing keybinds (ED Forums version of the post).  

 

 

The final step would be to see if we could get JoyPro to read these custom keybinds.

 

 

  • Like 2

Hangar: A-7 | A-10C | AV-8B | F-14B | F-15C | F-15E | F-16C | F-18C | KA-50 | Mi-8 | SA342 | UH-1H

Link to post
Share on other sites

With JoyPro i just need the HashIDs of given keybinds, then they should work unless DCS has some internal restrictions to given IDs

Edit:
Give me a list of hash Ids and on which aircraft they are with a small title, then they will be in the next release.


Edited by GottHold
  • Like 2

Have a nice day!

Link to post
Share on other sites

@Quaggles The mod works great! Just did a test run moving my MiG-19 bindings over. Even got to use the logging bit, as I had done some extra bindings late last night that a comma was missing from. Nice job. I'm starting to convert the rest of my bindings over to the InputCommands folder pattern now.

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

If it's useful to anyone checking the thread, here's a skeleton with the folder structure for all modules, with keyboard and joystick default.lua files containing an empty 'return keyCommands', ready for bindings. I'll have all mine from the other thread ported over in the next day or two.

 

InputCommands_Skeleton_210505.zip

 

Edit to add... If you need to add axis commands, check the Viggen and Tomcat joystick/default.lua files in the post below's attachment as an example. you'll add ", axisCommands = { ... }" beneath the keyCommands definition


Edited by Monkwolf
  • Like 2
  • Thanks 1
Link to post
Share on other sites

This program is proving to be a little more complicated than I thought.  I am still having issues.  My guess is that I have not yet caught all of my typos and/or not placed the InputCommands folder in the right place.  Oh well.

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 post
Share on other sites
Just now, sobe said:

This program is proving to be a little more complicated than I thought.  I am still having issues.  My guess is that I have not yet caught all of my typos and/or not placed the InputCommands folder in the right place.  Oh well.

 

Check out one of my attachments above as a starting point, it's got the right folder structure going for all modules. Goes in your <user>\Saved Games\<DCS> folder.

  • Like 1
Link to post
Share on other sites
On 5/4/2021 at 4:08 AM, Quaggles said:

Summary
A mod that allows you to configure custom input commands inside your Saved Games/DCS/ folder instead of inside your game folder ...

 

 

Seems really useful, thanks a lot 👍

  • Like 1

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to post
Share on other sites
14 minutes ago, sobe said:

This program is proving to be a little more complicated than I thought.  I am still having issues.  My guess is that I have not yet caught all of my typos and/or not placed the InputCommands folder in the right place.  Oh well.

Yeah I'd try using that skeleton template that was posted and if that's still failing read the section on the GitHub page about enabling logs. 

 

55 minutes ago, Monkwolf said:

If it's useful to anyone checking the thread, here's a skeleton with the folder structure for all modules, with keyboard and joystick default.lua files containing an empty 'return keyCommands', ready for bindings. I'll have all mine from the other thread ported over in the next day or two.

 

InputCommands_Skeleton_210505.zip 92.25 kB · 3 downloads

 

 

Can I get your permission to put this directly on the GitHub to make it easier for first time setup?

  • Like 2
Link to post
Share on other sites

It is so REFRESHING when a piece of software works as documented on the first try!   

I have an X56 Throttle and spent a lot of time updating all of my jets joystick default.lua's so that the Speed Brake slider worked properly.

Once I move all my updates to @Munkwolf's skeleton I will not have to worry about future DCS updates and new default.lua and bindings etc..  

 

AWESOME!

 

FYI: if anyone is looking for more examples of 2 Position toggle for Speed Brake on X56 you can get 14  examples here:

In DCS User Files Downloads > X55/56 Speed Brake Slider by Shiroka

 


Edited by YSIAD_RIP
typo fixed
  • Like 2

Master of None: | A-10C | P-51D | FC3 | F-86F | Ka-50 | SA342 | F-5E | UH-1H | F/A-18C | Supercarrier | F-14 | Christen Eagle II |F-16C | M-2000C | AJS-37 | AV-8B | MiG-19 | MiG-21 | I-16 | P-47D | C-101 | A-10C II | MiG-15 | L-39 | Spitfire | Mi-8MTV2 | Yak-52 | >> i5-3570K(Delidded) 32GB - Vega56 - X56 - TrackIR 5 - Tobii 5C - JetPad FSE -  <<

Link to post
Share on other sites
×
×
  • Create New...