Jump to content

How to set up toggle switches (a tutorial)


Recommended Posts

I'll try that method, I like the idea of it self synching

 

new line

{down = 3001, value_down = -1,1, up = 3001, value_up = 0.1, cockpit_device_id = 39, name = 'Landing Gear Up/Down FT', category = 'Landing gear panel'},

 

works perfectly :thumbup:

skunk160 | Win10 PRO 64bit | i7-4770K 3.50 GHz | 32GB DDR3/1866MHz | GIGABYTE GeForce GTX 1080 x2 | Oculus Rift S | Virpil MongoosT-50CM2 | Virpil F-14B grip | Virpil 200m Curved Extension | PointCTRL | Delta Sim TM Slew | Sim Bandit AHCP | MFG Crosswind Pedals | //FOX2 Switch Boxes | RECARO SPG Seat | AuraSound AST-2B-4 Pro Bass Transducer x2

//FOXTWO Multi-Role Combat Pit Build http://forums.eagle.ru/showthread.php?t=134745

Link to comment
Share on other sites

new line

{down = 3001, value_down = -1,1, up = 3001, value_up = 0.1, cockpit_device_id = 39, name = 'Landing Gear Up/Down FT', category = 'Landing gear panel'},

 

works perfectly :thumbup:

 

Glad it works :) although I see a comma in your first argument instead of a period. Are you sure this works?

Link to comment
Share on other sites

Glad it works :) although I see a comma in your first argument instead of a period. Are you sure this works?

 

 

you mean between -1 and 1 ? ...looking at it again theres a . in value_up = 0.1 that should be a ,

 

values were -1,1 and 0,1

 

{down = 3001, value_down = -1,1, up = 3001, value_up = 0.1, cockpit_device_id = 39, name = 'Landing Gear Up/Down FT', category = 'Landing gear panel'},

 

 

it was working, ill double check the error was in this somehow and not in game

skunk160 | Win10 PRO 64bit | i7-4770K 3.50 GHz | 32GB DDR3/1866MHz | GIGABYTE GeForce GTX 1080 x2 | Oculus Rift S | Virpil MongoosT-50CM2 | Virpil F-14B grip | Virpil 200m Curved Extension | PointCTRL | Delta Sim TM Slew | Sim Bandit AHCP | MFG Crosswind Pedals | //FOX2 Switch Boxes | RECARO SPG Seat | AuraSound AST-2B-4 Pro Bass Transducer x2

//FOXTWO Multi-Role Combat Pit Build http://forums.eagle.ru/showthread.php?t=134745

Link to comment
Share on other sites

you mean between -1 and 1 ? ...looking at it again theres a . in value_up = 0.1 that should be a ,

 

values were -1,1 and 0,1

 

{down = 3001, value_down = -1[color=Red],[/color]1, up = 3001, value_up = 0.1, cockpit_device_id = 39, name = 'Landing Gear Up/Down FT', category = 'Landing gear panel'},

it was working, ill double check the error was in this somehow and not in game

 

 

I think you misread the information. You used this line yes?

 

elements["PNT-LNDGEAR"]                = {class = {class_type.TUMB,class_type.TUMB}, hint = _("Landing Gear Lever"), device = devices.CPT_MECH, action = {device_commands.Button_1,device_commands.Button_1}, arg = {716,716}, arg_value = {-1,1}, arg_lim = {{0,1},{0,1}},updatable = true, use_OBB = true}

Arg_value is direction and units. -1 and +1. Arg limit is what you need. off is 0 and on is 1 You can go from 0 +1 to 1 and from 1 -1 to 0. So the arguments are 1 and 0. Comma's are seperators in lua as I understand it. Periods are used for decimals.

 

Below is a line from the KA-50 lua clickable:

 

elements["PUI800-AUTO-PTR"]            = {class = {class_type.TUMB,class_type.TUMB}, hint = LOCALIZE("Manual/Auto weapon system control switch"),                               device = devices.WEAP_INTERFACE, action = {device_commands.Button_5,device_commands.Button_5}, stop_action = {}, arg = {403,403}, arg_value = {-direction*1.0,direction*1.0}, arg_lim = {{0.0, 1.0},{0.0, 1.0}}, use_OBB = true, updatable = true}

