Panzuur Posted January 2 Posted January 2 So I made a P51 Sim Pit and hooked everything up, went to assign button controls and found the P51 switches toggle (Unlike the P47) and are not ON-OFF , So I assigned the On and Off to the input , and this works but can be opposite state depending how the switch status is when the mission loads, for example the virtual power switch is on and the physical switch is off, it works but is backwards. I would like the physical switch state to control the input , not toggle it. I have zero knowledge of editing the input.lua file. Is there a updated P51 Input.lua file available that will do this, or a tutorial on how to edit a input.lua file for someone with complete programing ignorance? 3
71st_AH Rob Posted January 2 Posted January 2 Lovely setup, wish Santa had delivered one to me! How long did that take to make? Have you got "Synchronize Cockpit Contorls...." checked under Misc. options? 1
Smashy Posted January 2 Posted January 2 Jaw-droppingly beautiful work! This is one of the cleanest looking home builds I've ever seen. @LeCuvier has a great doc that details the process of editing and customizing control input LUA files. Once you've tweaked your LUA files, @Quaggles has created an outstanding mod that helps you keep your custom input files organized as well as making them persistent across DCS upgrades. Honestly, figuring out your key binds issue is going to be nothing compared to the effort it must have taken to create such a work of art like your Mustang pit. Nice job, bud. 1
Panzuur Posted January 2 Author Posted January 2 Thanks for the replies, I downloaded the Document pdf, and started looking at it, well made, now I just need to study to understand, thanks for the help! 1
Panzuur Posted January 3 Author Posted January 3 6 hours ago, 71st_AH Rob said: How long did that take to make? Took about a year, of free time work to model/design and print. 1
LeCuvier Posted January 3 Posted January 3 (edited) 15 hours ago, Panzuur said: ...Is there a updated P51 Input.lua file available that will do this, or a tutorial on how to edit a input.lua file for someone with complete programing ignorance? @Munkwolf has created a community project at this site: https://github.com/Munkwolf/dcs-community-keybinds I would expect that most everything you need is in the P-51 file. Note: these files are designed for use with the "Command Injector" by @Quaggles. See this site: https://forum.dcs.world/topic/270487-quaggles-dcs-input-command-injector-mod-v109-store-custom-input-commands-safely-in-saved-games-instead-of-merging-them-with-developer-changes-each-update/#comment-4651461 These files go into a new folder under "Saved Games". Here are a few LUA lines I created myself: {down = device_commands.Button_11, up = device_commands.Button_11, cockpit_device_id = devices.ENGINE_SYSTEM, value_down = 0.0, value_up = 0.1, name = _('Mixture 2-Pos RUN/CUT-OFF'), category = _('Flight Control')}, {down = device_commands.Button_12, up = device_commands.Button_12, cockpit_device_id = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, value_up = 0.0, name = _('Battery 2-Pos ON/OFF'), category = _('Right Switch Panel')}, {down = device_commands.Button_13, up = device_commands.Button_13, cockpit_device_id = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, value_up = 0.0, name = _('Generator 2-Pos ON/OFF'), category = _('Right Switch Panel')}, {down = device_commands.Button_14, up = device_commands.Button_14, cockpit_device_id = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, value_up = 0.0, name = _('Pitot heat 2-Pos ON/OFF'), category = _('Right Switch Panel')}, {down = device_commands.Button_12, up = device_commands.Button_12, cockpit_device_id = devices.ENGINE_CONTROL_PANEL, value_down = 1.0, value_up = 0.0, name = _('Fuel Booster 2-Pos ON/OFF'), category = _('Engine Control Panel')}, {down = device_commands.Button_2, up = device_commands.Button_2, cockpit_device_id = devices.FRONT_SWITCH_BOX, value_down = 0.3, value_up = 0.0, name = _('Ignition switch 2-Pos. BOTH/OFF'), category = _('Front Switch Box')}, {down = device_commands.Button_5, up = device_commands.Button_5, cockpit_device_id = devices.FUEL_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Fuel shut-off valve 2-Pos ON/OFF'), category = _('Fuel Control')}, {down = device_commands.Button_26, up = device_commands.Button_26, cockpit_device_id = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, value_up = 0.0, name = _('Gun heat 2-Pos ON/OFF'), category = _('Right Switch Panel')}, {down = device_commands.Button_15, up = device_commands.Button_15, cockpit_device_id = devices.K14_GUNSIGHT, value_down = 1.0,value_up = 0.0, name = _('Gunsight gyromotor power 2-Pos ON/OFF'), category = _('K-14 gunsight')}, {down = device_commands.Button_6, up = device_commands.Button_6, cockpit_device_id = devices.K14_GUNSIGHT, value_down = 1.0,value_up = 0.0, name = _('Gunsight Reticle Mask 2-Pos ON/OFF'), category = _('K-14 gunsight')}, {down = device_commands.Button_3, up = device_commands.Button_3, cockpit_device_id = devices.CONTROL_SYSTEM, value_down = 1.0,value_up = 0.0, name = _('Landing Gear 2-Pos UP/DOWN'), category = _('Systems')}, {down = device_commands.Button_1, up = device_commands.Button_1, cockpit_device_id = devices.CONTROL_SYSTEM, value_down = 1.0, value_up = 0.8, name = _('Flaps FLIGHT/10° OUT'), category = _('Flight Control')}, {down = device_commands.Button_1, up = device_commands.Button_1, cockpit_device_id = devices.CONTROL_SYSTEM, value_down = 0.0, value_up = 0.6, name = _('Flaps LAND/20° OUT'), category = _('Flight Control')}, Edited January 3 by LeCuvier 1 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
Panzuur Posted January 3 Author Posted January 3 Thanks LeCuvier , I downloaded Command Injector and OvGme, and in the process of learning how they work. Also thanks for your code, I will use it and it will help me understand how I should make my own! 1
Panzuur Posted January 3 Author Posted January 3 (edited) So how do I know what Value to assign device_commands.Button_"X" when I create new button commands? Thanks! Edited January 3 by Panzuur update
LeCuvier Posted January 4 Posted January 4 12 hours ago, Panzuur said: So how do I know what Value to assign device_commands.Button_"X" when I create new button commands? Thanks! You find them in the file "clickable_data.lua" under \Cockpit\Scripts\ in the game folder structure. You should really read the reference document! 1 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
Panzuur Posted January 4 Author Posted January 4 4 hours ago, LeCuvier said: You find them in the file "clickable_data.lua" under \Cockpit\Scripts\ in the game folder structure. You should really read the reference document! Your Right, I'll dig into the Document, just was excited to get some working, Really appreciate your help! 1
Panzuur Posted January 4 Author Posted January 4 Thanks all, I was able to edit my default.lua file and add the code to get the switches to work. (couldn't get the "Command Injector" by @Quaggles to work not sure what am doing wrong but that not a big deal) What issue I have now is with the Switch covers. Alone they work fine, open/close great. the problem is for example the oil cooler switch is in the neutral position, and I close the cover, in reality the cover closes and turns the switch to "AUTO" , But in DCS it closes and then the switch and cover reopen. I hope that makes sense. see pics and video attached. It does this on the cooler covers and the supercharger cover. OIL SWITCH.mp4 1
LeCuvier Posted January 5 Posted January 5 (edited) 13 hours ago, Panzuur said: Thanks all, I was able to edit my default.lua file and add the code to get the switches to work. (couldn't get the "Command Injector" by @Quaggles to work not sure what am doing wrong but that not a big deal) What issue I have now is with the Switch covers. Alone they work fine, open/close great. the problem is for example the oil cooler switch is in the neutral position, and I close the cover, in reality the cover closes and turns the switch to "AUTO" , But in DCS it closes and then the switch and cover reopen. I hope that makes sense. see pics and video attached. It does this on the cooler covers and the supercharger cover. Try these 2-position commands for the two radiator switch covers! {down = device_commands.Button_3, up = device_commands.Button_3, cockpit_device_id = devices.ENGINE_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Radiator Coolant Cover 2-Pos OPEN/CLOSE'), category = _('Radiator Air Controls')}, {down = device_commands.Button_4, up = device_commands.Button_4, cockpit_device_id = devices.ENGINE_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Radiator Oil Cover 2-Pos OPEN/CLOSE'), category = _('Radiator Air Controls')}, Try this for the supercharger switch cover: {down = device_commands.Button_2, up = device_commands.Button_2, cockpit_device_id = devices.ENGINE_CONTROL_PANEL, value_down = 1.0, value_up = 0.0, name = _('Supercharger Switch Cover 2-Pos OPEN/CLOSE'), category = _('Engine Control Panel')}, Edited January 5 by LeCuvier 1 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
Slippa Posted January 5 Posted January 5 Looks great Panzuur, nicely done. Wish I had the room for it myself. Welcome to DCS
Panzuur Posted January 5 Author Posted January 5 Thanks LeCuvier , I have used your suggested code you supplied, and it does work for the cover, but it still has this odd behavior. I think it must be coded somewhere else to do this. If I have the cover open and move the switch to Automatic position, then close the cover it works fine, the issue is when the physical cover moves the physical switch to auto due to the cover closing that it triggers something that toggles the in-game switch to manual and that toggles the cover to open. if that makes sense. I think the answer is to disable this behavior somehow or make it that when the cover is closed force the switch to be in auto position. Everything works if the switch is moved then the cover, just when the physical cover forces the switch position does it exhibit the behavior. I am learning a lot about the input LUA file! and have everything working but this. The P47 was much easier to set up!
LeCuvier Posted January 5 Posted January 5 2 hours ago, Panzuur said: ...If I have the cover open and move the switch to Automatic position, then close the cover it works fine, the issue is when the physical cover moves the physical switch to auto due to the cover closing that it triggers something that toggles the in-game switch to manual and that toggles the cover to open. Can you try these lines for the Coolant switch? If that works we can create the same function for the Oil switch. It works here. {down = device_commands.Button_1, cockpit_device_id = devices.ENGINE_SYSTEM, value_down = 0.1, name = _('Radiator Coolant Switch CLOSE'), category = _('Radiator Air Controls')}, {down = device_commands.Button_1, cockpit_device_id = devices.ENGINE_SYSTEM, value_down = 0.3, name = _('Radiator Coolant Switch OPEN'), category = _('Radiator Air Controls')}, Good luck! 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
Panzuur Posted January 5 Author Posted January 5 Thanks LeCuvier, So I added your code, but I neednulled to change the values to get it to do what I was looking for. But I cannot assign the same Joy_Button to 2 different controls in DCS so the cover does not move. In the video attached I move the switch to the manual open/closed positions works great and the switch in manual and close the cover and the switch goes to auto like it should, this is what is happening in the video, the Physical cover is closing the switch, just the virtual switch cover dose not move, but the real world cover closes. Hope that makes sense. And thanks for your help I'm learning allot! Digital Combat Simulator 2025-01-05 16-01-03.mp4
LeCuvier Posted January 6 Posted January 6 11 hours ago, Panzuur said: hanks LeCuvier, So I added your code, but I neednulled to change the values to get it to do what I was looking for. But I cannot assign the same Joy_Button to 2 different controls in DCS so the cover does not move. In the video attached I move the switch to the manual open/closed positions works great and the switch in manual and close the cover and the switch goes to auto like it should, this is what is happening in the video, the Physical cover is closing the switch, just the virtual switch cover dose not move, but the real world cover closes. Hope that makes sense. And thanks for your help I'm learning allot! Digital Combat Simulator 2025-01-05 16-01-03.mp4 What does this mean: "but I neednulled to change the values "? In the video I see the switch flipping around, but I never see the cover moving. You have bound switches to two different versions of "coolant close". Why? You are apparently using a 2-position switch for coolent OPEN/CLOSE, and using the _OFF event which is not reliable. I would have thought that you used a 3-position switch for Open/Auto/Close. Actually, in order to understand what's going on I would need to know what kind of switches you use. Anyway the whole thing is tricky. In the real-life cockpit the switch and cover are obviously electro/mechanically connected to force the switch to Auto when the cover is closed. If you don't have the same interlocks in your sim cockpit, the view of the virtual cockpit might sometimes not match what your sim cockpit shows. It might therefore be easier to set "Automatic" before closing the cover. 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
Panzuur Posted January 6 Author Posted January 6 (edited) 9 hours ago, LeCuvier said: It might therefore be easier to set "Automatic" before closing the cover. Thats what I have been doing So the values I changed were in the code you sent last , the value down was 0.1 and 0.3 , I changed to 0.0 and 0.2. otherwise the cover triggered the switch to goto open and closed. I could not find a 3 way position switch for sale and originals are too expensive so I made my own switch, each position activates a Normally Open micro switch , currently a switch at positions AUTO, OPEN and CLOSED, I have a switch at the Manual Position but thats not available in the default.lua ( maybe I should try to add that Command? that may be the answer. ) and a Normally Open reed switch that triggers when the cover is open. I may look at joystick gremlin , I may be able to make a macro to do what I need. I appreciate your help! , I will get this working eventually . Edited January 6 by Panzuur Chnullenged = changed. All the kids are saying it.
LeCuvier Posted January 6 Posted January 6 1 hour ago, Panzuur said: ... chnullanged ... Thanks for enriching my English vocabulary! (I'm German) And good luck! 1 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
MAXsenna Posted January 6 Posted January 6 @Panzuur If you click the "paste as plain text" text below the text box when pasting pictures, you will not get the ridiculous "null" text. Sent from my SM-A536B using Tapatalk 1 1
Recommended Posts