Jump to content

Toggle Switch for Altitude Select


Recommended Posts

Hey Folks,

 

I'm trying to map the Altitude Select (BARO/RDR) function in the F18 to thr RDR ALTM switch on the TM Warthog Throttle, which is JOY_BTN25. This does not appear in the Special Keys section.

 

Would someone be able to walk me through this please? I'm ok editing .lua files, but I have no idea what to copy and paste into where etc... eg, Saved Games structure or the game installation structure.

 

Muchly appreciated

W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM

Link to comment
Share on other sites

I'm using this line of code with JOY_BTN25:

{down = HUD_commands.HUD_AltitudeSw, up = HUD_commands.HUD_AltitudeSw, cockpit_device_id = devices.HUD,    value_down =  1.0, value_up =  0.0, name = _('Altitude Switch 2-Pos BARO/RADAR'), category = {_('Instrument Panel'), _('HUD Control Panel')}},

You need to add it to the file "default.lua" in the folder "...\Eagle Dynamics\DCS World\Mods\aircraft\FA-18C\Input\FA-18C\joystick".

I recommend you insert it just below this line which is at the beginning of the file:

"join(res.keyCommands,{"

It's recommended to use a program like OvGME to manage this kind of mods. This will allow you to move the modified file out before an update and move it back in after the update. If you don't use OvGME (or JvGME) you will have to re-do the modification after every update or repair.

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'm using this line of code with JOY_BTN25:

{down = HUD_commands.HUD_AltitudeSw, up = HUD_commands.HUD_AltitudeSw, cockpit_device_id = devices.HUD,    value_down =  1.0, value_up =  0.0, name = _('Altitude Switch 2-Pos BARO/RADAR'), category = {_('Instrument Panel'), _('HUD Control Panel')}},

You need to add it to the file "default.lua" in the folder "...\Eagle Dynamics\DCS World\Mods\aircraft\FA-18C\Input\FA-18C\joystick".

I recommend you insert it just below this line which is at the beginning of the file:

"join(res.keyCommands,{"

It's recommended to use a program like OvGME to manage this kind of mods. This will allow you to move the modified file out before an update and move it back in after the update. If you don't use OvGME (or JvGME) you will have to re-do the modification after every update or repair.

Many thanks LeCuvier. I'm still a little confused. I looked at that file earlier and found the 3 coded lines that pertain to this Altitude Select button further down, it seemed to exist in the file (although maybe not exactly as you have typed above). Or is that just the file DCS reads to display it in the options GUI page?

 

Sorry for my lack of understanding

W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM

Link to comment
Share on other sites

Many thanks LeCuvier. I'm still a little confused. I looked at that file earlier and found the 3 coded lines that pertain to this Altitude Select button further down, it seemed to exist in the file (although maybe not exactly as you have typed above). Or is that just the file DCS reads to display it in the options GUI page?

 

Sorry for my lack of understanding

These 3 lines provide commands for push buttons. The first one toggles the switch ON/OFF/ON.... etc each time you push the button. The 2nd and 3rd lines go together and require 2 push buttons: One for Baro and one for Radar.

The line I added is for use with a maintained ON/OFF switch like the switch RDR ALTM on the WH throttle. The switch in the UP position will select Barometric and in the down position it will select Radar as source for the altitude indication.

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

These 3 lines provide commands for push buttons. The first one toggles the switch ON/OFF/ON.... etc each time you push the button. The 2nd and 3rd lines go together and require 2 push buttons: One for Baro and one for Radar.

The line I added is for use with a maintained ON/OFF switch like the switch RDR ALTM on the WH throttle. The switch in the UP position will select Barometric and in the down position it will select Radar as source for the altitude indication.

So the line you provided is in addition to those already in the file and over-rides them in the GUI?

W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM

Link to comment
Share on other sites

Ok, I inserted that line into the default.lua, all it did was make all of the device bindings disappear in the Options/Controls GUI under F/A-18C Sim tab. I couldn't find the new line in the list of commands.

W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM

Link to comment
Share on other sites

Ahhh.... ok, I got it to work.

 

Thanks again LeCuvier, greatly appreciated.

 

Cheers!

W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM

Link to comment
Share on other sites

Ahhh.... ok, I got it to work.

 

Thanks again LeCuvier, greatly appreciated.

 

Cheers!

If you want to get a deeper understanding of what we are doing here, you may want to look at the how-to document posted here: https://forums.eagle.ru/showpost.php?p=2862001&postcount=214

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

Downloaded..... Great info in there.

 

Many thanks

W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM

Link to comment
Share on other sites

  • 4 months later...
I'm using this line of code with JOY_BTN25:

{down = HUD_commands.HUD_AltitudeSw, up = HUD_commands.HUD_AltitudeSw, cockpit_device_id = devices.HUD,    value_down =  1.0, value_up =  0.0, name = _('Altitude Switch 2-Pos BARO/RADAR'), category = {_('Instrument Panel'), _('HUD Control Panel')}},

You need to add it to the file "default.lua" in the folder "...\Eagle Dynamics\DCS World\Mods\aircraft\FA-18C\Input\FA-18C\joystick".

I recommend you insert it just below this line which is at the beginning of the file:

"join(res.keyCommands,{"

It's recommended to use a program like OvGME to manage this kind of mods. This will allow you to move the modified file out before an update and move it back in after the update. If you don't use OvGME (or JvGME) you will have to re-do the modification after every update or repair.

 

If you want to get a deeper understanding of what we are doing here, you may want to look at the how-to document posted here: https://forums.eagle.ru/showpost.php?p=2862001&postcount=214

 

 

Exactly what I needed! THANK YOU, SIR!!! thumbup.gif

"Landing on the ship during the daytime is like sex, it's either good or it's great. Landing on the ship at night is like a trip to the dentist, you may get away with no pain, but you just don't feel comfortable"

— LCDR Thomas Quinn, USN.

Link to comment
Share on other sites

Just a little word of warning. Every now and then, especially with an early access product like the Hornet, new commands will be added in an update. This week's update added at a minimum the depress function of the sensor control switch.

 

 

 

When this happens, you'll need to create a new version of your mod from the updated default.lua.

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...