Jump to content

Missing binds: Ejection Seat arm and set On Board Clock / pull function right aux console


Recommended Posts

Posted

I fail to find the

Ejection Seat Arm keybind and

right aux console On Board Clock Pull.

If you turn the clock knob (lower left on the clock) with an encoder, it shows turning in the sim but the clock hands won't turn cause in the sim you have to pull / click the button and then turn the knob otherwise you just wind the clock. What's the keybind to pull?

Posted

I have a solution for the Ejection Seat: I added these 2 lines to the file "default.lua" under "...\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\joystick":

{down = cpt_commands.EjectionSafetyLever, value_down = 1.0, cockpit_device_id = devices.CPT_MECH, name = _('Ejection Safety Lever ARMED'), category = {_('Systems')}},
{down = cpt_commands.EjectionSafetyLever, value_down = 0.0, cockpit_device_id = devices.CPT_MECH, name = _('Ejection Safety Lever LOCKED'), category = {_('Systems')}},

These lines provide separate key binds for ARM and LOCK. If you want to use a single maintained ON/OFF switch instead, use this line:

{down = cpt_commands.EjectionSafetyLever, up = cpt_commands.EjectionSafetyLever, value_down = 1.0, value_up = 0.0, cockpit_device_id = devices.CPT_MECH, name = _('Ejection Safety Lever 2-Pos ARMED/LOCKED'), category = {_('Systems')}},

I have not looked at the clock pull/turn thing yet. If you are willing to make additions to the "default.lua" I might try.

  • Like 1
  • Thanks 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

Posted (edited)

Regarding your second item, there are key binds for Pull, CW and CCW. What are you missing?

Edit: Having tried this, I concede that it's awkward to push and hold one button and at the same time keep pushing another button, especially if you are out of buttons and have to use a modifier which means, push a key on your keyboard plus push two buttons on your button box or whatever simultaneously. But it's no problem if you have a spare Maintained ON/OFF switch. Set it to ON and then turn the knob. Set it back to OFF when you are done turning.

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

Posted

I felt challenged to produce commands that combine pull and Turn into single key binds, and it turned out to be easy. These 2 lines of code do it:

{down = clock_commands.CLOCK_left_lev_up, pressed = clock_commands.CLOCK_left_lev_rotate, up = clock_commands.CLOCK_left_lev_up, cockpit_device_id = devices.CLOCK,	value_down = 1.0, value_pressed = -0.01, value_up = 0.0, name = _('Clock Winding and Setting Knob - PULL & CCW'), category = {_('Right Auxiliary Console')}},
{down = clock_commands.CLOCK_left_lev_up, pressed = clock_commands.CLOCK_left_lev_rotate, up = clock_commands.CLOCK_left_lev_up, cockpit_device_id = devices.CLOCK,	value_down = 1.0, value_pressed = 0.01, value_up = 0.0, name = _('Clock Winding and Setting Knob - PULL & CW'), category = {_('Right Auxiliary Console')}},

This creates 2 new key binds. The first one will pull the button and rotate it counter-clockwise as long as you keep pushing the bound key or button. The second one does the same but rotates the button clockwise. You mention using a rotary encoder. I tried this and in works, but extremely slowly. Not acceptable for me. But if your rotary encoder produces longer pulses that might be fine.

Note: If you want to use the keyboard for these commands, you must edit the "default.lua" under "...\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\keyboard".

If you don't want to edit your lua file, no problem for me. I enjoyed trying this.

  • Like 1
  • Thanks 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

Posted (edited)
59 minutes ago, LeCuvier said:

Regarding your second item, there are key binds for Pull, CW and CCW. What are you missing?

[...] Set it back to OFF when you are done turning.

 

I haven't those. There is a Pull, but it's for the stop watch funtion (upper right), start, stop, reset. In the german localization I got two almost identical entries for Turn CCW, perhaps there's something messed up (none of them has the Pull function)

Yes, it seems best to set it to a permanent switch like "pulled all the time out" as there's no reason in winding the clock.

 

Concerning your .lua edit: Thanks for this one! Being totally unexperienced in .lua I just add these lines to anywhere (as long as it matches the syntax ofc)? Funny thing is I can add keybinds from each of my boards, but not from keyboard. Fine for me, but just curious.

 

edit: yes, joystick.lua /= keyboard.lua. Read your 3rd post too late!

Encoder is extremely slow, same problem with HSI course change, perhaps I change back to simple "hold to move up / down". In MSFS it was more convenient with Mobiflight's "fast turn" function.

Edited by void68
Posted

I'm German, but I do not use the German version. Why? Because I have rarely seen a translation without errors.
Regarding the EHSI commands for Heading and Course, you can make them faster. Heading commands are defined by these 2 lines:

{	pressed = ehsi_commands.LeftKnob,												cockpit_device_id = devices.EHSI,	value_pressed = -0.01,						name = _('HDG Set Knob - CCW/Decrease'),						category = {_('Instrument Panel')}},
{	pressed = ehsi_commands.LeftKnob,												cockpit_device_id = devices.EHSI,	value_pressed =  0.01,						name = _('HDG Set Knob - CW/Increase'),							category = {_('Instrument Panel')}},

The number following "value_pressed" defines how fast the heading pointer rotates. You could just overwrite the 0.01 with a higher number, but I prefer to create a new "Fast" version of the command. I have added these two lines of code:

