Jump to content

Switch Positions - default.lua


Recommended Posts

I spent about twenty minutes this afternoon putting this together for those who want to use a Warthog throttle and not use TARGET (which I use most of the time, but I'm thinking about stopping).

 

 

Place the following above the CHEAT section near the top of your C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Input\FA-18C\joystick\default.lua (and your C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Input\FA-18C\keyboard\default.lua).

 

 

---------------------------------------------
-- Mods  ------------------------------------
---------------------------------------------
{    down = hotas_commands.THROTTLE_EXTERIOR_LIGTHS,    up = hotas_commands.THROTTLE_EXTERIOR_LIGTHS,    cockpit_device_id = devices.HOTAS,            value_down =  1.0,    value_up = 0.0,    name = _('Exterior Lights Switch'),            category = {_('Special For Joystick'), _('Throttle Grip'), _('HOTAS')}},
{    down = gear_commands.LaunchBarSw,                up = gear_commands.LaunchBarSw,                    cockpit_device_id = devices.GEAR_INTERFACE,    value_down =  0.0,    value_up = 1.0,    name = _('Launch Bar Control Switch'),        category = {_('Special For Joystick'), _('Left Vertical Panel')}},
{    down = iCommandPlaneShipTakeOff,                up = iCommandPlaneShipTakeOff,                                                                                                    name = _('Catapult Hook-Up Switch'),        category = {_('Special For Joystick'), _('General')}},
{    down = extlights_commands.LdgTaxi,                up = extlights_commands.LdgTaxi,                cockpit_device_id = devices.EXT_LIGHTS,        value_down =  0.0,    value_up = 1.0,    name = _('LDG/TAXI LIGHT Switch'),            category = {_('Special For Joystick'), _('Left Vertical Panel')}},
{    down = gear_commands.AntiSkidSw,                up = gear_commands.AntiSkidSw,                    cockpit_device_id = devices.GEAR_INTERFACE,    value_down =  0.0,    value_up = 1.0,    name = _('Anti Skid Switch'),                category = {_('Special For Joystick'), _('Left Vertical Panel')}},
{    down = iCommandPlaneGearUp,                        up = iCommandPlaneGearDown,                                                                                                        name = _('Landing Gear Control Handle'),    category = {_('Special For Joystick'), _('Left Vertical Panel')}},
{    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'),            category = {_('Special For Joystick'), _('Right Vertical Panel')}},

Here's a few explanations for my thinking:

 

 

Exterior Lights: Simple, on/off for moving the pinky switch forward and back to center.

 

Launch Bar: Intended for the Left Fuel Flow switch, it's reversed from the original command's behavior, such that flipping the switch on will set the bar to retract, so your switch position matches that of the switch in the cockpit.

 

Catapult Hookup: Intended for the Right Fuel Flow switch, it executes the command on both up and down, so you can send the hookup command and then cancel it if you wish by simply flicking the switch off, instead of having to flip it down and then back up.

 

Landing/Taxi Light: Intended for Left Motor Switch. Flipping the switch down turns the light off, returning it to center turns the light on, so the switch position matches that of the switch in the cockpit. Flipping the switch up to the IGN position is intended to execute "Engine Crank Switch - Cycle Left." You'll have to program that in DCS if you wish to use the momentary position for it.

 

Anti-Skid Switch: Intended for Right Motor Switch. Flipping the switch down turns the switch off, returning it to center turns the switch on, so the switch position matches that of the switch in the cockpit. Flipping the switch up to the IGN position is intended to execute "Engine Crank Switch - Cycle Right." You'll have to program that in DCS if you wish to use the momentary position for it.

 

Gear Handle: Intended for the EAC switch. Flipping it up raises the gear, flipping it down lowers the gear.

 

Hook Handle: Intended for the RDR ALTM switch. Flipping it up raises the hook, flipping it down lowers the hook.

 

 

 

Also, here's what I set the other switches/buttons on the throttle to:

 

 

Pinky Switch back: Not used. I might use something later, but haven't come up with anything yet. Could be used for the ejection seat.

 

Left Throttle Button: Cage/Uncage Button

 

Slew Control: Throttle Designator Controller - Depress. X/Y axis are set to control the TDC.

 

Coolie Hat up: Radar Elevation Control - Up

Coolie Hat down: Radar Elevation Control - Down

Coolie Hat left: RAID/FLIR FOV Select Button

Coolie Hat right: ATC Engage/Disengage Switch

 

Mic Switch press: VR Zoom (under UI Layer)

Mic Switch up: COMM Switch - COMM 1

Mic Switch down: COMM Switch - COMM 2

Mic Switch left: COMM Switch - MIDS B

Mic Switch right: COMM Switch - MIDS A

 

Speed Brake forward: Speed Brake Switch - RETRACT/OFF

Speed Brake back: Speed Brake Switch - EXTEND

 

Boat Switch forward: DISPENSER Switch - BYPASS/ON

Boat Switch back: DISPENSER Switch - OFF/ON

 

China Hat forward: Dispense Switch - Forward(CHAFF)/Center(OFF)

China Hat back: Dispense Switch - Aft(FLARE)/Center(OFF)

 

APU switch: APU Control Sw (special) - ON/OFF. If you use this, you'll have to flip the switch off when the APU automatically shuts off during startup to have it match the switch position. You can also use "APU Control Switch - ON/OFF," in which case flipping the switch only toggles the switches' position. This means during startup, you should flip it up to turn it on, then immediately flip it off so it will match switch position after auto shut-off.

 

L/G WRN: MASTER CAUTION Reset Button

 

Flap switch up: FLAP Switch - AUTO/HALF

Flap switch down: FLAP Switch - FULL/HALF

 

Autopilot Engage/Disengage button: Fuel Dump Switch - ON/OFF

Autopilot switch up: Probe Control Switch - EXTEND/RETRACT

Autopilot switch down: Probe Control Switch - EMERG EXTD/RETRACT

 

Throttle Left Idle: Throttle (Left) - OFF/IDLE

Throttle Right Idle: Throttle (Right) - OFF/IDLE

 

 

 

 

Hope this helps anyone who's having issues setting up their Warthog throttle!

DEFENSOR FORTIS

Spoiler

Systems: Falcon NW Talon: Ryzen 9 5950X @4.9GHz, 64GB DDR4, RTX 3090 FE; Falcon NW Mach V: Core i7 3930K @3.2GHz, 32GB DDR3, GTX 1080 FE

Cockpit: MonsterTech MTX F, 42" 4K TV, HP Reverb G2, Oculus Rift S, PointCTRL

Controls: RS F16SGRH CE, RS F18CGRH, VPC T-50CM2, VFX, WarBRD (Grips); VPC T-50CM2, RS FSSB R3L (Bases); Winwing F/A-18C, VPC T-50CM3, VPC T-50CM, TM Warthog, Cougar (Throttles); VPC ACE2 (Rudders)

 

Link to comment
Share on other sites

You can try the “Synchronize HOTAS controls at Mission Start” option and see if that helps. Otherwise I’d pause and move all your switches around.

DEFENSOR FORTIS

Spoiler

Systems: Falcon NW Talon: Ryzen 9 5950X @4.9GHz, 64GB DDR4, RTX 3090 FE; Falcon NW Mach V: Core i7 3930K @3.2GHz, 32GB DDR3, GTX 1080 FE

Cockpit: MonsterTech MTX F, 42" 4K TV, HP Reverb G2, Oculus Rift S, PointCTRL

Controls: RS F16SGRH CE, RS F18CGRH, VPC T-50CM2, VFX, WarBRD (Grips); VPC T-50CM2, RS FSSB R3L (Bases); Winwing F/A-18C, VPC T-50CM3, VPC T-50CM, TM Warthog, Cougar (Throttles); VPC ACE2 (Rudders)

 

Link to comment
Share on other sites

  • 3 months later...

Hi Guys

 

I just got my Warthog and struggling to come to terms with it.

 

I just want to clarify, I put the above lines into the default.lua in both places for OB > Joystick and Keyboard.

 

Is there anything else I need to do as this is not working for me?

Link to comment
Share on other sites

Well the keyboard lua edit is really not necessary (unless perhaps you want to map one of these commands to a key).

 

 

 

Not sure why it wouldn't be working for you though.

DEFENSOR FORTIS

Spoiler

Systems: Falcon NW Talon: Ryzen 9 5950X @4.9GHz, 64GB DDR4, RTX 3090 FE; Falcon NW Mach V: Core i7 3930K @3.2GHz, 32GB DDR3, GTX 1080 FE

Cockpit: MonsterTech MTX F, 42" 4K TV, HP Reverb G2, Oculus Rift S, PointCTRL

Controls: RS F16SGRH CE, RS F18CGRH, VPC T-50CM2, VFX, WarBRD (Grips); VPC T-50CM2, RS FSSB R3L (Bases); Winwing F/A-18C, VPC T-50CM3, VPC T-50CM, TM Warthog, Cougar (Throttles); VPC ACE2 (Rudders)

 

Link to comment
Share on other sites

Edit: I am such a chop. As I typed the reply this morning I realized I was being stupid. I was not assigning these in game. I saw all the special for joystick commands and was not putting 2 and 2 together. This is fantastic thank you thank you.

 

I was thinking that so did remove the keyboard entries, restarted DCS and still no luck.

 

Should I be doing anything special in the key bindings in addition to my normal bindings.

 

Sent from my SM-G965F using Tapatalk


Edited by TechRoss
Link to comment
Share on other sites

...any idea why doesn't recognize at first time? i have to flip a switch up and down and then its recognizing. not a big deal but maybe its could be fixed???

I have accepted this as "normal behaviour" of the software. Sometimes it does recognize the status of all switches that are in the "ON" position; but quite often I have to cycle one switch OFF/ON/OFF and then that and other switches in the cockpit update their positions.

This is although I do have the option “Synchronize HOTAS controls at Mission Start” activated.

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

  • 3 weeks later...

any idea why it shows "no command available for this device" under the throttle and the stick?

 

as in the boxes are grayed out, I can only assign keyboard commands, not joystick.

Rafael

 

Ryzen 7 1800x @ 4ghz | MSI GTX 980ti | 32gb DDR4 Ballistix 2400Mhz | Asus ROG Crosshair VII Hero (wi-fi) | 480Gb Kingston NVMe ssd | Western Digital 1TB x2 | EVGA 850w PSU | Noctua NH-D14 | NZXT S240 | Windows 10 Pro 64bit | 4k 50" Philips android TV | Dell P2418D | Oculus Rift S | Thrustmaster Warthog Hotas

Link to comment
Share on other sites

any idea why it shows "no command available for this device" under the throttle and the stick?

 

as in the boxes are grayed out, I can only assign keyboard commands, not joystick.

Which command(s)?

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

Which command(s)?

 

my mistake, I was editing the default file for keyboard commands, not the joystick default.lua

Rafael

 

Ryzen 7 1800x @ 4ghz | MSI GTX 980ti | 32gb DDR4 Ballistix 2400Mhz | Asus ROG Crosshair VII Hero (wi-fi) | 480Gb Kingston NVMe ssd | Western Digital 1TB x2 | EVGA 850w PSU | Noctua NH-D14 | NZXT S240 | Windows 10 Pro 64bit | 4k 50" Philips android TV | Dell P2418D | Oculus Rift S | Thrustmaster Warthog Hotas

Link to comment
Share on other sites

any idea why it shows "no command available for this device" under the throttle and the stick?

 

as in the boxes are grayed out, I can only assign keyboard commands, not joystick.

Command definitions are made per device. If a command is in one lua but not another then the other will be grayed out. There are generic devices: keyboard.lua, joystick.lua and specific ones e.g. T.Flight Hotas X.diff.lua.

 

If your device has a specific lua sharing its name then it will use that. Otherwise it will use the generic device joystick.lua.

Link to comment
Share on other sites

ok so I was trying to add a few commands on my own, I copied the name of the launch bar switch from another file, and pasted into a line exactly like the anti skid, which works, like this:

 

{	down = gear_commands.LaunchBarSw,					up = gear_commands.LaunchBarSw,					cockpit_device_id = devices.GEAR_INTERFACE,		value_down =  1.0,	value_up = 0.0,	name = _('Launch Bar Control Switch'),		category = {_('Special For Joystick'), _('Mods'), _('Left Vertical Panel')}},

 

the anti skid works, when I flip the switch off, it turns off, but the launch bar doesn't, i have to flip it off and on every time. why is that?

Rafael

 

Ryzen 7 1800x @ 4ghz | MSI GTX 980ti | 32gb DDR4 Ballistix 2400Mhz | Asus ROG Crosshair VII Hero (wi-fi) | 480Gb Kingston NVMe ssd | Western Digital 1TB x2 | EVGA 850w PSU | Noctua NH-D14 | NZXT S240 | Windows 10 Pro 64bit | 4k 50" Philips android TV | Dell P2418D | Oculus Rift S | Thrustmaster Warthog Hotas

Link to comment
Share on other sites

value down is +1, value up is 0. I'm guessing that +1 is move and 0 is don't move. Try 1 and -1.

 

worked like a charm, thanks!

 

so perhaps you could help me with some other stuff,

 

I assigned the pinky switch forward to external lights as in the OP, but I wanted to assign pinky switch backwards to the same plus landing/taxi light, so a combination of the 2 functions. is it possible?


Edited by fael097

Rafael

 

Ryzen 7 1800x @ 4ghz | MSI GTX 980ti | 32gb DDR4 Ballistix 2400Mhz | Asus ROG Crosshair VII Hero (wi-fi) | 480Gb Kingston NVMe ssd | Western Digital 1TB x2 | EVGA 850w PSU | Noctua NH-D14 | NZXT S240 | Windows 10 Pro 64bit | 4k 50" Philips android TV | Dell P2418D | Oculus Rift S | Thrustmaster Warthog Hotas

Link to comment
Share on other sites

I assigned the pinky switch forward to external lights as in the OP, but I wanted to assign pinky switch backwards to the same plus landing/taxi light, so a combination of the 2 functions. is it possible?

No. You cannot mod the default.lua to trigger two commands with one input. I tried.

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

I see. so I assume there's no way to assign stuff like wing fold to a switch, since stow and turn (the wing fold lever) are different commands?

Rafael

 

Ryzen 7 1800x @ 4ghz | MSI GTX 980ti | 32gb DDR4 Ballistix 2400Mhz | Asus ROG Crosshair VII Hero (wi-fi) | 480Gb Kingston NVMe ssd | Western Digital 1TB x2 | EVGA 850w PSU | Noctua NH-D14 | NZXT S240 | Windows 10 Pro 64bit | 4k 50" Philips android TV | Dell P2418D | Oculus Rift S | Thrustmaster Warthog Hotas

Link to comment
Share on other sites

I see. so I assume there's no way to assign stuff like wing fold to a switch, since stow and turn (the wing fold lever) are different commands?

You cannot assign the PULL/STOW plus the SPREAD or FOLD to a single command. But you can bind the lever's CW and CCW commands to a pair of buttons or an Up/Down toggle, and the PULL/STOW to a pushbutton. I tried this and it works fine. No need for modification.

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

You cannot assign the PULL/STOW plus the SPREAD or FOLD to a single command. But you can bind the lever's CW and CCW commands to a pair of buttons or an Up/Down toggle, and the PULL/STOW to a pushbutton. I tried this and it works fine. No need for modification.

 

Yeah I thought this would be the case. But spending two different controller inputs into just one single task seems like a waste. I realize that there are multiple actions when turning the lever to fold the wings, but ultimately it's just one task. guess I'll wait and see if there are any unused switches left after I assign everything I need

Rafael

 

Ryzen 7 1800x @ 4ghz | MSI GTX 980ti | 32gb DDR4 Ballistix 2400Mhz | Asus ROG Crosshair VII Hero (wi-fi) | 480Gb Kingston NVMe ssd | Western Digital 1TB x2 | EVGA 850w PSU | Noctua NH-D14 | NZXT S240 | Windows 10 Pro 64bit | 4k 50" Philips android TV | Dell P2418D | Oculus Rift S | Thrustmaster Warthog Hotas

Link to comment
Share on other sites

Yeah I thought this would be the case. But spending two different controller inputs into just one single task seems like a waste. I realize that there are multiple actions when turning the lever to fold the wings, but ultimately it's just one task. guess I'll wait and see if there are any unused switches left after I assign everything I need

This beast requires all the switches and buttons I have (plus some I don't have) for in-flight activity. I would not spend any button or switch for the wings folding bit. This is only used while you're on the deck and can be very well handled by clicking in the cockpit.

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

Sometimes it doesn't want to sync with the switch position at mission start. I've not been able to figure that out. My suggestion is to move the switch positions a few times before clicking the FLY button. I don't know why else you might be having a problem.

DEFENSOR FORTIS

Spoiler

Systems: Falcon NW Talon: Ryzen 9 5950X @4.9GHz, 64GB DDR4, RTX 3090 FE; Falcon NW Mach V: Core i7 3930K @3.2GHz, 32GB DDR3, GTX 1080 FE

Cockpit: MonsterTech MTX F, 42" 4K TV, HP Reverb G2, Oculus Rift S, PointCTRL

Controls: RS F16SGRH CE, RS F18CGRH, VPC T-50CM2, VFX, WarBRD (Grips); VPC T-50CM2, RS FSSB R3L (Bases); Winwing F/A-18C, VPC T-50CM3, VPC T-50CM, TM Warthog, Cougar (Throttles); VPC ACE2 (Rudders)

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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