You can see the value is direction and units of 1.0 multiplier. if the limit would say: {{0.0, 2.0} instead of {{0.0, 1.0} then this would be a Three way switch instead of a two-way switch. Because the multiplier takes you from 0.0 to 1.0 to 2.0. But in above line the Limit says {{0.0, 1.0} so the states are just 0.0 and 1.0


Edited by kingpinda
Link to comment
Share on other sites

ok just checked it twice

 

this is the working line :pilotfly:

{down = 3001, value_down = -1,1, up = 3001, value_up = 0.1, cockpit_device_id = 39, name = 'Landing Gear Up/Down FT', category = 'Landing gear panel'},

 

 

this is a non working version :joystick:

{down = 3001, value_down = -1,1, up = 3001, value_up = 0,1, cockpit_device_id = 39, name = 'Landing Gear Up/Down FT', category = 'Landing gear panel'},

 

 

I don't know what to tell ya :music_whistling:

skunk160 | Win10 PRO 64bit | i7-4770K 3.50 GHz | 32GB DDR3/1866MHz | GIGABYTE GeForce GTX 1080 x2 | Oculus Rift S | Virpil MongoosT-50CM2 | Virpil F-14B grip | Virpil 200m Curved Extension | PointCTRL | Delta Sim TM Slew | Sim Bandit AHCP | MFG Crosswind Pedals | //FOX2 Switch Boxes | RECARO SPG Seat | AuraSound AST-2B-4 Pro Bass Transducer x2

//FOXTWO Multi-Role Combat Pit Build http://forums.eagle.ru/showthread.php?t=134745

Link to comment
Share on other sites

ok just checked it twice

 

this is the working line :pilotfly:

{down = 3001, value_down = -1,1, up = 3001, value_up = 0.1, cockpit_device_id = 39, name = 'Landing Gear Up/Down FT', category = 'Landing gear panel'},

 

 

this is a non working version :joystick:

{down = 3001, value_down = -1,1, up = 3001, value_up = 0,1, cockpit_device_id = 39, name = 'Landing Gear Up/Down FT', category = 'Landing gear panel'},

 

 

I don't know what to tell ya :music_whistling:

 

I think because the Arg_lim is {{0,1} it will read over the -1 because its not in the range.

 

Just to humour me try the following line instead so we can both get some sense out of this :)

 

{down = 3001, value_down = 1, up = 3001, value_up = 0, cockpit_device_id = 39, name = _('Landing Gear Up/Down FT'), category = _('Landing gear panel')},

 

Ive appended underscores to the name and categories and brackets because for some reason yours have dissapeared.


Edited by kingpinda
Link to comment
Share on other sites

yea that worked KP and makes more sense

skunk160 | Win10 PRO 64bit | i7-4770K 3.50 GHz | 32GB DDR3/1866MHz | GIGABYTE GeForce GTX 1080 x2 | Oculus Rift S | Virpil MongoosT-50CM2 | Virpil F-14B grip | Virpil 200m Curved Extension | PointCTRL | Delta Sim TM Slew | Sim Bandit AHCP | MFG Crosswind Pedals | //FOX2 Switch Boxes | RECARO SPG Seat | AuraSound AST-2B-4 Pro Bass Transducer x2

//FOXTWO Multi-Role Combat Pit Build http://forums.eagle.ru/showthread.php?t=134745

Link to comment
Share on other sites

Thanks for the heads up Dude :thumbup:

skunk160 | Win10 PRO 64bit | i7-4770K 3.50 GHz | 32GB DDR3/1866MHz | GIGABYTE GeForce GTX 1080 x2 | Oculus Rift S | Virpil MongoosT-50CM2 | Virpil F-14B grip | Virpil 200m Curved Extension | PointCTRL | Delta Sim TM Slew | Sim Bandit AHCP | MFG Crosswind Pedals | //FOX2 Switch Boxes | RECARO SPG Seat | AuraSound AST-2B-4 Pro Bass Transducer x2

//FOXTWO Multi-Role Combat Pit Build http://forums.eagle.ru/showthread.php?t=134745

Link to comment
Share on other sites

I've been round the houses editing creating .luas. So as much for my memory and maybe helping someone else out. And it appears I only needed to edit One.

 

I have one non-momentary switch actuated by a landing gear lever. Soz if this has already been explained in the thread and thanks to the OP for putting onto this. So its either on or off, but now on contact it send an up command on release it sends a down cmd.

 

My Landing Gear Panel entry in the default.lua. with my added line in orange.

 

--Landing gear panel

{down = iCommandPlaneGear, name = _('Landing Gear Up/Down'), category = _('Landing gear panel')},

{down = iCommandPlaneGearUp, name = _('Landing Gear Up'), category = _('Landing gear panel')},

{down = iCommandPlaneGearDown, name = _('Landing Gear Down'), category = _('Landing gear panel')},

{down = iCommandEmergencyGear, name = _('Auxiliary gear handle'), category = _('Landing gear panel')},

{down = iCommandEmergencyGearCover, name = _('Auxiliary gear handle lock button'), category = _('Landing gear panel')},

{down = iCommandPlaneGearDown,up = iCommandPlaneGearUp,name = _('Landing Gear Up/Down FT'), category = _('Landing gear panel')},

 

The .lua I edited with the additional line.

 

C:\Program Files\Eagle Dynamics\DCS World\MODS\aircraft\A-10C\Input\A-10C\joystick\default.lua

 

"many brain cells were lost getting this information" Mon Mothra

 

Thanks skunk160, worked perfectly.

 

Regards,

Milli

 

EDIT: Whoops, just seen your later posts. Have implemented the new workaround that you and Kingpinda came up with. Even better. Thanks both of you.


Edited by Milli
Link to comment
Share on other sites

  • 2 weeks later...

Hi guys,

 

I'm using POLARIS1's JSGME file in post48/page 5 of this thread for the TF-51 in order to map the mixture control functions of Idle Cut Off/Run/Emergency Full Rich to the LASTE 3 position switch on my Warthog throttle - Path/'Alt/Hdg'/Alt.

 

The mod allows me to switch between the 1st and 3rd positions, but not the middle one.

 

Reading through this post:

 

 

Ian;2440800']Step 1: Note the tooltip text of the switch you want, in this case "Weapon mode switch - Burst Length"

 

Step 2: Locate your aircraft's clickabledata.lua file and open it in a text editor (I use Notepad++). It is located in C:\Program Files\Eagle Dynamics\DCS World\Mods\aircraft\Ka-50\Cockpit\Scripts.

 

Step 3: Search for the tooltip text to find your switch, it will look something like this:

elements["SR-PTR"]= {class = {class_type.TUMB,class_type.TUMB}, hint = LOCALIZE("Weapon mode switch - Burst Length"),  device = devices.WEAP_INTERFACE, action = {device_commands.Button_4,device_commands.Button_4} , stop_action = {}, arg = {400,400}, arg_value = {-direction*0.1,direction*0.1}, arg_lim = {{0.0, 0.2},{0.0, 0.2}}, use_OBB = true, updatable = true}

Note "arg_lim" from 0.0 to 0.2, and "arg_value" has has a 0.1 multiplier. You don't have to understand every detail of what is going on here (I don't), but it is enough to guess that the values you want are 0.0, 0.1 and 0.2 (0.0 to 0.2 in 0.1 steps). Three-position buttons use 0.0, 0.1 and 0.2 -- except when they don't and it's -1, 0 and 1 instead:

elements["PTR_HUD-TMB-SETKA02"] = { class = {class_type.TUMB, class_type.TUMB}, hint = LOCALIZE("HUD Modes Reticle/Night/Day"), device = devices.HUD, action = {device_commands.Button_2, device_commands.Button_2}, arg = {9, 9}, arg_value = {-direction*1.0, direction*1.0}, arg_lim = {{-1,1}, {-1,1}} }

You get the idea.

 

So far, we have established that the values for the switch positions are 0.0, 0.1 and 0.2.

We also need a command number. In clickabledata.lua, those are usually written as "device_commands.Button_X", where "Button_X" means 3000+X. For our switch, we want command number 3004. We also need to know the device ID to send the command to. Note "device = devices.WEAP_INTERFACE". In your aircraft's "devices.lua" file, you can learn that WEAP_INTERFACE is device ID 12.

 

We have gathered the following information:

Device ID: 12

Command: 3004

Argument values: 0.0, 0.1, 0.2

 

Now we can write entries to add to the Ka-50's "default.lua" input config file (C:\Program Files\Eagle Dynamics\DCS World\Mods\aircraft\Ka-50\Input\ka-50\default.lua):

{down = 3004, value_down = 0.2, up = 3004, value_up = 0.1, cockpit_device_id = 12, name = " Weapon mode switch center/up", category = "Ins Weapons Status and Control Panel PUI-800"},
{down = 3004, value_down = 0.0, up = 3004, value_up = 0.1, cockpit_device_id = 12, name = " Weapon mode switch down/center", category = "Ins Weapons Status and Control Panel PUI-800"},

 

As suggested by Yurgon, I have prepended a space to the name to make the command show up at the top of the list.

 

The first entry is for the "up" direction of the Warthog Throttle's toggle switch (button 27): when it is pushed down (the switch is moved up), we send command 3004 with an argument of 0.2 to device 12. When it is released (switch back to center), we send command 3004 with an argument of 0.1 to device 12.

 

The second entry is for the "down" direction of the Warhog Throttle's toggle switch (button 28): when it is pushed down (the switch is moved down), we send command 3004 with an argument of 0.0 to device 12. When it is released (switch back to center), we send command 3004 with an argument of 0.1 to device 12.

 

After you have edited default.lua, save the file, restart DCS and assign your key bindings in the options.

 

This should work for any aircraft with a clickable cockpit. Note that sometimes, the "devices.lua" file can be tricky. For example, here's the start of the "devices.lua" file for the UH-1H:

local count = 0
local function counter()
count = count + 1
return count
end
-------DEVICE ID-------
devices = {}
-- moved forward for correct initialization of another devices
-- do not changed folowing sequence for sim
devices["ELEC_INTERFACE"]			= counter() -- 1
devices["FUELSYS_INTERFACE"]		= counter() -- 2
devices["ENGINE_INTERFACE"]			= counter() -- 3
devices["HYDRO_SYS_INTERFACE"]		= counter() -- 4
devices["ADI_PILOT"]				= counter() -- 6
devices["ADI_OPERATOR"]				= counter() -- 7
devices["NAVLIGHT_SYSTEM"]			= counter() -- 8
devices["SOUND_SYSTEM"] 			= counter() -- 9
devices["WEAPON_SYS"]				= counter() -- 10

Note that device IDs are not assigned directly. Instead, the file defines a function called "counter" that returns the next higher value whenever it is called, so the first device (ELEC_INTERFACE) gets 1, FUELSYS_INTERFACE gets 2, etc. Also note the helpful comments that have been provided. Can you spot the trap? (What is the device ID for SOUND_SYSTEM?)

 

 

The comments are wrong -- they skip device 5. The Lua interpreter does not care about comments. Device ADI_PILOT has ID 5, not 6. Device ADI_OPERATOR has ID 6, not 7, etc. The correct device ID for SOUND_SYSTEM is 8.

 

 

it almost makes sense to me save for the fact that I can't figure out why when clicking either 1st or 3rd position to 'off' doesn't seem to be sending the command to return to the middle position?

 

The mod lua script seems to be in line with (FSF)Ian's post above, here are the relevant lines:

 

--Custom Polaris

{down = device_commands.Button_7, up = device_commands.Button_7, cockpit_device_id = devices.FRONT_SWITCH_BOX, value_down = 1.0, value_up = 0.0, name = ' Alternate Gun safety switch GUN CAMERA SIGHT', category = 'Front Switch Box'},

{down = device_commands.Button_11, up = device_commands.Button_11, cockpit_device_id = devices.ENGINE_SYSTEM, value_down = 0.0, value_up = 0.1, name = 'Alternate Mixture IDLE CUT OFF', category = 'Flight Control'},

{down = device_commands.Button_11, up = device_commands.Button_11, cockpit_device_id = devices.ENGINE_SYSTEM, value_down = 0.2, value_up = 0.1, name = 'Alternate Mixture EMERGENCY FULL RICH', category = 'Flight Control'},

 

Anyone better at this than me see where the problem is??

 

Thanking you in anticipation!

 

RBG

-------------------------------------------------------------------------------------------------

Intel i5 / 16gb RAM / Nvidia GeForce 1080Ti / Viewsonic 28" monitor / TM Warthog / TM Elite rudder pedals / TrackIR5

 

First flight sim: Psion 'Flight Simulator' (ZX Spectrum 48k)

Link to comment
Share on other sites

Hi ratherbegliding

 

You made the changes in the wrong file. You have to use the information found in the devices lua and clickable lua and then add lines in the default lua or a copy thereof in the /input/joystick map.

 

Hmm I might have jumped to this conclusion too soon. Why aren't you using Down = 3007 or 3011 and cockpit_device= 11?

 

I have fiddled a bit with this. it was a bit confusing because there is mention of Command 11 and command 19 which seems conflicting.

 

I have some working Lua for you: !

 

{down = device_commands.Button_11, cockpit_device_id  = devices.ENGINE_SYSTEM, value_down = 0.0, name = _('Mixture IDLE CUT OFF'), category = _('Flight Control')},
{down = device_commands.Button_11, value_down = 0.0, up = device_commands.Button_11, value_up = 0.1, cockpit_device_id = devices.ENGINE_SYSTEM, name = _(' Idle/run'), category = _('Flight Control')},
{down = device_commands.Button_11, value_down = 0.2, up = device_commands.Button_11, value_up = 0.1, cockpit_device_id = devices.ENGINE_SYSTEM, name = _(' Emergency rich/run'), category = _('Flight Control')},
{down = device_commands.Button_11, cockpit_device_id  = devices.ENGINE_SYSTEM, value_down = 0.1, name = _('Mixture RUN'), category = _('Flight Control')},
{down = device_commands.Button_11, cockpit_device_id  = devices.ENGINE_SYSTEM, value_down = 0.2, name = _('Mixture EMERGENCY FULL RICH'), category = _('Flight Control')},
{down = device_commands.Button_20, cockpit_device_id  = devices.ENGINE_SYSTEM, value_down = 1.0, name = _('Mixture control (rotary)'), category = _('Flight Control')},

I added the second and third line to the existing default lua in the joystick map. Enjoy :)

 

edit: your code is actually not that different from mine. But you forgot some ()'s and _'s. Also I have done it in a different order. These may all matter or may not. I just started editing LUA 2 months ago so don't take my word for it. BUT I tested my lua in game and its working perfectly.


Edited by kingpinda
Link to comment
Share on other sites

Hi kingpinda!

 

Thanks for the reply.

 

I have no idea why there were no ()'s or _'s - that was the format in the original mod file.

 

I decided to dump this.

 

So I had a look in the original joystick default.lua file and saw the section you modified.

 

So I then just took a copy of the original default.lua, inserted your two new lines and saved the file.

 

But still no joy........

 

Other than inserting your two new lines, is there anything else I should be doing?

 

I'm using JSGME to apply the mod.

 

Alternatively, please could you post your modified lua file and I'll just swap the whole thing?

 

Forgive me, this is my first ever attempt at playing with lua script.

 

Thanks for your help

 

:smilewink:

 

RBG

-------------------------------------------------------------------------------------------------

Intel i5 / 16gb RAM / Nvidia GeForce 1080Ti / Viewsonic 28" monitor / TM Warthog / TM Elite rudder pedals / TrackIR5

 

First flight sim: Psion 'Flight Simulator' (ZX Spectrum 48k)

Link to comment
Share on other sites

Now thats weird.. also that your lua doesnt have the underscores and brackets... do you have both the trainer and the combat P-51D? sure you used it in the right map?

 

Also if you use my code do you have 2 new function binds at the very top? I put a _space_ in front of the name so it shows on top. A tip from some other cool guys.

 

You then would have to center the laste switch and double click on the new emergency/run and set the switch to UP to bind.

 

recenter switch and double click the new idle/run bind and push the switch DOWN.

 

I'll post my entire default lua in a second.

 

default.lua

 

Be sure this goes into: DCS World\Mods\aircraft\TF-51D\Input\TF-51D\joystick

 

if you want to use this with the free TF-51D trainer.

 

One further IMPORTANT NOTE: always Use Notepad++ (free download) for editting !!! or something similair. Regular Notepad will screw things up beyond believe!


Edited by kingpinda
Link to comment
Share on other sites

Success!!!

 

Sorry, I hadn't noticed the 2 new functions - :doh: Doh!

 

Yea, I use Notepad++ too.

 

I can now continue to enjoy the Mustang :D

 

Thank you so much for your help.

 

Happy flying!

 

:thumbup:

RBG

-------------------------------------------------------------------------------------------------

Intel i5 / 16gb RAM / Nvidia GeForce 1080Ti / Viewsonic 28" monitor / TM Warthog / TM Elite rudder pedals / TrackIR5

 

First flight sim: Psion 'Flight Simulator' (ZX Spectrum 48k)

Link to comment
Share on other sites

  • 3 months later...

Hi guys, I am trying to map the HAWK AIRBRAKE to my TM Warthog throttle. What is the easiest way for a guy to get it to work correctly?

I want to pull back on it to deploy it then when I push forward it will stow. I cant believe that the programmer did not address this but I'm not a programmer, I am a pilot!

Thanks,

W

i9-9900K 3.6(Running at 5.0 GHZ) 32GB Memory

2x M.2 drives

Win 10 64bit

RTX 2080 Ti FTW3 Ultra

OCULUS RIFT CV1

VKB Gunfighter 2 extended/TM Pedals/TM Warthog throttles.

Link to comment
Share on other sites

hi guys, i tried many things without succes ...

here is my setup :

last version of DCS world (1.5 and 2.0)

GPwiz40

Toggle switch plugged to my GPWiz40

 

what is the method to use ToggleSwitch (ON/OFF) to toggle some command like AC power ON/OFF?

 

before 1.28 it was into the GPWiz40 lua:

{combos = ["key"] = "JOY_BTN16", down = iCommandPowerGeneratorRight, up = iCommandPowerGeneratorRight, name = "AC generator power right", category = "Electrical power control panel"},

 

but now, it doesn't work anymore.....

 

is someone can help ?

thanks

Link to comment
Share on other sites

The DSD 32 and 64 button controllers have settings which can be user-programmed that allow for the use of on/off toggles. What happens when a particular input pin is designated as an on/off toggle is that a pulse indicating a button press is sent when the switch is set to the on position and then again when it is set to the off position.

 

(these controllers also will can be configured for use with rotary switches (BBM or MBB may be used, with BBM preferred) as well as rotary encoders like the CTS 288 Series in addition for use with on/off toggles).

 

For example: You connect a standard on/off toggle to Button Pin 1. You use the DSD Circuit Configuration Utility to indicate an on/off toggle is connected. The switch is set to ON and your game of choice, DCS in this case, is sent the button press. When it's switched off the Button 1 is sent again. Setting a function to a single button such as "Landing Gear Toggle" will work with this configuration.

 

Note carefully that although the switch is closed, the controller itself does not sent a continuous pressed button state. A button press pulse is sent when it's closed and then again when it's opened. You can even be "tricky" and use a momentary button and tell the controller it's an on/off toggle if you wanted to use that particular component for a 'Press-and-Hold' function like a speed brake. Also note carefully that you must reset all of your toggles prior to entering your flying session to ensure that the logic states of the toggles are not reversed; think on when you want them off.


Edited by DerekSpeare

Derek "BoxxMann" Speare

derekspearedesigns.com 25,000+ Gaming Enthusiasts Trust DSD Components to Perform!

i7-11700k 4.9g | RTX3080ti (finally!)| 64gb Ram | 2TB NVME PCIE4| Reverb G1 | CH Pro Throt/Fighterstick Pro | 4 DSD Boxes

Falcon XT/AT/3.0/4.0 | LB2 | DCS | LOMAC

Been Flight Simming Since 1988!

Useful VR settings and tips for DCS HERE

Link to comment
Share on other sites

I'm trying to get my switches working. I read through this entire thread and it works if I assign my switch (connected to GP-WIZ40).

 

For example, if I change the Master Arm and Train in the game's Setup, Controls, Armament Hud Control Panel, click on the Master switch ARM in the GPWIZ column and toggle it, (same for TRAIN) I get the following DIFF lua file in the saved games directory (..dcs\config\input\a-10C\joystick\

 

local diff = {

["keyDiffs"] = {

["d1374pnilunilcdnilvdnilvpnilvunil"] = {

["added"] = {

[1] = {

["key"] = "JOY_BTN11",

},

},

["name"] = "Master switch ARM",

},

["d1376pnilunilcdnilvdnilvpnilvunil"] = {

["added"] = {

[1] = {

["key"] = "JOY_BTN12",

},

},

["name"] = "Master switch TRAIN",

},

},

}

return diff

 

 

Now the above works like a charm. However, it never transitions to SAFE position. I'm using SP DT switch. So like others, I tried changing the line

 

"d1374pnilunilcdnilvdnilvpnilvunil" to

 

"d1374pnilu1375cdnilvdnilvpnilvunil"

 

But as soon as I change the file (in UltraEdit), the assignment disappears in the controls. I also tried changing the "vunil" to "vu0" and "vu1" to no avail. I can sacrifice the SAFE position, but I'd like to try and get it to work. And I like the idea of modifying the saved games diff.lua files since I'm thinking future versions of DCS may change the syntax of the DCS WORLD\MODS\AIRCRAFT\A-10C\INPUT\A-10C\joystick files.

 

Oh, and I noticed others reference the "AIRCRAFTS" folder in the examples. But I don't have any files there. the DEFAULT.LUA (and Warthog.LUAs) are in my "aircraft" folder.

 

thank you

hsb

HW Spec in Spoiler

---

 

i7-10700K Direct-To-Die/OC'ed to 5.1GHz, MSI Z490 MB, 32GB DDR4 3200MHz, EVGA 2080 Ti FTW3, NVMe+SSD, Win 10 x64 Pro, MFG, Warthog, TM MFDs, Komodo Huey set, Rverbe G1

 

Link to comment
Share on other sites

Just two small observations.

 

And I like the idea of modifying the saved games diff.lua files since I'm thinking future versions of DCS may change the syntax of the DCS WORLD\MODS\AIRCRAFT\A-10C\INPUT\A-10C\joystick files.

 

Personally, I do modify the original input files inside the installation directory and have created a small JSGME mod out of it. I keep all my modifications in a block near the top of the files.

 

With 1.5 and 2.0, I simply copy & pasted my modifications from 1.2 over to the 1.5 and 2.0 input files in order to make sure I don't overwrite them, in case something changed. Worked like a charm and took something like 20 minutes or so. :thumbup:

 

Oh, and I noticed others reference the "AIRCRAFTS" folder in the examples. But I don't have any files there. the DEFAULT.LUA (and Warthog.LUAs) are in my "aircraft" folder.

 

The name of that folder was changed, I think still during the 1.2 days, from "aircrafts" to "aircraft". In my installations, I think the old folder is completely gone by now. But of course you'll find lots of references to the "aircrafts" folder in older posts. Just change it to "aircraft" when you apply anything from those posts and you'll be good. :thumbup:

Link to comment
Share on other sites

Thanks Yurgon. I was wondering about the "s" :) Hopefully, someone can clue me into my switch issue.