{pressed = ehsi_commands.LeftKnob, cockpit_device_id = devices.EHSI, value_pressed = -0.1, name = _('HDG Set Knob - CCW/Decrease Fast'), category = {_('Instrument Panel')}},
{pressed = ehsi_commands.LeftKnob, cockpit_device_id = devices.EHSI, value_pressed =  0.1, name = _('HDG Set Knob - CW/Increase Fast'), category = {_('Instrument Panel')}},

These work well for me. I'm fairly sure you could do the same with the Course commands.
Note:
1. The added commands' names must be different from those of the original commands.
2. The original commands contain a lot of spaces or tabs. They have no function. I always take them out when I make a new command.
3. If you want to know what you are doing, I recommend you download my tutorial from this post: https://forum.dcs.world/topic/270080-lua-editing-for-additional-key-binds-tutorial-no-discussion-here-please/#elControls_4646929_menu

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

Posted

Great idea, but with the higher "transmission" is it still possible to hit exactly still the first decimal? I'll take a look into your tutorial and try to learn a bit of the magic in it.

 

Posted
9 hours ago, void68 said:

Great idea, but with the higher "transmission" is it still possible to hit exactly still the first decimal? I'll take a look into your tutorial and try to learn a bit of the magic in it.

 

As you see from the numbers, I have made them 10 times faster. If you find that too fast you can reduce the values, e.g. to 0.05.
 

  • Like 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

Posted (edited)

I am stunned! Great tutorial, so much possibilities. I do some testing this evening, this would have saved my quite some hardware. Thanks a lot!

 

The possibility to completely re-write the .lua to match my needs... proper maintained switches, axis backup trim for the F-16 etc etc.

Edited by void68
Posted (edited)

Damn, I don't get it...

 

So I want a maintained switch for the Left Hardpoint ON an OFF. What I did to the default.lua:

Quote

{down = sms_commands.LeftHDPT,  up = sms_commands.LeftHDPT,  cockpit_device_id = devices.SMS,  value_down =  1.0,  value_up=0.0   name = _('LEFT HDPT Switch - ON/OFF NEW'), category = {_('Right Console'), _('SNSR PWR Control Panel')}},

Problem, the 'LEFT HDPT Switch - ON/OFF NEW'  entry isn't in the keybindings. I searched for "NEW", I checked the right consoles. none. Why doesn't it show up?

 

I messed it up.

The

Quote

{down = cpt_commands.EjectionSafetyLever, value_down = 1.0, cockpit_device_id = devices.CPT_MECH, name = _('Ejection Safety Lever ARMED'), category = {_('Systems')}},
{down = cpt_commands.EjectionSafetyLever, value_down = 0.0, cockpit_device_id = devices.CPT_MECH, name = _('Ejection Safety Lever LOCKED'), category = {_('Systems')}},

is still in the F-16\joystick\default.lua can't be defined under keybindings to keyboard. All other columns are grayed out. Damn, it worked before.

 

Now all my boards are still visible but almost no inputs possible. 90% greyed out fields.

Edited by void68
Posted (edited)

There is a problem in your hardpoint switch line. I have not yet found what it is, but when I include your line in my "default.lua" then the commands under "Sensor power control panel" can no longer be bound to anything except the keyboard. Searching...

Edit: Got it. You omitted the comma after the "value_up = 0.0". That invalidates your line, and in this case everything with that device ID. I entered this corrected line and it shows up under Options/Controls now.

{down = sms_commands.LeftHDPT,  up = sms_commands.LeftHDPT,  cockpit_device_id = devices.SMS,  value_down =  1.0,  value_up = 0.0,   name = _('LEFT HDPT Switch - ON/OFF NEW'), category = {_('Right Console'), _('SNSR PWR Control Panel')}}, 

You have to be paranoid with the formatting of your added lines. A missing or extra comma can invalidate your "default.lua" altogether.

Re your second issue, not sure I understand. If you want to use the command with the keyboard you must include it in the "default.lua" under "...\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\keyboard".

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

Posted

thank you, I'll test it. Late evening, all failed and settings gone... left me very frustrated. Did an integrety check and all is back again working. Second iteration now...

Sorry for that idiot fault... I lost track.

Posted
On 9/15/2022 at 4:45 PM, LeCuvier said:

I have a solution for the Ejection Seat: I added these 2 lines to the file "default.lua" under "...\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\joystick":

{down = cpt_commands.EjectionSafetyLever, value_down = 1.0, cockpit_device_id = devices.CPT_MECH, name = _('Ejection Safety Lever ARMED'), category = {_('Systems')}},
{down = cpt_commands.EjectionSafetyLever, value_down = 0.0, cockpit_device_id = devices.CPT_MECH, name = _('Ejection Safety Lever LOCKED'), category = {_('Systems')}},

These lines provide separate key binds for ARM and LOCK. If you want to use a single maintained ON/OFF switch instead, use this line:

{down = cpt_commands.EjectionSafetyLever, up = cpt_commands.EjectionSafetyLever, value_down = 1.0, value_up = 0.0, cockpit_device_id = devices.CPT_MECH, name = _('Ejection Safety Lever 2-Pos ARMED/LOCKED'), category = {_('Systems')}},

I have not looked at the clock pull/turn thing yet. If you are willing to make additions to the "default.lua" I might try.

If i put this in the joystick file i cant get keyboarded functionalities, now... 'Would it possible if i put the same lines into the keboard default file, problem solved?

Posted
45 minutes ago, Icarus31 said:

If i put this in the joystick file i cant get keyboarded functionalities, now... 'Would it possible if i put the same lines into the keboard default file, problem solved?

Yes of course, if you want to use the commands from the keyboard the 2 lines must be added to the "default.lua" under "...\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\keyboard"

  • Thanks 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

  • Recently Browsing   0 members

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