bkthunder Posted July 31, 2016 Posted July 31, 2016 For us poor warthog users, please do like RAZBAM and add the 2 and 3 pos switches abstractions to the default key mappings for all modules, so we can avoid using TARGET, which is pretty much the most cumbersome and un-intuitive thing I have ever seen, and configure everything from inside DCS. Thanks 1 Windows 10 - Intel i7 7700K 4.2 Ghz (no OC) - Asus Strix GTX 1080 8Gb - 16GB DDR4 (3000 MHz) - SSD 500GB + WD Black FZEX 1TB 6Gb/s
Wrecking Crew Posted July 31, 2016 Posted July 31, 2016 +100 Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Fri13 Posted July 31, 2016 Posted July 31, 2016 For us poor warthog users, please do like RAZBAM and add the 2 and 3 pos switches abstractions to the default key mappings for all modules, so we can avoid using TARGET, which is pretty much the most cumbersome and un-intuitive thing I have ever seen, and configure everything from inside DCS. Thanks Do you mean that you want that each function that has two or more positions, would have each option individually possible to be binded, as the normal On/Off binds? i7-8700k, 32GB 2666Mhz DDR4, 2x 2080S SLI 8GB, Oculus Rift S. i7-8700k, 16GB 2666Mhz DDR4, 1080Ti 11GB, 27" 4K, 65" HDR 4K.
Deezle Posted July 31, 2016 Posted July 31, 2016 You can also make the binds yourself by editing the default.luas. I've modded pretty much every module for use with my setups. Intel 9600K@4.7GHz, Asus Z390, 64GB DDR4, EVGA RTX 3070, Custom Water Cooling, 970 EVO 1TB NVMe 34" UltraWide 3440x1440 Curved Monitor, 21" Touch Screen MFD monitor, TIR5 My Pit Build, Moza AB9 FFB w/WH Grip, TMWH Throttle, MFG Crosswinds W/Combat Pedals/Damper, Custom A-10C panels, Custom Helo Collective, SimShaker with Transducer
QuiGon Posted July 31, 2016 Posted July 31, 2016 +1 Is RAZBAMs solution a different one as the one for the A-10C? Intel i7-12700K @ 8x5GHz+4x3.8GHz + 32 GB DDR5 RAM + Nvidia Geforce RTX 2080 (8 GB VRAM) + M.2 SSD + Windows 10 64Bit DCS Panavia Tornado (IDS) really needs to be a thing!
sobek Posted August 1, 2016 Posted August 1, 2016 That and add a way to use the cutoff detent (in both directions) in planes other than the A-10C. Good, fast, cheap. Choose any two. Come let's eat grandpa! Use punctuation, save lives!
Mud Posted August 1, 2016 Posted August 1, 2016 +1 Spoiler W10-x64 | B650E Gigabyte Aorus Master | AMD Ryzen 7 7800X3D | Noctua NH-D15 G.Skill Trident ZS Neo DDR5-6000 64Gb | MSI RTX 3080ti Gaming X Asus Xonar AE | VPforce Rhino + TM Hotas Warthog MFG Crosswind pedals | Valve Index
firmek Posted August 1, 2016 Posted August 1, 2016 You can also make the binds yourself by editing the default.luas. I've modded pretty much every module for use with my setups. +1 and +1 for the key baindings. There is no need to use the TARGET. I've ended up editing the lua files and creating abstractions for 3 and 2 way switches myself. Still it's quite a pity that after so many years it's only A10-C is the only module that works with TM Warthog out of the box. F/A-18, F-16, F-14, M-2000C, A-10C, AV-8B, AJS-37 Viggen, F-5E-3, F-86F, MiG-21bis, MiG-15bis, L-39 Albatros, C-101 Aviojet, P-51D, Spitfire LF Mk. IX, Bf 109 4-K, UH-1H, Mi-8, Ka-50, NTTR, Normandy, Persian Gulf... and not enough time to fully enjoy it all
bkthunder Posted August 1, 2016 Author Posted August 1, 2016 Do you mean that you want that each function that has two or more positions, would have each option individually possible to be binded, as the normal On/Off binds? No. In the HOTAS Warthog there are many switches that are 2 or 3 positions, but actually they work like this: E.g. the APU switch has an ON position which give out a DX button press, and the physical OFF position doesn't correspond to any DX button press. So basically it's a toggle button. What the DCS A-10 and Razbam do is something like "if button is ON > then do this action; ELSE, do this other action;" I'm no programmer so surely I didn't write it properly, but you get the idea. Windows 10 - Intel i7 7700K 4.2 Ghz (no OC) - Asus Strix GTX 1080 8Gb - 16GB DDR4 (3000 MHz) - SSD 500GB + WD Black FZEX 1TB 6Gb/s
Fri13 Posted August 1, 2016 Posted August 1, 2016 No. In the HOTAS Warthog there are many switches that are 2 or 3 positions, but actually they work like this: E.g. the APU switch has an ON position which give out a DX button press, and the physical OFF position doesn't correspond to any DX button press. So basically it's a toggle button. What the DCS A-10 and Razbam do is something like "if button is ON > then do this action; ELSE, do this other action;" I'm no programmer so surely I didn't write it properly, but you get the idea. Isn't that then as key press in keyboard? Up = Off, Press = On? So the functions should be like Press/Hold for it? i7-8700k, 32GB 2666Mhz DDR4, 2x 2080S SLI 8GB, Oculus Rift S. i7-8700k, 16GB 2666Mhz DDR4, 1080Ti 11GB, 27" 4K, 65" HDR 4K.
sobek Posted August 1, 2016 Posted August 1, 2016 +1 and +1 for the key baindings. There is no need to use the TARGET. I've ended up editing the lua files and creating abstractions for 3 and 2 way switches myself. Still it's quite a pity that after so many years it's only A10-C is the only module that works with TM Warthog out of the box. Would you mind describing your process? In the diff file, you have to write everything from scratch instead of editing a line. Good, fast, cheap. Choose any two. Come let's eat grandpa! Use punctuation, save lives!
mhe Posted August 1, 2016 Posted August 1, 2016 +100 | i9 12900K | 64GB DDR5-6000 | STRIX RTX 4090 OC | LG 38GN950 38" | | Hanns-G HT225HPB | TIR 5 & Varjo Aero | Virpil Throttle & Stick | TM TPRs | You don't stop playing because you grow old, you grow old because you stop playing.
firmek Posted August 1, 2016 Posted August 1, 2016 (edited) Adding the keys is quite easy, there is a thread about it but I've figured it out based on M2000C examples. The first step is to locate the input lua files, which are generally in Mods\aircraft\@module_name\Input\@version\joystick folder. The @version corresponds to the sim or arcade key setup - for example Mi-8MTV2 and Mi-8MTV2_easy. Just ignore the second one. Using Mig-21 for further examples, edit the "Mods\aircraft\MIG-21bis\Input\MiG-21\joystick\default.lua". Just in case make a copy of the file but it's not really needed as DCS has a great repair and update. Next find in the file lines corresponding to the commands you're interested in. Let's take flaps as an example: {down=device_commands.Flaps0,cockpit_device_id=devices.FLAPS,value_down=1.0,name='Flaps 0',category='Flight Controls'}, {down=device_commands.Flaps25,cockpit_device_id=devices.FLAPS,value_down=1.0,name='Flaps 25',category='Flight Controls'}, {down=device_commands.Flaps45,cockpit_device_id=devices.FLAPS,value_down=1.0,name='Flaps 45',category='Flight Controls'}, The command an be searched using their "name" value as it is the same as the binding description in controls setup screen in DCS. Now we need to make 2 commands that can be associated with warthog flaps switch. This is due to the fact that warthog flaps switch registers only in up and down position while the medium does not. So what we want is: - flaps up = flaps fully retracted else flaps in medium position - flaps down = flaps fully extended else flaps in medium position Copy paste the 3 lines from above. The modified results is: {down=device_commands.Flaps0,cockpit_device_id=devices.FLAPS,[u][b]up=device_commands.Flaps25[/b][/u],value_down=1.0,[u][b]value_up=1.0[/b][/u],name='3-way Flaps Up',category='HOTAS abstraction'}, [color=Gray]-- line deleted: {down=device_commands.Flaps25,cockpit_device_id=devices.FLAPS,value_down=1.0,name='Flaps 25',category='Flight Controls'},[/color] {down=device_commands.Flaps45,cockpit_device_id=devices.FLAPS,[u][b]up=device_commands.Flaps25[/b][/u],value_down=1.0,[u][b]value_up=1.0[/b][/u],name='3-way Flaps Down',category='HOTAS abstraction'}, The main changes are highlighted. Those are adding the action to be executed when the key is depressed (down is when switch is enabled, up when the switch is disengaged from the position). Other than that the name was changed as also the category to group the commands under the same place in in-game controller settings screen. Mig-21 (default.lua) --Alternate Airbrakes AIRBREAKES {down=device_commands.Airbrakes,up=device_commands.Airbrakes,cockpit_device_id=devices.AIRBRAKE,value_down=1.0,value_up=0.0,name='2-way Airbrakes On',category='HOTAS abstraction'}, --Alternate Flaps FLAPS {down=device_commands.Flaps0,cockpit_device_id=devices.FLAPS,up=device_commands.Flaps25,value_down=1.0,value_up=1.0,name='3-way Flaps Up',category='HOTAS abstraction'}, {down=device_commands.Flaps45,cockpit_device_id=devices.FLAPS,up=device_commands.Flaps25,value_down=1.0,value_up=1.0,name='3-way Flaps Down',category='HOTAS abstraction'}, --Alternate Afterburner OVERRIDE L/R {down=device_commands.Chr_2pos,up=device_commands.Chr_2pos,cockpit_device_id=devices.ENGINE,value_down=1.0,value_up=0.0,name='2-way Afterburner-Emergency',category='HOTAS abstraction'}, {down=device_commands.ForsMax,up=device_commands.ForsMax,cockpit_device_id=devices.ENGINE,value_down=1.0,value_up=0.0,name='2-way Afterburner-Maximum',category='HOTAS abstraction'}, --Alternate Air Start ENG OPER {down=device_commands.SurgeDoors_2pos,up=device_commands.SurgeDoors_2pos,cockpit_device_id=devices.ENGINE,value_down=1.0,value_up=0.0,name='2-way Anti surge doors',category='HOTAS abstraction'}, --Alternate APU APU {down=device_commands.AirStart_2pos,up=device_commands.AirStart_2pos,cockpit_device_id=devices.ENGINE_START_DEVICE,value_down=1.0,value_up=0.0,name='2-way Engine Emergency Air Start',category='HOTAS abstraction'}, {down=device_commands.Zazig,up=device_commands.Zazig,cockpit_device_id=devices.ENGINE_START_DEVICE,value_down=1.0,value_up=0.0,name='2-way APU On',category='HOTAS abstraction'}, --Alternate Weapon Mode BOAT {down=device_commands.ASPvozduhZemlja,up=device_commands.ASPvozduhZemlja,cockpit_device_id=devices.WEAPON_CONTROL,value_down=1.0,value_up=0.0,name='2-way Master Mode - Air',category='HOTAS abstraction'}, {down=device_commands.ASPssNeutrRns,up=device_commands.ASPssNeutrRns,cockpit_device_id=devices.WEAPON_CONTROL,value_down=1.0,value_up=0.5,name='3-way Weapon AA Mode - IR Missile',category='HOTAS abstraction'}, {down=device_commands.ASPssNeutrRns,up=device_commands.ASPssNeutrRns,cockpit_device_id=devices.WEAPON_CONTROL,value_down=0.0,value_up=0.5,name='3-way Weapon AA Mode - SAR Missile',category='HOTAS abstraction'}, {down=device_commands.ASPssNeutrRns,up=device_commands.ASPssNeutrRns,cockpit_device_id=devices.WEAPON_CONTROL,value_down=1.0,value_up=0.0,name='3-way Weapon AA Mode - IR Missile 2 Position Only',category='HOTAS abstraction'}, --Alternate Radar {down=device_commands.RADARon,up=device_commands.RADARon,cockpit_device_id=devices.RADAR,value_down=1.0,value_up=0.5,name='3-way Radar On',category='HOTAS abstraction'}, {down=device_commands.RADARon,up=device_commands.RADARon,cockpit_device_id=devices.RADAR,value_down=0.0,value_up=0.5,name='3-way Radar Off',category='HOTAS abstraction'}, {down=device_commands.RADARlowAlt,up=device_commands.RADARlowAlt,cockpit_device_id=devices.RADAR,value_down=1,value_up=0.5,name='3-way Low Altitude Antenna Tilt',category='HOTAS abstraction'}, {down=device_commands.RADARlowAlt,up=device_commands.RADARlowAlt,cockpit_device_id=devices.RADAR,value_down=0.5,value_up=0.0,name='3-way Low Altitude Filter',category='HOTAS abstraction'}, {down=device_commands.RADARfixBeam,up=device_commands.RADARfixBeam,cockpit_device_id=devices.RADAR,value_down=1.0,value_up=0.0,name='2-way Locked Beam On',category='HOTAS abstraction'}, Note that there are some synchronization issues when spawning in Mig-21 cockpit. Some switches (APU, afterburner enable) need to be re-cliked in the pit to be put in the same position as on the TM throttle. For Mi-8 (Joystick - HOTAS Warthog.lua) ------------------------------------------------ -- 3 key abstractions -------------------------- ------------------------------------------------ {down = device_commands.Button_12, up=device_commands.Button_12, cockpit_device_id = devices.NAVLIGHT_SYSTEM, value_down = -1, value_up=0, name = _('Lights - Nav. Lights Switch - DIM else OFF'), category = _('HOTAS abstraction')}, {down = device_commands.Button_12, up=device_commands.Button_12, cockpit_device_id = devices.NAVLIGHT_SYSTEM, value_down = 1, value_up=0, name = _('Lights - Nav. Lights Switch - BRIGHT else OFF'), category = _('HOTAS abstraction')}, {down = device_commands.Button_13, up=device_commands.Button_13, cockpit_device_id = devices.NAVLIGHT_SYSTEM, value_down = -1, value_up=0, name = _('Lights - Formation Lights Switch - DIM else OFF'), category = _('HOTAS abstraction')}, {down = device_commands.Button_13, up=device_commands.Button_13, cockpit_device_id = devices.NAVLIGHT_SYSTEM, value_down = 1, value_up=0, name = _('Lights - Formation Lights Switch - BRIGHT else OFF'), category = _('HOTAS abstraction')}, {down = device_commands.Button_14, up=device_commands.Button_14, cockpit_device_id = devices.NAVLIGHT_SYSTEM, value_down = 1, value_up=0, name = _('Lights - Tip Lights Switch - ON else OFF'), category = _('HOTAS abstraction')}, {down = device_commands.Button_15, up=device_commands.Button_15, cockpit_device_id = devices.NAVLIGHT_SYSTEM, value_down = 1, value_up=0, name = _('Lights - Strobe Lights Switch - ON else OFF'), category = _('HOTAS abstraction')}, {down = device_commands.Button_22, up=device_commands.Button_22, cockpit_device_id = devices.WEAPON_SYS, value_down = -1, value_up=0, name = _('Arm. Panel - Mode UPK/PKT/RS Switch - RS else PKT'), category = _('HOTAS abstraction')}, {down = device_commands.Button_22, up=device_commands.Button_22, cockpit_device_id = devices.WEAPON_SYS, value_down = 1, value_up=0, name = _('Arm. Panel - Mode UPK/PKT/RS Switch - UPK else PKT'), category = _('HOTAS abstraction')}, Su-27. This one was more tricky to do as it's a FC3 aircraft. The commands itself are simpler and don't have the cokpit_device_id value as the cockpit is not clickable. (Mods\aircraft\Flaming Cliffs\Input\su-27\joystick) ------------------------------------------------ -- 3 key abstractions -------------------------- ------------------------------------------------ {down = iCommandPlaneStabTangBank, up=iCommandPlaneStabCancel, name = _('Autopilot - Attitude Hold else Off'), category = _('HOTAS Abstraction')}, {down = iCommandPlaneStabHorizon, up=iCommandPlaneStabCancel, name = _('Autopilot - Transition To Level Flight Control else Off'), category = _('HOTAS Abstraction')}, {down = iCommandPlaneFlapsOff, up=iCommandPlaneFlaps, name = _('Flaps - Up else Down'), category = _('HOTAS Abstraction')}, {down = iCommandPlaneFlapsOn, up=iCommandPlaneFlaps, name = _('Flaps - Landing Position else Down'), category = _('HOTAS Abstraction')}, {down = iCommandPlaneRadarOnOff, up=iCommandPlaneRadarOnOff, name = _('Sensors - Radar On else Off'), category = _('HOTAS Abstraction')}, {down = iCommandPlaneEOSOnOff, up=iCommandPlaneEOSOnOff, name = _('Sensors - EOS On else Off'), category = _('HOTAS Abstraction')}, {down = iCommandPlaneAirBrakeOn, up=iCommandPlaneAirBrakeOff, name = _('Systems - Airbrake On else Off'), category = _('HOTAS Abstraction')}, {down = iCommandPlaneLightsOnOff, up=iCommandPlaneLightsOnOff, name = _('Systems - Navigation lights On else Off'), category = _('HOTAS Abstraction')}, Edited August 1, 2016 by firmek 1 F/A-18, F-16, F-14, M-2000C, A-10C, AV-8B, AJS-37 Viggen, F-5E-3, F-86F, MiG-21bis, MiG-15bis, L-39 Albatros, C-101 Aviojet, P-51D, Spitfire LF Mk. IX, Bf 109 4-K, UH-1H, Mi-8, Ka-50, NTTR, Normandy, Persian Gulf... and not enough time to fully enjoy it all
Wrecking Crew Posted August 2, 2016 Posted August 2, 2016 That is not 'quite easy' IMHO. :) Editing LUA files after every update is not convenient, either. Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
firmek Posted August 2, 2016 Posted August 2, 2016 (edited) That is not 'quite easy' IMHO. :) Editing LUA files after every update is not convenient, either. It's just enough to copy paste the files from the backup folder after the update. The problem is however that this may potentially override any updates made by the developer so this is why a quick compare should be run. Fortunately those files are quite stable and don't change almost at all. Still it's much better IMO than to use the TARGET. Anyway as the thread started TM warthog should be supported by the modules. Maybe actually it's not correct to say this way, more correct is that the 3 and 2 way switches in cockpit should have their abstractions in key bindings. This was done for M2000C but I'm not sure if for all of the switches. Edited August 2, 2016 by firmek F/A-18, F-16, F-14, M-2000C, A-10C, AV-8B, AJS-37 Viggen, F-5E-3, F-86F, MiG-21bis, MiG-15bis, L-39 Albatros, C-101 Aviojet, P-51D, Spitfire LF Mk. IX, Bf 109 4-K, UH-1H, Mi-8, Ka-50, NTTR, Normandy, Persian Gulf... and not enough time to fully enjoy it all
sobek Posted August 2, 2016 Posted August 2, 2016 Would be interesting to know if the .diff files can handle conditional commands. c0ff? :) Good, fast, cheap. Choose any two. Come let's eat grandpa! Use punctuation, save lives!
Captain Orso Posted August 2, 2016 Posted August 2, 2016 That is not 'quite easy' IMHO. :) Editing LUA files after every update is not convenient, either. Use JSGME to implement your edited default.lua file. Before each update, pull back all your mods in JSGME, and after the update, create a new snapshot of the DCS installation, and then re-implement your mods. That's what I do at ever update. It only takes a couple of minutes to create a new snapshot and a minute or two to re-implement your mods, depending on how many you have and how long it takes you to pick the ones you want to implement. Naming your mod folders using a logical structure can go a long way in organizing JSGME and making working with it much quicker and easier. Examples: Map mods all start with Map, eg: "Map ..." Skin mods all start with Skin and the aircraft, eg: "Skin P-51D ..." General DCS mods, like the default.lua for the P-51D, start with DCS, eg: "DCS default ..." Once you have it implemented and organized, it makes everything much, much easier :) When you hit the wrong button on take-off System Specs. Spoiler System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27" CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
bkthunder Posted August 2, 2016 Author Posted August 2, 2016 Still it's much better IMO than to use the TARGET. Anyway as the thread started TM warthog should be supported by the modules. Maybe actually it's not correct to say this way, more correct is that the 3 and 2 way switches in cockpit should have their abstractions in key bindings. This was done for M2000C but I'm not sure if for all of the switches. +1 3rd parties and ED should support these controllers as a standard. Ed in particular, since they did so for the A-10C, I don't see why they would drop it for their subsequent modules. Windows 10 - Intel i7 7700K 4.2 Ghz (no OC) - Asus Strix GTX 1080 8Gb - 16GB DDR4 (3000 MHz) - SSD 500GB + WD Black FZEX 1TB 6Gb/s
sobek Posted August 2, 2016 Posted August 2, 2016 All this JSGME talk is sidetracking the way it's meant to be used. Thou shalt not directly edit the control assignment lua files. That's what the lua.diff files are for. The question is, can the .diff system handle all eventualities or does it need to be expanded. Good, fast, cheap. Choose any two. Come let's eat grandpa! Use punctuation, save lives!
Tucano_uy Posted August 2, 2016 Posted August 2, 2016 That is not 'quite easy' IMHO. :) Editing LUA files after every update is not convenient, either. +1 And besides, it has to be done for each and everyone of us Warthog users. If it's done at dev level, is done once, distributed and updated only when required.
DeJohn Posted August 2, 2016 Posted August 2, 2016 Not to ruffle some peoples feathers, however from reading the posts it is evident that some are not understanding the file structure, so if I may throw my two cents in I'll try to make it a little more clear. First let me say there is nothing wrong with editing a lua file. In fact, ease of editing is the reason the lua file structure was created in the first place. (as long as you follow certain guidelines). Its actually easier then some may think. NOTE!! DO NOT use Notepad that comes with Windows, it may corrupt the file. Use NOTEPAD++, its free and has may uses when it comes to editing. In the joystick input folder of any module you will find several files, some the names of joysticks and one called "default". Some other files found in the config folder of your saved Games folder called "(NAME).diff.lua" where as name is the name of your joystick or interface card. First the "default" file... This file is simular to the other joystick files, only withour most of the buttons assigned. Its purpose is to program the inputs of any joysticks not named in the folder. (since there are many more joysticks on the market then are listed). As you know the avg joystick button works simularly to how a keyboard works, in that they are momentary switches known as push buttons. Next the 'diff' file... This file is created for you when you program a joystick not listed, or if you change the button assignment of one that is listed using the ingame button assignment option. Where does the 'diff' file get its informaton, from the 'default.lua' file, or one of the joystick files if you are using one of those. This is where assigning buttons and switches becomes a problem for some. Especially if they are using a joystick that has (besides push buttons), toggle switches or using one of the USB interface cards on the market. Now I believe the dev's changed the format to what is now the 'diff' file, in the hopes of making the alterations to this file easier. Unfortunately, it doesn't work that way. Below is a sample of a diff file created after assigning a switch the normal in game way... local diff = { ["keyDiffs"] = { ["d3003pnilunilcd2vd0vpnilvunil"] = { ["added"] = { [1] = { ["key"] = "JOY_BTN23", }, }, ["name"] = "Main Fuel Switch", }, }, } return diff As a note...keep in mind that in DCS the use of 'down' refers to a switch being in the ON position, and 'up' refers to it being OFF. We can see that in this line "["d3003pnilunilcd2vd0vpnilvunil"]" is the command for the function. It breaks down as such.. d3003 = when button is 'down' change the value of button function '3003'. pnil = if button is 'pressed' change the value of the afore mentioned function, which is 'nil' or 'No value' basically when nil is use the program ignores this part.. unil = when the button is released change the value of the funtion. cd2 = means (I believe it dose, if wrong someone please correct me) 'command menu item' vd0 = 'value down' is the value we want the function to be set to.. in this case 0 (zero). vpnil = the 'value pressed' which is 'nil' so ignored vunil - 'value up' is the value we want the function to be set to, but since its 'nil' its ignored. Now if we would like to give switch a value for the 'up' (OFF) position, we would just have to alter a few items in the line of code. We would change 'unil' to 'u3003' and change the value 'vunil' to 'vu0'. NOTE! this is one of the tricky things to remember, you see that the values are the same for both 'down'(ON) and 'up'(OFF). This is because this piticular button uses the same command for both. Press the button once to turn it on, and again to turn it off. However some of the switches have different values for differents states of a switch. ( in most cases, the value would be oppsite each other) An example of this in the Uh-1h would be the the caution panel test/reset switch, (in the game this is known as a 3 position switch or On/Off/On). The first On value (test) is 1.0, the second (Off) value is 0.0 and the other On value (reset) is -1.0 . Now as I said we would edit the 'diff' file line above to read... "["d3003pnilu3003cd2vd0vpnilvu0"]" The problem is that when you edit this line and save the file, your changes in the line are ignored by the game. I don't know why this is, however when you make a simular line edit to the 'default.lua' or any of the other joystick lua files, the program carries them out as long as they are correctly edited. Since the 'default.lua' file is used for push button(momentary) type of switch on joysticks, and can't handle other kinds of switches such as toggle to name one, (unless you edit the file). The line of code in the 'default.lua' for the fuel switch (which in game is a toggle) reads as follows... {down = device_commands.Button_3, cockpit_device_id = devices.FUELSYS_INTERFACE, value_down = 0.0, name = _('Main Fuel Switch'), category = _('Pedestal')}, And broken down... -- {down = device_commands.Button_3, = Switch moved to 'ON' position or joystick button pressed change the value for 'device_command.Button_3 -- cockpit_device_id = devices.FUELSYS_INTERFACE, = identifaction of the device system being called -- value_down = 0.0, = what value to change to in the 'down' or 'ON' state -- name = _('Main Fuel Switch'), = which system item is acted on -- category = _('Pedestal')}, = what category the button is found in Now to edit that line to work with our physical toggle switch we would have to add a few things to the line... 1...Before the down command we need to add combos = {{key = 'JOY_BTN23'}}, (your actual joystick button number would be the one you're using) 2...After the down command we would add up = device_commands.Button_3, 3...After the down value we would add value_up = 0.0, Then save the file and you're done with editing that line of code. It will look like this... {combos = {{key = 'JOY_BTN23'}}, down = device_commands.Button_3, up = device_commands.Button_3, cockpit_device_id = devices.FUELSYS_INTERFACE, value_down = 0.0, value_up = 0.0, name = _('Main Fuel Switch'), category = _('Pedestal')}, Now you're physical toggle switch will function in both directions as it should. That wasn't so hard now was it. I hope I wasn't too long winded, or bored y'all. I do hope this has been of help to those who weren't sure what was being talked about. If anyone has questions or problems, just PM me or many others online and we'll do what we can to help, after all thats what a Community is for. Flying tip of the day.... Don't fly upside down if you have a gravity fed oil system, you won't be flying long. LOL
DeJohn Posted August 2, 2016 Posted August 2, 2016 That is not 'quite easy' IMHO. :) Editing LUA files after every update is not convenient, either. +1 And besides, it has to be done for each and everyone of us Warthog users. If it's done at dev level, is done once, distributed and updated only when required. The files don't have to be re-edited after every update. The new ones only needs to be compared to the pre-updated ones, (using Notepad++, the same thing you used to edit the file) and only edited when there has been a change to one or more. And you only change the lines that were changed or added, not the whole file. If you like to know how this is done, just ask and I or someone else can explain it
MarkP Posted May 14, 2018 Posted May 14, 2018 For us poor warthog users, please do like RAZBAM and add the 2 and 3 pos switches abstractions to the default key mappings for all modules, so we can avoid using TARGET, which is pretty much the most cumbersome and un-intuitive thing I have ever seen, and configure everything from inside DCS. Thanks +1 So annoying :/ Main-Module: F-16C, AH-64D Maps: Syria, Persian Gulf, South Atlantic, Caucasus, 1944 Normandy, NTTR Hardware: VKB Gunfighter mk.2 Pro, WinWing Orion F16, VKB T-Rudder, HP Reverb G2 PC Specs: Intel 13900K, ASUS ROG STRIX Z790-E, 64GB DDR5-5800 RAM, GeForce RTX 4090, Win 11x64
Nooch Posted May 14, 2018 Posted May 14, 2018 (edited) Please ED, add the option in the controls menu. It's so badly needed for us hotas owners! :cry: Instead of making a 3 pos switch abstraction, an even better option would be adding a "only when key is held option". It would be perhaps easier to implement and would work with all controls. Edited May 14, 2018 by Nooch [sIGPIC][/sIGPIC]
Recommended Posts