Jump to content

Separate gear up/gear down commands?


Lixma 06

Recommended Posts

+1

TWC_SLAG

 

Win 10 64 bit, 2T Hard Drive, 1T SSD, 500GB SSD, ASUS Prime Z390 MB, Intel i9 9900 Coffee Lake 3.1mhz CPU, ASUS 2070 Super GPU, 32gb DDR4 Ram, Track IR5, 32” Gigabyte curved monitor, TM Warthog HOTAS, CH Pedals, Voice Attack, hp Reverb G2.

Link to comment
Share on other sites

This is ED:s forum... ;)

 

 

Yes, you're right, but it would be better that those who have to read the forum where the various requests appear to apply them concretely, otherwise they remain ends in themselves and do not change anything ...:smilewink:

 

 

 

:thumbup:

Link to comment
Share on other sites

  • 2 months later...

2 seperate switches to a keybind instead of a device so to speak

 

After Captain and Lecuvier pounded into my head how to do similar with a toggle switch as a keybind instead of a controller setting, I was able to adapt this with a few alterations using the inputs keyboard\keyboard\default lua instead of the joystick.lua to get the gear down on one switch and the gear up on another as a keybind which I then assigned to a TM Hotas throttle to the forward and back of one of the 3 position switches which is so perfect since it is what I use for all my gear ups and downs. Thanks so much Captain for all you do.

{down = device_commands.Button_4, up = device_commands.Button_4, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 1.0, name = _('Landing Gear Down'), category = _('Systems')},
{down = device_commands.Button_4, up = device_commands.Button_4, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 0.0, name = _('Landing Gear Up'), category = _('Systems')},
{down = device_commands.Button_4, up = device_commands.Button_5, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 1.0, name = _('Landing Gear Down'), category = _('Systems')},
{down = device_commands.Button_4, up = device_commands.Button_5, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 0.0, name = _('Landing Gear Up'), category = _('Systems')},

 

CORRECTED CODE HERE Thanks For straightening me out LeCuvier:

 

{down = device_commands.Button_3, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 1.0, name = _('Landing Gear Up'), category = _('Systems')},
{down = device_commands.Button_3, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 0.0, name = _('Landing Gear Down'), category = _('Systems')},


Edited by DeepDrummer
added corrected code

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

Just some minor remarks:

1. the statements "up = device_commands.Button_4" and "up = device_commands.Button_5" in your code do nothing as you have not specified any action for "value_up". They are simply superfluous.

2. The second pair of code lines does the same thing as the first and is redundant. Even if the 2 pairs of lines specified different actions, only one pair would be visible in Options/Controls, because they have the same names (as far as I can make out). Remember: names must be unique!

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

Link to comment
Share on other sites

Just some minor remarks:

1. the statements "up = device_commands.Button_4" and "up = device_commands.Button_5" in your code do nothing as you have not specified any action for "value_up". They are simply superfluous.

2. The second pair of code lines does the same thing as the first and is redundant. Even if the 2 pairs of lines specified different actions, only one pair would be visible in Options/Controls, because they have the same names (as far as I can make out). Remember: names must be unique!

 

Thanks LeCuvier.

I figured the first set of 2 lines was one switch and the second set of lines was another.

I'll drop the up out and change the button# to 3 as indicated in your messages and remove a couple lines.

I knew when I looked at it that it couldn't be prim and proper but it did work.

I'll mess with some more. Thanks for all you do.

I am referring to your excellent pdf on the subject as well.

Goods stuff!

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

I edited the code to reflect your advice.

I had to switch the Name= line to get it on the side of the switch I wanted.

Oddly it worked before but maybe the second entry cobbled it's way around it.

I changed the Button # to 3 to reflect the proper control as well and I thank you for your advice and information on that note.

All in all this new code works perfectly for me now thanks to you.

With snow starting to rear it's ugly head, I can see some lua learning as it pertains to DCS along with another scripting language I am learning.

Thanks for all you do.

 

Corrected code attached and I will change my other entry as well to reflect the change:

 

 

{down = device_commands.Button_3, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 1.0, name = _('Landing Gear Up'), category = _('Systems')},
{down = device_commands.Button_3, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 0.0, name = _('Landing Gear Down'), category = _('Systems')},

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

There were a pile of switches without proper operations.

I got what I needed by including this for keybinds.

{down = device_commands.Button_3, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 1.0, name = _('Landing Gear Up'), category = _('Systems')},
{down = device_commands.Button_3, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 0.0, name = _('Landing Gear Down'), category = _('Systems')},

{down = device_commands.Button_12, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, name = _('Battery ON'), category = _('Systems')},
{down = device_commands.Button_12, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 0.0, name = _('Battery OFF'), category = _('Systems')},

