Syd Posted November 7, 2022 Posted November 7, 2022 I have an issue with how rotary knobs behave when using keybind commands for CW and CCW rotation. It is a universal problem for all knobs - HDG, CRS, speed bug, altimter etc. Using keyboard or any other device for these CW and CCW commands, makes it impossible to set precise indication (unless you're lucky). No matter how short I try to press the key, the bug always travels for at least couple of degrees or inHgs in case of altimeter. There should be some critical time setting that would allow for those single short presses and precise setting. Much like it works when using mouse scroll wheel. Instead those binds are quite useless. Or maybe somebody knows how to make it work like that? Some lua file editing could do the trick?
LeCuvier Posted November 8, 2022 Posted November 8, 2022 You can probably adjust the "speed" for all or most of these bindings by modifying parameters in the file "default.lua" under "DRIVE:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\joystick". Example HMCS knob: There are two lines of code for this: { pressed = hmcs_commands.IntKnob_ITER, cockpit_device_id = devices.HMCS, value_pressed = -0.3, name = _('HMCS SYMBOLOGY INT Knob - CCW/Decrease'), category = {_('Left Auxiliary Console')}}, { pressed = hmcs_commands.IntKnob_ITER, cockpit_device_id = devices.HMCS, value_pressed = 0.3, name = _('HMCS SYMBOLOGY INT Knob - CW/Increase'), category = {_('Left Auxiliary Console')}}, The parameters following "value_pressed" determines the rotation speed of the knob. The values -0.3/0.3 work fine for rotary encoders but are fast for pushbutton. If you reduce them to -0.05/0.05 you will find they work better for pushbuttons. For editing this file use the free Notepad++. Also, you need to make a backup copy of the modified file because Update or Repair will restore the original file. To get a better understanding of what you can do with the "default.lua" files, go to https://forum.dcs.world/topic/270080-lua-editing-for-additional-key-binds-tutorial-no-discussion-here-please/#elControls_4646929_menu and download the tutorial document. 1 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
Syd Posted November 8, 2022 Author Posted November 8, 2022 Thanks for reply. I found those lines yesterday while doing further research. I also came by the tutorial you linked. The only problem is that reducing those values ultimately slows down fast scroll mode while button is being held down. With HMCS knob it's not a big issue since it's fast enough, but with CRS/HDG knobs it makes the bug travel a lot longer. I guess it will have to do for now but it sure needs an improvement. Are there any files/lines that describe how the mouse scroll wheel interacts with particular knob?
skywalker22 Posted November 8, 2022 Posted November 8, 2022 (edited) When chaning files, how about the IC in multiplayer, is it still ok? Edited November 8, 2022 by skywalker22
_SteelFalcon_ Posted November 8, 2022 Posted November 8, 2022 2 minutes ago, skywalker22 said: When chaning files, how about the IC in multiplayer, is it still ok? should be, because the file is not in the "(...)/Cockpits/Scripts(...)" folder, which was specifically mentioned in the patch notes to be affected by the "new" IC rule "pure scripts" 1
LeCuvier Posted November 8, 2022 Posted November 8, 2022 2 hours ago, skywalker22 said: When chaning files, how about the IC in multiplayer, is it still ok? Changes/additions in "default.lua" do not affect Integrity Check. 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
Fullnegi Posted July 17, 2024 Posted July 17, 2024 On 11/8/2022 at 10:35 AM, LeCuvier said: You can probably adjust the "speed" for all or most of these bindings by modifying parameters in the file "default.lua" under "DRIVE:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\joystick". Example HMCS knob: There are two lines of code for this: { pressed = hmcs_commands.IntKnob_ITER, cockpit_device_id = devices.HMCS, value_pressed = -0.3, name = _('HMCS SYMBOLOGY INT Knob - CCW/Decrease'), category = {_('Left Auxiliary Console')}}, { pressed = hmcs_commands.IntKnob_ITER, cockpit_device_id = devices.HMCS, value_pressed = 0.3, name = _('HMCS SYMBOLOGY INT Knob - CW/Increase'), category = {_('Left Auxiliary Console')}}, The parameters following "value_pressed" determines the rotation speed of the knob. The values -0.3/0.3 work fine for rotary encoders but are fast for pushbutton. If you reduce them to -0.05/0.05 you will find they work better for pushbuttons. I try to change the value for CRS knob of the HSI. When changing the valuer, i get an additionnal line and both in yellow with the message :: Different actions have identical descriptions Same when i add a new line with a new description, i can change the keyboard output but not DX Input. Turning by 1° with an Encoder for the HSI is really painfull haha.
LeCuvier Posted July 18, 2024 Posted July 18, 2024 11 hours ago, Fullnegi said: I try to change the value for CRS knob of the HSI. When changing the valuer, i get an additionnal line and both in yellow with the message :: Different actions have identical descriptions Same when i add a new line with a new description, i can change the keyboard output but not DX Input. Turning by 1° with an Encoder for the HSI is really painfull haha. There are two "default.lua" files: one under ""DRIVE:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\joystick" and one under "DRIVE:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\keyboard". The lines of code we are talking about are in both. If you modify the code in one of the files only, you will have conflicting command definitions, and that causes your orange or yellow lines. If you modify a line, you must do it in both files. I therefore prefer to add a new line with the modified code and and a different "name". If you add a new line under "keyboard", that command is available only on the keyboard. If you want the new command to be available on keyboard and game controllers, you need to add it to both files. 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
Fullnegi Posted July 24, 2024 Posted July 24, 2024 @LeCuvier Ooookay ! Will try that asap. Thanks so much for these clarifications
Fullnegi Posted July 30, 2024 Posted July 30, 2024 On 7/18/2024 at 12:03 PM, LeCuvier said: There are two "default.lua" files: one under ""DRIVE:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\joystick" and one under "DRIVE:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\F-16C\Input\F-16C\keyboard". The lines of code we are talking about are in both. If you modify the code in one of the files only, you will have conflicting command definitions, and that causes your orange or yellow lines. If you modify a line, you must do it in both files. I therefore prefer to add a new line with the modified code and and a different "name". If you add a new line under "keyboard", that command is available only on the keyboard. If you want the new command to be available on keyboard and game controllers, you need to add it to both files. I added the lines on both files and it worked ! Now, i need to find the right value. I tried to put 0.05 for 5°, but it changes value randomly (sometimes by 2, sometimes by 3, ..). Anyway, thanks a lot!
Recommended Posts