npole Posted May 24, 2023 Share Posted May 24, 2023 (edited) Hello, I'm trying to find a way to save a camera position to call it back using a single hotkey. So far I didn't found anything that works like I need: what I found is, I can do the above but the view doesn't stay, it's not toggable, I need to keep the hotkey pressed. Or I can make it toggable, but it means switching to the toggle mode first and then using the save view hotkey, both this solutions will not work for my scenario. What I would like to do, is what I do in other sims (in example MSFS): i set a view with the free camera, I save it with on a hot-key, and that view is then available with that hot-key and will stay. I can switch between those save camera position with their hotkeys and no intermediate steps. I didn't found a way to the same with DCS: i can't keep the hotkey pressed (it will affect the normal keyboard operation); if I switch to the toggle mode I need to use two separate hotkeys, not only that but the hotkeys for the key to change between the views will change (in example the first time i need to enter in the toggle mode; but to switch to a different view directly from there, you don't need the switch anymore.. it's a mess). Any idea? Maybe it can be done my manually editing the LUA files? However I would like to avoid to modify the LUA files (and maintain them later...) if this can be performed in-game. Edited May 24, 2023 by npole Link to comment Share on other sites More sharing options...
npole Posted May 24, 2023 Author Share Posted May 24, 2023 I didn't found how to do this in game, but I've found how to manipulate the LUA file to obtain a toggling view without going in toggling mode (for anyone that may have the same question one day...). This is the LUA part where it is controlled: {combos = {{key = 'Num0', reformers = {'LWin'}}}, down = iCommandViewSnapView0, up = iCommandViewSnapViewStop, name = _('Custom Snap View 0'), category = _('View Cockpit')}, {combos = {{key = 'Num1', reformers = {'LWin'}}}, down = iCommandViewSnapView1, up = iCommandViewSnapViewStop, name = _('Custom Snap View 1'), category = _('View Cockpit')}, {combos = {{key = 'Num2', reformers = {'LWin'}}}, down = iCommandViewSnapView2, up = iCommandViewSnapViewStop, name = _('Custom Snap View 2'), category = _('View Cockpit')}, {combos = {{key = 'Num3', reformers = {'LWin'}}}, down = iCommandViewSnapView3, up = iCommandViewSnapViewStop, name = _('Custom Snap View 3'), category = _('View Cockpit')}, {combos = {{key = 'Num4', reformers = {'LWin'}}}, down = iCommandViewSnapView4, up = iCommandViewSnapViewStop, name = _('Custom Snap View 4'), category = _('View Cockpit')}, {combos = {{key = 'Num5', reformers = {'LWin'}}}, down = iCommandViewSnapView5, up = iCommandViewSnapViewStop, name = _('Custom Snap View 5'), category = _('View Cockpit')}, {combos = {{key = 'Num6', reformers = {'LWin'}}}, down = iCommandViewSnapView6, up = iCommandViewSnapViewStop, name = _('Custom Snap View 6'), category = _('View Cockpit')}, {combos = {{key = 'Num7', reformers = {'LWin'}}}, down = iCommandViewSnapView7, up = iCommandViewSnapViewStop, name = _('Custom Snap View 7'), category = _('View Cockpit')}, {combos = {{key = 'Num8', reformers = {'LWin'}}}, down = iCommandViewSnapView8, up = iCommandViewSnapViewStop, name = _('Custom Snap View 8'), category = _('View Cockpit')}, {combos = {{key = 'Num9', reformers = {'LWin'}}}, down = iCommandViewSnapView9, up = iCommandViewSnapViewStop, name = _('Custom Snap View 9'), category = _('View Cockpit')}, removing the "up = iCommandViewSnapViewStop" part, will make the snapview to stay. 1 3 Link to comment Share on other sites More sharing options...
npole Posted May 24, 2023 Author Share Posted May 24, 2023 (edited) Oh, forgot to mention that doing the above will place you in the toggled view, to reset the view you gonna use the default LCTRL+NP0, however I've combined it with the "center view" (NP5) so in every moment I can reset the view, no matter where I'm looking at, by adding the up event here: {combos = {{key = 'Num5'}}, pressed = iCommandViewCenter, up = iCommandViewSnapViewStop, name = _('View Center'), category = _('View')}, Edited May 24, 2023 by npole 2 Link to comment Share on other sites More sharing options...
Rudel_chw Posted May 24, 2023 Share Posted May 24, 2023 4 hours ago, npole said: I didn't found how to do this in game, but I've found how to manipulate the LUA file to obtain a toggling view without going in toggling mode Great find .. I do this by programming my Thrustmaster Hotas, so that a single button generates several key commands in sequence, but glad to know there is a solution that works for every Hotas. 1 For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
npole Posted May 25, 2023 Author Share Posted May 25, 2023 17 hours ago, Rudel_chw said: Great find .. I do this by programming my Thrustmaster Hotas, so that a single button generates several key commands in sequence, but glad to know there is a solution that works for every Hotas. I do own a TS Warthog as well.. however neither with a macro you can do that, because you have to enter in the toggle mode to switch between the views and once you entered in that mode, the hotkeys will change. The only way to do that without touching the LUA files would be to set an always pressed key macro.. but the idea of having a key always pressed while doing other stuff is plain crazy. So I don't think you can switch between views with a single key press (macro) and the default key bindings (original LUA). Link to comment Share on other sites More sharing options...
Rudel_chw Posted May 25, 2023 Share Posted May 25, 2023 39 minutes ago, npole said: So I don't think you can switch between views with a single key press (macro) and the default key bindings (original LUA). Maybe I misunderstood what your lua acomplishes, but my Hotas programming does allow me to change the view and no need to keep a key pressed: For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
npole Posted May 25, 2023 Author Share Posted May 25, 2023 40 minutes ago, Rudel_chw said: Maybe I misunderstood what your lua acomplishes, but my Hotas programming does allow me to change the view and no need to keep a key pressed: If you notice, you're "forced" to return to the normal view, because the standard command works only in toggling mode. In example, if you want to switch directly from a snap view to another, you can't.. because if you're in a snapview already (toggled), you don't have to switch again in toggle mode... and the software (the macro) doesn't know if you're in a snapview already. I've modified the LUA to overcome this exactly issue: you can switch between views, no matter if you're in a snapview already or in the standard camera. The only additional key needed is the one to exit the snapview (I call it "reset view" because it exists the snapview toggle mode and will center your view, like in your video). 1 Link to comment Share on other sites More sharing options...
Rudel_chw Posted May 25, 2023 Share Posted May 25, 2023 57 minutes ago, npole said: In example, if you want to switch directly from a snap view to another, you can't.. OK, I get it now .. will try your lua now For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
CougarFFW04 Posted August 6, 2023 Share Posted August 6, 2023 On 5/24/2023 at 8:49 PM, npole said: I didn't found how to do this in game, but I've found how to manipulate the LUA file to obtain a toggling view without going in toggling mode (for anyone that may have the same question one day...). This is the LUA part where it is controlled: {combos = {{key = 'Num0', reformers = {'LWin'}}}, down = iCommandViewSnapView0, up = iCommandViewSnapViewStop, name = _('Custom Snap View 0'), category = _('View Cockpit')}, {combos = {{key = 'Num1', reformers = {'LWin'}}}, down = iCommandViewSnapView1, up = iCommandViewSnapViewStop, name = _('Custom Snap View 1'), category = _('View Cockpit')}, {combos = {{key = 'Num2', reformers = {'LWin'}}}, down = iCommandViewSnapView2, up = iCommandViewSnapViewStop, name = _('Custom Snap View 2'), category = _('View Cockpit')}, {combos = {{key = 'Num3', reformers = {'LWin'}}}, down = iCommandViewSnapView3, up = iCommandViewSnapViewStop, name = _('Custom Snap View 3'), category = _('View Cockpit')}, {combos = {{key = 'Num4', reformers = {'LWin'}}}, down = iCommandViewSnapView4, up = iCommandViewSnapViewStop, name = _('Custom Snap View 4'), category = _('View Cockpit')}, {combos = {{key = 'Num5', reformers = {'LWin'}}}, down = iCommandViewSnapView5, up = iCommandViewSnapViewStop, name = _('Custom Snap View 5'), category = _('View Cockpit')}, {combos = {{key = 'Num6', reformers = {'LWin'}}}, down = iCommandViewSnapView6, up = iCommandViewSnapViewStop, name = _('Custom Snap View 6'), category = _('View Cockpit')}, {combos = {{key = 'Num7', reformers = {'LWin'}}}, down = iCommandViewSnapView7, up = iCommandViewSnapViewStop, name = _('Custom Snap View 7'), category = _('View Cockpit')}, {combos = {{key = 'Num8', reformers = {'LWin'}}}, down = iCommandViewSnapView8, up = iCommandViewSnapViewStop, name = _('Custom Snap View 8'), category = _('View Cockpit')}, {combos = {{key = 'Num9', reformers = {'LWin'}}}, down = iCommandViewSnapView9, up = iCommandViewSnapViewStop, name = _('Custom Snap View 9'), category = _('View Cockpit')}, removing the "up = iCommandViewSnapViewStop" part, will make the snapview to stay. Hi, Which lua file are you refering to ? Thanks Link to comment Share on other sites More sharing options...
Rudel_chw Posted August 6, 2023 Share Posted August 6, 2023 1 hour ago, CougarFFW04 said: Which lua file are you refering to ? The keyboard commands, for each DCS flyable aircraft, are defined on a "default.lua" file located within its program folder, for example the one for the P-51 is located here: C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\P-51D\Input\P-51D\keyboard I tried this tip and it does work, but it is impractical to maintain since every DCS update will erase our edits. For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
CougarFFW04 Posted August 6, 2023 Share Posted August 6, 2023 Hi Rudel_chw, Thanks, I will have a try Link to comment Share on other sites More sharing options...
CougarFFW04 Posted August 6, 2023 Share Posted August 6, 2023 22 minutes ago, Rudel_chw said: The keyboard commands, for each DCS flyable aircraft, are defined on a "default.lua" file located within its program folder, for example the one for the P-51 is located here: C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\P-51D\Input\P-51D\keyboard I tried this tip and it does work, but it is impractical to maintain since every DCS update will erase our edits. Hi again, Looks for the F18. The only file in keyboard is default.lua where I can't find those lua instructions.. Link to comment Share on other sites More sharing options...
Rudel_chw Posted August 6, 2023 Share Posted August 6, 2023 (edited) 18 minutes ago, CougarFFW04 said: Hi again, Looks for the F18. The only file in keyboard is default.lua where I can't find those lua instructions.. Hi. I don't know why the Hornet doesnt have them .. on other aircrafts they are there, for example this is the A-10C II Edited August 6, 2023 by Rudel_chw For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
CougarFFW04 Posted August 6, 2023 Share Posted August 6, 2023 (edited) I have not the A10 so I cannot test. Search other planes, F16 for exemple, but can't find it... Something might have change since last patches... Anyone ? Edited August 6, 2023 by CougarFFW04 Link to comment Share on other sites More sharing options...
CougarFFW04 Posted August 6, 2023 Share Posted August 6, 2023 Found it : D:\Eagle Dynamics\DCS World OpenBeta\Config\Input\Aircrafts\common_keyboard_binding.lua 2 Link to comment Share on other sites More sharing options...
MAXsenna Posted August 7, 2023 Share Posted August 7, 2023 The keyboard commands, for each DCS flyable aircraft, are defined on a "default.lua" file located within its program folder, for example the one for the P-51 is located here: C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\P-51D\Input\P-51D\keyboard I tried this tip and it does work, but it is impractical to maintain since every DCS update will erase our edits.You could probably do it with Quaggles' Injector and Munkwolf's keybinds structure.Of course Quaggles must be re-enabled after every patch. But you already use a mod manager. Sent from my MAR-LX1A using Tapatalk Link to comment Share on other sites More sharing options...
Rudel_chw Posted August 7, 2023 Share Posted August 7, 2023 42 minutes ago, MAXsenna said: You could probably do it with Quaggles' Injector I’ve not used it yet, can it replace default key commands? I thought that it only added new definitions, not replacements For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
MAXsenna Posted August 7, 2023 Share Posted August 7, 2023 I’ve not used it yet, can it replace default key commands? I thought that it only added new definitions, not replacements Oh! Good question. Didn't think of that.Need to ask the experts.@Quaggles @MunkwolfSo, guys. What happens with default commands if one changes them?Cheers! Sent from my MAR-LX1A using Tapatalk Link to comment Share on other sites More sharing options...
CougarFFW04 Posted August 7, 2023 Share Posted August 7, 2023 Hi, Could someone teach me how to set Snapviews... I search on the internet and the procedure should be : 1) go cockpit (2D) 2) move to the desired position then press the snapview you want (assuming key binding LWIN+keypad 0 for snapview 0) and then save with RALT+keypad0. 3) redo step 2 for any other snapview However it doesn't work... What am I doing wrong ? Thanks Link to comment Share on other sites More sharing options...
Rudel_chw Posted August 7, 2023 Share Posted August 7, 2023 16 minutes ago, CougarFFW04 said: What am I doing wrong ? Maybe your headtracking is interfering .. pause the headtracker while doing the procedure. 1 For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600X - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1 Mobile: iPad Pro 12.9" of 256 GB Link to comment Share on other sites More sharing options...
Munkwolf Posted August 14, 2023 Share Posted August 14, 2023 On 8/6/2023 at 8:24 PM, MAXsenna said: Oh! Good question. Didn't think of that. Need to ask the experts. @Quaggles @Munkwolf So, guys. What happens with default commands if one changes them? Cheers! Sent from my MAR-LX1A using Tapatalk Afaik the way quaggles mod works is by the device/command/value combinations, where it won't include commands that are the same as ones already defined. This is why all the custom Viggen keybinds disappeared once HB included them in their code instead of duplicates appearing. So a different label or categories, but same device/command/value - not included. But some modules quantize the values so that they will always map to a valid position. You could use this to include a custom command alongside the default command. Where say the default command uses a value of 1, the custom command could reference same device, command, but then use a value of 1.0001. Since the value is different, it should be included, but whether it'd work would depend on how the modules handle that value. Like for some of the custom axis in the keybinds project where they control a multi-position rotary.. in some modules, that will work properly where it only changes to one of the valid positions. In other modules that weren't built with that in mind, using an axis for that rotary means the rotary is positioned exactly where the axis is, and can be really difficult to get it to register on one of the valid positions. 2 Link to comment Share on other sites More sharing options...
Recommended Posts