Jump to content

Quaggles - DCS Input Command Injector Mod - Store custom input commands safely in Saved Games instead of merging them with developer changes each update


Quaggles

Recommended Posts

Newest Update:

22/02/2024: Version 1.0.11 released: https://github.com/Quaggles/dcs-input-command-injector/releases/tag/1.0.11

* Updated mod to be compatible with DCS 2.9.3.51704 Data.lua changes

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.

 

After reading the install guide I'd recommend also looking at the DCS Community Keybinds project by Munkwolf, it uses this mod and contains many community requested input commands without you needing to code them manually.

 

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 10
  • Thanks 13
Link to comment
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 comment
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 comment
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 comment
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 comment
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 3
  • Thanks 2
Link to comment
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 comment
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 comment
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 3600X - 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 comment
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 comment
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 3
  • Do not own:  | F-15E | JF-17 | Fw 190 A-8 | Bf 109 |
  • Hardware:  [ - Ryzen7-5800X - 32GB - RX 6800 - X56 HOTAS Throttle -  WINWING Orion 2 F16EX Grip - TrackIR 5 - Tobii 5C - JetPad FSE - ]
Link to comment
Share on other sites

I got this up and running last weekend.  Good work!

DEFENSOR FORTIS

Spoiler

Systems: Falcon NW Talon: Ryzen 9 5950X @4.9GHz, 64GB DDR4, RTX 3090 FE; Falcon NW Mach V: Core i7 3930K @3.2GHz, 32GB DDR3, GTX 1080 FE

Cockpit: MonsterTech MTX F, 42" 4K TV, HP Reverb G2, Oculus Rift S, PointCTRL

Controls: RS F16SGRH CE, RS F18CGRH, VPC T-50CM2, VFX, WarBRD (Grips); VPC T-50CM2, RS FSSB R3L (Bases); Winwing F/A-18C, VPC T-50CM3, VPC T-50CM, TM Warthog, Cougar (Throttles); VPC ACE2 (Rudders)

 

Link to comment
Share on other sites

Migrated my commands to the mod. Excellent work, Quaggles. Was getting tedious to diff the input files after every update.

  • Like 1

My controls & seat

 

Main controls: , BRD-N v4 Flightstick (Kreml C5 controller), TM Warthog Throttle (Kreml F3 controller), BRD-F2 Restyling Bf-109 Pedals w. damper, TrackIR5, Gametrix KW-908 (integrated into RAV4 seat)

Stick grips:

Thrustmaster Warthog

Thrustmaster Cougar (x2)

Thrustmaster F-16 FLCS

BRD KG13

 

Standby controls:

BRD-M2 Mi-8 Pedals (Ruddermaster controller)

BRD-N v3 Flightstick w. exch. grip upgrade (Kreml C5 controller)

Thrustmaster Cougar Throttle

Pilot seat

 

 

Link to comment
Share on other sites

16 minutes ago, The LT said:

Migrated my commands to the mod. Excellent work, Quaggles. Was getting tedious to diff the input files after every update.

 

If you have some time, please consider contributing the community keybinds project!

 

https://github.com/Munkwolf/dcs-community-keybinds

  • Like 2

http://www.reddit.com/r/hoggit

 

Hoggit 1st Fighter Wing

 

Weekly training missions on Tuesday nights, missions on Saturdays!

 

TS3: hoggit.us

Link to comment
Share on other sites

 
If you have some time, please consider contributing the community keybinds project!
 
https://github.com/Munkwolf/dcs-community-keybinds
I will take a look, thanks
  • Like 2

My controls & seat

 

Main controls: , BRD-N v4 Flightstick (Kreml C5 controller), TM Warthog Throttle (Kreml F3 controller), BRD-F2 Restyling Bf-109 Pedals w. damper, TrackIR5, Gametrix KW-908 (integrated into RAV4 seat)

Stick grips:

Thrustmaster Warthog

Thrustmaster Cougar (x2)

Thrustmaster F-16 FLCS

BRD KG13

 

Standby controls:

BRD-M2 Mi-8 Pedals (Ruddermaster controller)

BRD-N v3 Flightstick w. exch. grip upgrade (Kreml C5 controller)

Thrustmaster Cougar Throttle

Pilot seat

 

 

Link to comment
Share on other sites

How can I contribute to the bind collection? Should I use github pull requests?

My controls & seat

 

Main controls: , BRD-N v4 Flightstick (Kreml C5 controller), TM Warthog Throttle (Kreml F3 controller), BRD-F2 Restyling Bf-109 Pedals w. damper, TrackIR5, Gametrix KW-908 (integrated into RAV4 seat)

Stick grips:

Thrustmaster Warthog

Thrustmaster Cougar (x2)

Thrustmaster F-16 FLCS

BRD KG13

 

Standby controls:

BRD-M2 Mi-8 Pedals (Ruddermaster controller)

BRD-N v3 Flightstick w. exch. grip upgrade (Kreml C5 controller)

Thrustmaster Cougar Throttle

Pilot seat

 

 

Link to comment
Share on other sites

On 5/17/2021 at 7:02 PM, The LT said:

How can I contribute to the bind collection? Should I use github pull requests?

 

Hi, yup! I'll get to them within a day or two. Not much in the way of standardization yet. Currently the main goal is getting more complete coverage, so any/all keybinds welcome. If you'd like to follow the patterns already in there, that's a bonus.

 

I'm about halfway through a script to diff the clickabledata files vs the stock default.lua files vs the InputCommands lua files so it's easier to audit coverage and generate some reporting. Hoping to have that done and do a bit more organizing over this weekend.


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

8 hours ago, Dirt_Merchant said:

would this allow you do so something like make a keybind for the flanker that would let you do asc override but only as a push button instead of a toggle?

 

Yes, I just tested it and this works:

{down = iCommandPlaneCobra, up = iCommandPlaneCobra, value_down = 1.0, value_up = 0.0, name = _('ASC Direct Control (Cobra) (Hold)'), category = _('Quaggles Custom')},

 

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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