Wildhare Posted May 24, 2021 Posted May 24, 2021 Where is the key bind. For the life of me i cannot find anything . i did find a lua file to add some where. cant or dont understand where to insert it >>return { keyCommands = { {down = 3001, cockpit_device_id = 75, value_down = 1.0, name = _('HMCS Power On'), category = _('HMCS Power')}, {down = 3001, up = 3001, cockpit_device_id = 75, value_down = 1.0, value_up = 0.0, name = _('HMCS Power On else Off'), category = _('HMCS Power')}, {down = 3001, cockpit_device_id = 75, value_down = 0.0, name = _('HMCS Power Off'), category = _('HMCS Power')}, {down = 3001, cockpit_device_id = 75, value_down = -1.0, name = _('HMCS Power Battery'), category = _('HMCS Power')}, {down = 3001, up = 3001, cockpit_device_id = 75, value_down = -1.0, value_up = 0.0, name = _('HMCS Power Battery else Off'), category = _('HMCS Power')}, {down = 3006, cockpit_device_id = 39, value_down = 1.0, name = _('Canopy Open'), category = _('Systems')}, {down = 3006, up = 3006, cockpit_device_id = 39, value_down = 1.0, value_up = 0.5, name = _('Canopy Open else Hold'), category = _('Systems')}, {down = 3006, cockpit_device_id = 39, value_down = 0.5, name = _('Canopy Hold'), category = _('Systems')}, {down = 3006, cockpit_device_id = 39, value_down = -0.5, name = _('Canopy Close'), category = _('Systems')}, {down = 3006, up = 3006, cockpit_device_id = 39, value_down = -0.5, value_up = 0.5, name = _('Canopy Close else Hold'), category = _('Systems')}, {down = 3010, up = 3010, cockpit_device_id = 39, value_down = -1.0, value_up = 1.0, name = _('Seat Arm Handle Armed else Off'), category = _('Systems')}, {down = 3010, up = 3010, cockpit_device_id = 39, value_down = 1.0, value_up = -1.0, name = _('Seat Arm Handle Off else Armed'), category = _('Systems')}, {down = 3016, up = 3016, cockpit_device_id = 36, value_down = -1.0, value_up = 1.0, name = _('Aerial Refueling Slipway Control Lever Open else Closed'), category = _('Fuel system control panel')}, {down = 3016, up = 3016, cockpit_device_id = 36, value_down = 1.0, value_up = -1.0, name = _('Aerial Refueling Slipway Control Lever Closed else Open'), category = _('Fuel system control panel')}, } } its syntax does not break anything but i dont know where to put it 306th TFS Home of the "WILDHARE's" :pilotfly::gun_sniper: A10,F-14, F-15, F16, F18, AV88, UH1,KA 50, Oculus Rift ,Hotas Warthog, Stable & Beta, VRK :: AMD Ryzen 7 2700 Eight Core 3.2 ghz, RAM- 32 GB, GeForce GTX 1070
Sacarino111 Posted May 24, 2021 Posted May 24, 2021 Hi. As far as I know, it should be in "...\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\A-10C_2\Input\A-10C_2\joystick" in a file called "default. lua". Don't forget to do a backup copy of the original one... Saludos. Saca111
LeCuvier Posted May 24, 2021 Posted May 24, 2021 Sacarino identified the file for you. Open the file with Notepad++ and you will see these lines at the beginning: return { forceFeedback = { trimmer = 1.0, shake = 0.5, swapAxes = false, }, keyCommands = { Insert the added lines (the ones you want to use) below the line saying "keyCommands = {". Note: this is assuming you don't want to bind any of these commands to a TM Warthog throttle or stick, or a Saitek X52 Pro Flight Controller, or a F16 MFD 1/2. Any command to be bound to one of these controllers must be added into the file with that name, e.g. "F16 MFD 1.lua". This applies to all controllers that have a dedicated ".lua" file in that folder. It does not apply to files ending with ".diff.lua". LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
Sacarino111 Posted May 24, 2021 Posted May 24, 2021 Hi. LeCuvier has Spoken.... Amen.....! Saludos. Saca111
Munkwolf Posted May 24, 2021 Posted May 24, 2021 @Wildhare that looks like bindings from the keybinds project, and those are for use with Quaggle's Command Input Injector, a mod that lets you put those bindings in your Saved Games\DCS folder so that you don't have to redo them every time the game updates. Download this, best used with a mod manager like OvGME: https://github.com/Quaggles/dcs-input-command-injector Then you'd put those bindings in a file at <user>\Saved Games\<DCS>\InputCommands\A-10C_2\Input\A-10C_2\joystick\default.lua. Enable the mod and launch DCS and you should see them available. You can also grab the bindings for all planes, which are packaged up as an InputCommands folder to put in your Saved Games\<DCS> folder: https://github.com/Munkwolf/dcs-community-keybinds/
Wildhare Posted May 24, 2021 Author Posted May 24, 2021 Sooo... if i have a controller i want to put theses commands in... i just insert these commands into the lua file of that controller. And when i open "DCS Controls" tab to "A10c II" slide over to the controller i want to use for those categories, now scroll down i will find these functions like {HMCS on/off) ready for input of which switch i want to use on that controler? I will give this a try. thanks 306th TFS Home of the "WILDHARE's" :pilotfly::gun_sniper: A10,F-14, F-15, F16, F18, AV88, UH1,KA 50, Oculus Rift ,Hotas Warthog, Stable & Beta, VRK :: AMD Ryzen 7 2700 Eight Core 3.2 ghz, RAM- 32 GB, GeForce GTX 1070
Sacarino111 Posted May 24, 2021 Posted May 24, 2021 29 minutes ago, Wildhare said: Sooo... if i have a controller i want to put theses commands in... i just insert these commands into the lua file of that controller. And when i open "DCS Controls" tab to "A10c II" slide over to the controller i want to use for those categories, now scroll down i will find these functions like {HMCS on/off) ready for input of which switch i want to use on that controler? I will give this a try. thanks Yes, but don't forget to make a copy of the original ones!
Wildhare Posted May 25, 2021 Author Posted May 25, 2021 Thank you Sac111 the pathway worked i was able to program the HMCS switch to my BlackHOG controler Right side. Now for the next problem. When i set up my F18 all of my controllers were available to program all of their switches and knobs . When i open the "controls" tab for the "A10C II Real" the MFDs and the BlackHogs and the MFD controller's are "blacked out" the are NOT available to program. they worked with the F18 as well as the UH1 but not now. Im sure i messed something up for the A10C II lua file just not sure which one. Trying to compare the pathways for both F18 and A10C II to see what i did, Is there an EASY BUTTON, And this has all been done before and im reinventing the wheel. or am i blazing a new trail here. my controller's Hotas warthog throttle and stick Saitek Rudders two Thrustmaster MFD's Two Blackhog control panels the Pic below is blackhog controller. I know lots of buttons but im using VR and the BRAIL system and thik is working well for the F18. I am trying to set up the A10 now. Questions are in summary What lua file or files control the usability of controllers? Is there a different "mod" that works better in programing my controls? Again thanks for the pathway for the HMCS switch. 306th TFS Home of the "WILDHARE's" :pilotfly::gun_sniper: A10,F-14, F-15, F16, F18, AV88, UH1,KA 50, Oculus Rift ,Hotas Warthog, Stable & Beta, VRK :: AMD Ryzen 7 2700 Eight Core 3.2 ghz, RAM- 32 GB, GeForce GTX 1070
LeCuvier Posted May 25, 2021 Posted May 25, 2021 The F/A-18 does not have controller-specific ".lua" files (ignore the ".diff.lua" files!). So all mod lines for the Hornet go into the "default.lua" under "...\Mods\aircraft\FA-18C\Input\FA-18C\joystick". Here are some lines I added for my Hornet: -------------------------------------------------------------------------------------------------- {down = iCommandPlaneGearUp, up = iCommandPlaneGearDown, name = _('Landing Gear Control Handle 2-Pos UP/DOWN'), category = {_('Left Vertical Panel')}}, -------------------------------------------------------- {down = cpt_commands.CanopySwitchOpen, up = cpt_commands.CanopySwitchClose, cockpit_device_id = devices.CPT_MECHANICS, value_down = 1.0, value_up = -1.0, name = _('Canopy Control Switch 2-Pos OPEN/CLOSE'), category = {_('Right Wall'), _('Systems')}}, {down = cpt_commands.CanopySwitchClose, up = cpt_commands.CanopySwitchClose, cockpit_device_id = devices.CPT_MECHANICS, value_down = -1.0, value_up = 0.0, name = _('Canopy Control Switch CLOSE/HOLD'), category = {_('Right Wall'), _('Systems')}},-- for 3-pos switch {down = cpt_commands.CanopySwitchOpen, up = cpt_commands.CanopySwitchClose, cockpit_device_id = devices.CPT_MECHANICS, value_down = 1.0, value_up = 0.0, name = _('Canopy Control Switch OPEN/HOLD'), category = {_('Right Wall'), _('Systems')}},-- for 3-pos switch ----------------------------------------------------- {down = cptlights_commands.HookBypass, up = cptlights_commands.HookBypass, cockpit_device_id = devices.CPT_LIGHTS, value_down = 1.0, value_up = -1.0, name = _('Hook Bypass 2-Pos Switch FIELD/CARRIER'), category = {_('Left Vertical Panel')}}, {down = cptlights_commands.HookBypass, cockpit_device_id = devices.CPT_LIGHTS, value_down = 1.0, name = _('Hook Bypass Switch FIELD'), category = {_('Left Vertical Panel')}}, {down = cptlights_commands.HookBypass, cockpit_device_id = devices.CPT_LIGHTS, value_down = -1.0, name = _('Hook Bypass Switch CARRIER'), category = {_('Left Vertical Panel')}}, ---------------------------------------------------- {down = gear_commands.LaunchBarSw, up = gear_commands.LaunchBarSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down = -1.0, value_up = 1.0, name = _('Launch Bar Control 2-Pos Switch RETRACT/EXTEND'), category = {_('Left Vertical Panel')}}, {down = gear_commands.LaunchBarSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down = -1.0, name = _('Launch Bar Control Switch RETRACT'), category = {_('Left Vertical Panel')}}, {down = gear_commands.LaunchBarSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down = 1.0, name = _('Launch Bar Control Switch EXTEND'), category = {_('Left Vertical Panel')}}, -- Wing fold special: 1st line provides PULL and FOLD with one key press --------------------------------------------------- {down = ctrl_commands.WingFoldPull, pressed = ctrl_commands.WingFoldSelect, cockpit_device_id = devices.CONTROL_INTERFACE, value_down = 1.0, value_pressed = -1.0, name = _('Wing Fold Control PULL-FOLD'), category = {_('Right Vertical Panel')}}, {down = ctrl_commands.WingFoldSelect, up = ctrl_commands.WingFoldPull, cockpit_device_id = devices.CONTROL_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Wing Fold Control SPREAD-STOW'), category = {_('Right Vertical Panel')}}, ---------------------------------------------------- {down = fuel_commands.DumpSw, up = fuel_commands.DumpSw, cockpit_device_id = devices.FUEL_INTERFACE, value_down = 1.0, value_up = -1.0, name = _('Fuel Dump Switch 2-Pos ON/OFF'), category = {_('Left Console'), _('Fuel Control Panel')}}, {down = fuel_commands.DumpSw, cockpit_device_id = devices.FUEL_INTERFACE, value_down = 1.0, name = _('Fuel Dump Switch ON'), category = {_('Left Console'), _('Fuel Control Panel')}}, {down = fuel_commands.DumpSw, cockpit_device_id = devices.FUEL_INTERFACE, value_down = -1.0, name = _('Fuel Dump Switch OFF'), category = {_('Left Console'), _('Fuel Control Panel')}}, --------------------------------------------------- {down = 3256, up = 3256, cockpit_device_id = 0, value_down = -1.0, value_up = 0.0, name = _('Flashlight 2-Pos ON/OFF'), category = {_('View Cockpit'), _('Right Console')}}, {down = iCommandPlaneShowKneeboard, up = iCommandPlaneShowKneeboard, value_down = 1.0, value_up = -1.0, name = _('Kneeboard 2-Pos SHOW/HIDE'), category = _('Kneeboard')}, -- Emergency/Parking Brake single command Turn CCW and Pull to Parking Position {down=gear_commands.EmergParkHandleSelectPark, up=gear_commands.EmergParkHandleOnOff,cockpit_device_id=devices.GEAR_INTERFACE,value_down=1.0,value_up=-1.0,name=_('Emergency/Parking Brake Handle - CCW+Pull'),category=_('[Front Left - Vertical Panel')}, -- simplified speed brake switch (no HOLD position)------------------------------------------ {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 Switch 2-Pos EXTEND/RETRACT'), category = {_('Throttle Grip'), _('HOTAS')}}, {down = elec_commands.PitotHeater, up = elec_commands.PitotHeater, cockpit_device_id = devices.ELEC_INTERFACE, value_down = 1.0, value_up = 1.0, name = _('Pitot Heater Switch - 2-Pos ON/AUTO'), category = {_('Right Console'), _('ECS Panel')}}, -- switch must be in the OFF position at mission start LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
Sacarino111 Posted May 25, 2021 Posted May 25, 2021 Hi Wild. Nice controller... but Im affraid you can not use the MFD s other than for what they are ment. Effectivelly, they are greyed out and you can t change this, AFAIK. Indeed, it is the same for the Harrier, the MFD buttons can no be changed from out of the box. If there is a mod or shortcut to bypass that I can t tell. If you findyourself short on buttons (no joking, I have 10 joysticks/button boxes attached to my PC), what I suggest is to use some button or key as a modifier, so you can switch between functions of a button if you press that modifier. To me, the setup system in DCS is perfect (almost), so I use it as much as I can, and then the Saitech/Logitech profiler for some specific fuctions I can t setup in DCS. Hope that helped, and feel free to ask, I ll be happy to help. Saludos. Saca111 P.D. To me, @leCuvier is a must regarding keybinding and .Lua files for keypresses and similar; stick to him!
LeCuvier Posted May 25, 2021 Posted May 25, 2021 24 minutes ago, Sacarino111 said: ... but Im affraid you can not use the MFD s other than for what they are ment. Effectivelly, they are greyed out and you can t change this, AFAIK. Indeed, it is the same for the Harrier, the MFD buttons can no be changed from out of the box... Unfortunately I don't own the F16 MFD but I'm sure people have used them with the hog, and I see no technical reason why they couldn't. The A-10C II has 2 controller-specific files for the left and right MFD: "F16 MFD 1.lua" and "F16 MFD 2.lua". The catch is, these files do not include any bindings other than the ones for the MFCD buttons and switches. But you can copy any lines of code from "default.lua" and paste them into "F16 MFD 1.lua" and "F16 MFD 2.lua", to make these commands available for binding to the MFD's. I don't understand the problem with the Blackhog panel. There is no flie like "Blackhog.lua". Does it mimic something else? LeCuvier Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5
Sacarino111 Posted May 25, 2021 Posted May 25, 2021 4 minutes ago, LeCuvier said: Unfortunately I don't own the F16 MFD but I'm sure people have used them with the hog, and I see no technical reason why they couldn't. The A-10C II has 2 controller-specific files for the left and right MFD: "F16 MFD 1.lua" and "F16 MFD 2.lua". The catch is, these files do not include any bindings other than the ones for the MFCD buttons and switches. But you can copy any lines of code from "default.lua" and paste them into "F16 MFD 1.lua" and "F16 MFD 2.lua", to make these commands available for binding to the MFD's. I don't understand the problem with the Blackhog panel. There is no flie like "Blackhog.lua". Does it mimic something else? Hi. What I think the OP is pointing is that the "Right/Left MFD" buttons are greyed out in the A10C for the Cougar MFD´s, not for other controllers. It is possible to bind those buttons to another controller but not the other Cougar MFD. The Thrustmaster Cougar MFD s are sold as a pair, named F-16 MFD 1 and F-16 MFD 2 inside DCS, and the assignements are restricted to wht the developer decided.Same for the AV8. But any other controller can be bound to those buttons. Saludos Saca111
Munkwolf Posted May 25, 2021 Posted May 25, 2021 (edited) 4 hours ago, Sacarino111 said: Hi. What I think the OP is pointing is that the "Right/Left MFD" buttons are greyed out in the A10C for the Cougar MFD´s, not for other controllers. It is possible to bind those buttons to another controller but not the other Cougar MFD. The Thrustmaster Cougar MFD s are sold as a pair, named F-16 MFD 1 and F-16 MFD 2 inside DCS, and the assignements are restricted to wht the developer decided That's true with the stock files, but it's an easy fix. Using the Harrier as an example, as it's like that.. Go to <DCS_Install>\Mods\aircraft\AV8BNA\Input\AV8BNA\joystick In there you will see F16 MFD 1.diff.lua and F16 MFD 2.diff.lua Just delete those two F16 files. Then the Cougar MFD's will fallback to using the default.lua file and all those bindings will be available to assign to the MFD's. Basically, if there is a device-specific lua diff in there that matches an active device, then that overrides the default joystick lua file. You'll need to do that after each update, as updates will replace those files. Edited May 25, 2021 by Munkwolf
Munkwolf Posted May 25, 2021 Posted May 25, 2021 21 hours ago, Wildhare said: Sooo... if i have a controller i want to put theses commands in... i just insert these commands into the lua file of that controller. And when i open "DCS Controls" tab to "A10c II" slide over to the controller i want to use for those categories, now scroll down i will find these functions like {HMCS on/off) ready for input of which switch i want to use on that controler? I will give this a try. thanks you don't need to put the bindings in a controller-specific lua file unless you want to restrict the bindings to only that device.. no real upside to that I see. imo just put them all in the main default.lua files in the joystick and keyboard folders. Imo, the easiest way to go about this is to use this mod: https://github.com/Quaggles/dcs-input-command-injector ideally with a mod manager like this so you aren't manually changing the stock DCS files: https://wiki.hoggitworld.com/view/OVGME once you have quaggles' mod enabled through ovgme, download one of the InputCommands folders from here: https://github.com/Munkwolf/dcs-community-keybinds you'll put the InputCommands folder in your <user>\Saved Games\<DCS> folder. then you would put bindings in the default.lua file here: Saved Games\DCS\InputCommands\A-10C_2\Input\A-10C_2\joystick doing it this way, you won't have to redo the edits to the lua files in the base DCS files after every update.
Sacarino111 Posted May 25, 2021 Posted May 25, 2021 1 hour ago, Munkwolf said: That's true with the stock files, but it's an easy fix. Using the Harrier as an example, as it's like that.. Go to <DCS_Install>\Mods\aircraft\AV8BNA\Input\AV8BNA\joystick In there you will see F16 MFD 1.diff.lua and F16 MFD 2.diff.lua Just delete those two F16 files. Then the Cougar MFD's will fallback to using the default.lua file and all those bindings will be available to assign to the MFD's. Basically, if there is a device-specific lua diff in there that matches an active device, then that overrides the default joystick lua file. You'll need to do that after each update, as updates will replace those files. HI. Nice help for me! I hope it will also help the OP. Saludos Saca111
Recommended Posts