Jump to content

Help with editing Controls deafault.lau file!


Recommended Posts

I'm currently trying to figure out how to edit the F-18's default.lau file so that I can have say the APU switch on my Warthog HOTAS work with the landing gear. As of now I can only get the switch to work by clicking the switch twice as opposed to the switch matching the landing gear lever.

 

Such as switch FWD, gear up, switch AFT gear down.

 

I've added this line:

 

{ down = iCommandPlaneGear, up = iCommandPlaneGear, value_down = 1.0, value_up = 0.0, name = _('Alternate Gear Up') category = _('Systems')},

 

and I'm not even seeing the new control in the menu.

 

Any help would be really appreciated!

 

Thanks

Link to comment
Share on other sites

It was yes, but after scrolling through and finding the "Special HOTAS" section I'm now trying this line

 

{ down = ctrl_commands.GearSw, up = ctrl_commands.GearSw, cockpit_device_id = devices.CONTROL_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Alternate Landing Gear'),

 

I've managed to get the control listing into the menu, but i'm having a hard time finding how to actually bind the "new control" to the actual gear lever. If that makes any sense?


Edited by demoteam44
Link to comment
Share on other sites

Your format is all good but the gear handle is part of another device category "devices.GEAR_INTERFACE" and the command for it is "gear_commands.GearHandle" so it would go something like:

 

{down = gear_commands.GearHandle, up = gear_commands.GearHandle, cockpit_device_id = devices.GEAR_INTERFACE, value_down =  1.0, value_up = 0.0, name = _('Alternate Landing Gear')},

 

To find out what the command is for any clickable switches you can navigate to DCS World\Mods\aircraft\FA-18C\Cockpit\Scripts\clickabledata.lua

Usually it's fairly easy to find things just by Ctrl + F searching in there.

 

JiMlhpv.png?1

Link to comment
Share on other sites

I really apprecite the help! So thank you! I'm totally clueless when it comes to reading code.

 

I managed to get gear lever to work with this:

 

{ down = iCommandPlaneGear, up = iCommandPlaneGear, cockpit_device_id = devices.CONTROL_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Alternate Landing Gear'),

 

Now using the file you pointed me to I'm trying to get the Hook Handle to work with this:

 

{ down = ctrl_commands.HookHandle, up = ctrl_commands.HookHandle, cockpit_device_id = devices.CONTROL_INTERFACE, value_down = 0.0, value_up = 1.0, name = _('Alternate Hook Handle'), category = {_('Special For Joystick'), _('Right Vertical Panel')}},

 

and not getting a thing. I'm only guessing im sooo close? lmao

Link to comment
Share on other sites

Perfect! It worked!

 

So how do I figure out the "Up" "Down" system?

 

No matter what I try with the 0's and 1's, It always seems to be the opposite, unless I click the gear handle in game to "sync" the switch to handle.

Link to comment
Share on other sites

I manged to get most of the switches I needed done except for the APU and Launch Bar.

 

{ down = gear_commands.LaunchBarSw, up = gear_commands.LaunchBarSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Alternate LaunchBar'), category = {_('Special For Joystick'), _('Right Vertical Panel')}},

 

thats the code I put in reference to:

 

elements["pnt_233"] = default_button2(_("Launch Bar Control Switch, EXTEND/RETRACT"), devices.GEAR_INTERFACE, gear_commands.LaunchBarSw, 233, anim_speed_default)

 

 

They do not show up in the controls list the only thing I can think of is that both move by themselves at some point. I.E APU shuts off after a certain time, and launch bar goes up after carrier launch.

 

Any ideas?

Link to comment
Share on other sites

I'm not really seeing anything that'd stop it from showing up, but I haven't been able get either of those to work consistently. Probably because as you say, they get moved automatically by the game at certain points.

 

Up is when your real life switch is released, the contacts are open. Down is when the switch is closed(on). Usually 1.0 is the in game switch on and 0.0 is off, sometimes it is, sometimes it isnt. That part is usually experimentation.

Link to comment
Share on other sites

Here are my commands for gear and hook.

 

Gear, 2 way switch, down - gear down, up - gear up:

{ down = gear_commands.GearHandle, up = gear_commands.GearHandle, cockpit_device_id = devices.GEAR_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Landing Gear Control Handle - 2 POS'), category = {_('Special For Joystick'), _('Left Vertical Panel')}},

 

Arresting Hook, 2 way switch, down - hook down, up - hook up:

{ down = gear_commands.HookHandle, up = gear_commands.HookHandle, cockpit_device_id = devices.GEAR_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Arresting Hook Handle - 2 POS'), category = {_('Special For Joystick'), _('Right Vertical Panel')}},

 

Just keep in mind that unless you have 'Synchronize cockpit controls with HOTAS...' option checked, I don't think first click on the switch will work. So, for example, to get gear down, the first time around you would need to cycle it once up and down before it starts working.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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