hsb

HW Spec in Spoiler

---

 

i7-10700K Direct-To-Die/OC'ed to 5.1GHz, MSI Z490 MB, 32GB DDR4 3200MHz, EVGA 2080 Ti FTW3, NVMe+SSD, Win 10 x64 Pro, MFG, Warthog, TM MFDs, Komodo Huey set, Rverbe G1

 

Link to comment
Share on other sites

  • 4 weeks later...

Looks interesting. Just wonder, isn't it possible to use also the included device driver software to setup things like that? For thrustmaster the software is TARGET if I remember well.

I don't have a thrustmaster, so I don't know, but I own a saitek TPM with nine switches that behave like that, and with the saitek software you can emulate a key when the switch is down (button pressed) and another key when the switch is up (button released).

Of course, that will require that the keyboard is well setup in DCS, and that the device is setup in its own software, and not DCS.

 

(Have not read the 18 pages, so sorry if this has been discussed before)

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

Looks interesting. Just wonder, isn't it possible to use also the included device driver software to setup things like that? For thrustmaster the software is TARGET if I remember well.

 

Yeah, sure, that's possible. This whole thread is about changing the DCS input files in a way to achieve the same thing without TARGET or something of the kind, though. :smartass:

 

One reason against TARGET is that you'd need to switch profiles if you want to switch aircraft, so if you plan on flying different modules, you'd always have to quit or at least Alt-Tab out of DCS, switch the profile, and get back into DCS.

 

Setting everything up within DCS doesn't need any profiles, or external software like TARGET, and I prefer this method. :thumbup:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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