{down = device_commands.Button_9, cockpit_device_id  = devices.ENGINE_CONTROL_PANEL, value_down = 1.0, name = _('Starter Switch Cover OPEN'), category = _('Engine Control Panel')},
{down = device_commands.Button_9, cockpit_device_id  = devices.ENGINE_CONTROL_PANEL, value_down = 0.0, name = _('Starter Switch Cover CLOSE'), category = _('Engine Control Panel')},

{down = device_commands.Button_2, cockpit_device_id  = devices.FUEL_SYSTEM, value_down = 1.0, name = _('Fuel Shut Off Valve ON'), category = _('Fuel Control')},
{down = device_commands.Button_2, cockpit_device_id  = devices.FUEL_SYSTEM, value_down = 0.0, name = _('Fuel Shut Off Valve OFF'), category = _('Fuel Control')},

{down = device_commands.Button_13, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, name = _('Generator ON'), category = _('Right Switch Panel')},
{down = device_commands.Button_13, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 0.0, name = _('Generator OFF'), category = _('Right Switch Panel')},

{down = device_commands.Button_7, cockpit_device_id  = devices.LIGHT_SYSTEM, value_down = 1.0, name = _('Landing Lights ON'), category = _('Environment System')},
{down = device_commands.Button_7, cockpit_device_id  = devices.LIGHT_SYSTEM, value_down = 0.0, name = _('Landing Lights OFF'), category = _('Environment System')},

{down = device_commands.Button_24, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, name = _('Recognition Lights ON'), category = _('Right Switch Panel')},
{down = device_commands.Button_24, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 0.0, name = _('Recognition Lights OFF'), category = _('Right Switch Panel')},

{down = device_commands.Button_7, cockpit_device_id  = devices.TAIL_WARNING_RADAR, value_down = 1.0, name = _('Rear Warn Radar Power ON'), category = _('Right Switch Panel')},
{down = device_commands.Button_7, cockpit_device_id  = devices.TAIL_WARNING_RADAR, value_down = 0.0, name = _('Rear Warn Radar Power OFF'), category = _('Right Switch Panel')},

{down = device_commands.Button_16, cockpit_device_id  = devices.K14_GUNSIGHT, value_down = 1.0, name = _('Gunsight Gyro Motor Power ON'), category = _('K-14 gunsight')},
{down = device_commands.Button_16, cockpit_device_id  = devices.K14_GUNSIGHT, value_down = 0.0, name = _('Gunsight Gyro Motor Power OFF'), category = _('K-14 gunsight')},

{down = device_commands.Button_14, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, name = _('Pitot Heat ON'), category = _('Right Switch Panel')},
{down = device_commands.Button_14, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 0.0, name = _('Pitot Heat OFF'), category = _('Right Switch Panel')},

{down = device_commands.Button_3, cockpit_device_id  = devices.OXYGEN_SYSTEM, value_down = 1.0, name = _('Oxygen Regulator Auto Mix ON'), category = _('Systems')},
{down = device_commands.Button_3, cockpit_device_id  = devices.OXYGEN_SYSTEM, value_down = 0.0, name = _('Oxygen Regulator Auto Mix OFF'), category = _('Systems')},

{down = device_commands.Button_1, cockpit_device_id  = devices.OXYGEN_SYSTEM, value_down = 1.0, name = _('Oxygen Regulator Emerg Bypass ON'), category = _('Systems')},
{down = device_commands.Button_1, cockpit_device_id  = devices.OXYGEN_SYSTEM, value_down = 0.0, name = _('Oxygen Regulator Emerg Bypass OFF'), category = _('Systems')},

{down = device_commands.Button_2, cockpit_device_id  = devices.ENGINE_CONTROL_PANEL, value_down = 1.0, name = _('Supercharger Switch Cover Open'), category = _('Engine Control Panel')},
{down = device_commands.Button_2, cockpit_device_id  = devices.ENGINE_CONTROL_PANEL, value_down = 0.0, name = _('Supercharger Switch Cover Close'), category = _('Engine Control Panel')},

{down = device_commands.Button_14, cockpit_device_id  = devices.WEAPON_CONTROL, value_down = 1.0, name = _('Rockets to Delay'), category = _('Rocket Control Panel')},
{down = device_commands.Button_14, cockpit_device_id  = devices.WEAPON_CONTROL, value_down = 0.0, name = _('Rockets to INST'), category = _('Rocket Control Panel')},

{down = device_commands.Button_1, cockpit_device_id  = devices.VHF_RADIO, value_down = 1.0, name = _('Radio Power to ON'), category = _('VHF Radio')},
{down = device_commands.Button_1, cockpit_device_id  = devices.VHF_RADIO, value_down = 0.0, name = _('Radio Power to OFF'), category = _('VHF Radio')},

{down = device_commands.Button_5, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 1.0, name = _('Parking Brake ON'), category = _('Systems')},
{down = device_commands.Button_5, cockpit_device_id  = devices.CONTROL_SYSTEM, value_down = 0.0, name = _('Parking Brake OFF'), category = _('Systems')},

{down = device_commands.Button_26, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 1.0, name = _('Gun Heat ON'), category = _('Right Switch Panel')},
{down = device_commands.Button_26, cockpit_device_id  = devices.RIGHT_SWITCH_PANEL, value_down = 0.0, name = _('Gun Heat OFF'), category = _('Right Switch Panel')},

 

Now I am cooking with grease on the P-51.

Thanks guys for your help.

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

I keep a copy of my mods config input and saved games folders. It's just a copy paste to rebuild in seconds.

I think it would be a difficult change to get it done in saved games and of course the MP world would lose control.

Bit by bit some bindings are getting installed I think.

It would be handy if the update notifications would identify when changes and what those changes are made to the control profiles so we could decide whether to update our default control bindings.

I personally would not go back to defaults until all controls have proper off and ON options.

It is not worth rebuilding half a profile.

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

I back up the input folders for any I have modified the default.lua for.

 

That backs up the joystick default.lua and the keyboard default.lua.

 

I back up the saved games folder (a Gig).

Pics attached for path:

path.thumb.jpg.9f81372a48343950f40cb2d826c991d8.jpg

path2.thumb.jpg.eebb2dd2fc8557815583391d0e4a5a1f.jpg

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

I accidently deleted some templates and was glad I had done a backup after yesterdays extensive work.

It is not a matter of IF you will need a backup. It is just a matter of When:

I nicely re-organized my backups with folders named as proper paths:

backups1.thumb.jpg.6724599d470efef55ec592b7bef9ccd4.jpg

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

One more important thing I do is save separate copies of my key bindings in game to a different name as shown in case I mess up something there for a quicker recovery:

1277845724_customkeybinds.thumb.png.2df5831303037586740a6f568487497e.png

Win 10 pro 64 bit. Intel i7 4790 4 Ghz running at 4.6. Asus z97 pro wifi main board, 32 gig 2400 ddr3 gold ram, 50 inch 4K UHD and HDR TV for monitor. H80 cpu cooler. 8 other cooling fans in full tower server case. Soundblaster ZX sound card. EVGA 1080 TI FTW3. TM Hotas Wartog. TM T.16000M MFG Crosswinds Pedals. Trackir 5.

"Everyone should fly a Spitfire at least once" John S. Blyth

Link to comment
Share on other sites

  • 4 months later...
Hi, I was trying to do this for the KA-50, but I did not get it to work (I found something that works for the warthogs two way toggle swithes, but not for my x56 three way, auto-centering ones), how do I do it?

For the KA-50 this line of code gives you the command EXTEND/RETRACT for a maintained 2-position switch:

{down = 3001, up = 3001, value_down = 1.0, value_up = -1.0, cockpit_device_id = 34, name = _('Landing Gear 2-Pos EXTEND/RETR'), category = _('Ins Forward panel and gauges')},

If you want to use 2 pushbuttons instead, add these lines:

{down = 3001, value_down = 1.0, cockpit_device_id = 34, name = _('Landing Gear EXTEND'), category = _('Ins Forward panel and gauges')},
{down = 3001, value_down = -1.0, cockpit_device_id = 34, name = _('Landing Gear RETRACT'), category = _('Ins Forward panel and gauges')},

Note 1: your 3-way auto-centering switch is equivalent to 2 pushbuttons.

 

Note 2: the Ka-50 has 3 binding files: "default.lua", "Joystick - HOTAS Warthog.lua" and "Throttle - HOTAS Warthog.lua". If you want to use the TM Warthog throttle for these commands you must add the code lines to the related file. Same if you want to use the TM WH joystick. For all other controllers, the lines must be in the "default.lua". It's probably good practice to add the lines to all 3 files.


Edited by LeCuvier

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

Link to comment
Share on other sites

Can you provide me with the file structure for making this into a mod and will it require you to remove the gear line and replace with these two lines or just add the new lines? Thanks TC

Win 10 Pro 64bit | Half X F/T Case | Corsair 1200AT ps | Asus ROG Maximums XIII Extreme | I9 11900K Clocked@4200 | Nepton 240 W/C | 64GB DDR4-3600 Gskill Mem | Asus 3080 gpu/8gb | SB-Z audio | Asus 32" 1440 Monitor | Winwing Super Tauras/Super Libra | Crosswind R/P | Track-ir-5 |

Link to comment
Share on other sites

Can you provide me with the file structure for making this into a mod and will it require you to remove the gear line and replace with these two lines or just add the new lines? Thanks TC

This post contains a how-to document that provides the complete picture:

https://forums.eagle.ru/showpost.php?p=2862001&postcount=214

No, you don't need to (and should not) delete the original lines. But make sure that your added lines define new names which must be different from any existing lines.

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

Link to comment
Share on other sites

  • Recently Browsing   0 members

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