Jump to content

Options -> Controls -> Modifiers -> Switches


Recommended Posts

I know how Switches work. What I would like to do is have a Switch, which unsets all other switches. Is there a way to do this?

 

I'm flying with VR and I've come to the point that I need to map more things to my TM HOTAS, as blindly using the keyboard is not an option anymore, and the most viable way I can think of, is to use Switches.

 

I'm thinking of using the DMS (Data Management Switch - just below the thumb-hat on the TM HOTAS Joystick) to create 3-4 Switches.

 

Since Switches are locked-toggles, I can already think of two issues I would have to contend with.

1. having multiple Switches active at the same time.

2. Needing to absolutely deactivate all Switches quickly and certainly.

 

Since there is no indicator in the game that a Switch is active, I can already imagine having a Switch active and not realizing it, coming into a situation in which I need to used un-Switched buttons, and having to figure out which Switch is active, and which not... chaos is already programmed into the situation.

 

The best solution I can think of is to have a button I can press to deactivate all Switches. But how to do this? Maybe somebody has already done this, or knows how to do it.

 

There other possibility I can think of is to have a mod which implements indicators to show which Switch(es) are currently active, something like the 'Controls Position Overlay' which shows the positions of your joystick, rudder pedals and throttles, but for Switches.

 

Any advice would be greatly appreciated.

When you hit the wrong button on take-off

hwl7xqL.gif

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
 
Link to comment
Share on other sites

I have written a macro for the A-10C that turns all interior lights up (especially for missions starting at night where I could hardly locate the dimmer knobs). It uses the same approach as the stock Auto-Start macro command and is still working. With this approach there is virtually no limitation to the number and types of commands. However it fails the IC in MP.

I had written the same for the F-5E and it worked for some time, but some updates ago that macro made the F-5E unusable when the macro was enabled.

So this is a somewhat risky approach. I have a How-to in case you want to try.

 

Also, in the past I used TARGET for my TM HOTAS and that allowed me to create sequences with multiple commands for one button press. That seems the easiest solution to your issue - if you use TARGET.

 

Joy2Key is conceptually similar to TARGET but I have no experience with it. From what I've read, it is limited to 4 commands for one button press.

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 have been grappling with this very issue for some time now.

 

My first work around was to link the SweetFx (ReShader3) effect toggle to the switch. I could tell when the switch was activated by noticeable change in graphic effects. I can also generate a small nonspecific overlay to pop up in a corner of the screen when a switch is active.

I linked the switches to these indicators via VoiceAttack.

Not a bad workaround but it can only tell you that a switch is activated, BUT Not which one. Also, overlays and Reshader3 currently don't work in VR.

 

I've also used the Conditions logic in VoiceAttack to turn off any active switches when a switch is actuated. Only a fair solution cuz can occasionally get out of phase.

 

Im currently checking out USB LED light strips with which I can identify any and all active switches with a particular LED. Again, limited utility in VR.


Edited by Chic

A Co, 229th AHB, 1st Cav Div

ASUS Prime Z370-A MB, Intel Core i7 8700K 5.0GHz OC'd, RTX 3090, 32GB DDR4, 1TB SSD, Win 10

Samsung 65" 4K Curved Display (Oculus Rift occaisionally), Track IR5, VoiceAttack, Baur's BRD-N Cyclic base/Virpil T-50CM Grip, UH-1h Collective by Microhelis & OE-XAM Pedals. JetSeat & SimShaker for Aviators.

JUST CHOPPERS

 

Link to comment
Share on other sites

I have written a macro for the A-10C that turns all interior lights up (especially for missions starting at night where I could hardly locate the dimmer knobs). It uses the same approach as the stock Auto-Start macro command and is still working. With this approach there is virtually no limitation to the number and types of commands. However it fails the IC in MP.

I had written the same for the F-5E and it worked for some time, but some updates ago that macro made the F-5E unusable when the macro was enabled.

So this is a somewhat risky approach. I have a How-to in case you want to try.

 

Also, in the past I used TARGET for my TM HOTAS and that allowed me to create sequences with multiple commands for one button press. That seems the easiest solution to your issue - if you use TARGET.

 

Joy2Key is conceptually similar to TARGET but I have no experience with it. From what I've read, it is limited to 4 commands for one button press.

 

 

VoiceAttack is great for multiple input sequences, such as turning on all the panel lights in the Mi8 with a single command. It also passes IC.

These Macros, however, wont help with OP issue.

A Co, 229th AHB, 1st Cav Div

ASUS Prime Z370-A MB, Intel Core i7 8700K 5.0GHz OC'd, RTX 3090, 32GB DDR4, 1TB SSD, Win 10

Samsung 65" 4K Curved Display (Oculus Rift occaisionally), Track IR5, VoiceAttack, Baur's BRD-N Cyclic base/Virpil T-50CM Grip, UH-1h Collective by Microhelis & OE-XAM Pedals. JetSeat & SimShaker for Aviators.

JUST CHOPPERS

 

Link to comment
Share on other sites

Hello. I was just looking into that the other day.

 

I had the same issue that a modifier switch will add "active second level of switches" profile and it got messy at some point. Not working like a "Lshift" or "LCtrl" button on the keyboard.

 

So the kind-a-solution i found was that under the

user/Saved Games/DCS/Input/aircraft/modifiers.lua

you have to set the switch value to false (it was 'true' at first, so acting as a switch (meaning you have to turn it off after not using it)).

 

local modifiers = {
["JOY_BTN3 MOD"] = {
["device"] = "TWCS Throttle {47363BF0-B10C-11e7-8001-444553540000}",
["key"] = "JOY_BTN3",
["switch"] = false,
},
["LAlt"] = {
["device"] = "Keyboard",
["key"] = "LAlt",
["switch"] = false,
.....

 

And the button i used was push-button type.

Hope that helps.

 

edit: You have to set the modifier key beforehand ro change it and im not sure about the Integrety check, maybe it needs to be a mod, dunno.

Im so happy that I found DCS, the free time i might have had - gone :suspect:

Link to comment
Share on other sites

  • 4 weeks later...
Hello. I was just looking into that the other day.

 

I had the same issue that a modifier switch will add "active second level of switches" profile and it got messy at some point. Not working like a "Lshift" or "LCtrl" button on the keyboard.

 

So the kind-a-solution i found was that under the

user/Saved Games/DCS/Input/aircraft/modifiers.lua

you have to set the switch value to false (it was 'true' at first, so acting as a switch (meaning you have to turn it off after not using it)).

 

local modifiers = {
["JOY_BTN3 MOD"] = {
["device"] = "TWCS Throttle {47363BF0-B10C-11e7-8001-444553540000}",
["key"] = "JOY_BTN3",
["switch"] = false,
},
["LAlt"] = {
["device"] = "Keyboard",
["key"] = "LAlt",
["switch"] = false,
.....

 

And the button i used was push-button type.

Hope that helps.

 

edit: You have to set the modifier key beforehand ro change it and im not sure about the Integrety check, maybe it needs to be a mod, dunno.

 

In the settings for each aircraft there is a set of modifiers. Per default these are the standard meta-keys (Shift, Alt, Ctrl, etc.) on a standard keyboard, except they take into account whether the left or right key of a certain type is being pressed, thus doubling the effective number of meta-keys. So <RShift> & <LShift> although in Windows and most applications are equivalent, in DCS they are each unique.

 

The difference between Modifiers and Switched is that Modifiers are only active while asserted (being pressed), where as Switches are toggled. That is, if you press a Switch once, it will remain logically asserted, even after releasing the key, until you press it again, when it will become logically unasserted.

 

The modifiers.lua defines all Modifiers and Switches, and differentiates these through the "switch = [true|false]" parameter. If "true" then it is a switch, with all the consequences mentioned above. If it is "false", then it is simply a Modifier, and only asserted while actively being pressed.

 

Changing "switch = true" to "switch = false" simply changes a key or button from being a Switch to a Modifier, which you could have actually done from the beginning by defining the Switch as a Modifier.

 

Setting buttons on my HOTAS to work as Modifiers is not helpful, because it means that for one command, I have to press two buttons at the same time, which in certain circumstances would require the manual dexterity of a magician. Setting a button as a Switch alleviates that issue, but creates a second issue; not having a visual indicator showing whether a Switch is currently logically asserted or not.

 

I was thinking that since there is already a function to display the status of axis flight controls (<LCtrl><Enter>) there might be a way to either modify this function, or copy it and modify the copy to display the current status of all Switches.

When you hit the wrong button on take-off

hwl7xqL.gif

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
 
Link to comment
Share on other sites

I have written a macro for the A-10C that turns all interior lights up (especially for missions starting at night where I could hardly locate the dimmer knobs). It uses the same approach as the stock Auto-Start macro command and is still working. With this approach there is virtually no limitation to the number and types of commands. However it fails the IC in MP.

I had written the same for the F-5E and it worked for some time, but some updates ago that macro made the F-5E unusable when the macro was enabled.

So this is a somewhat risky approach. I have a How-to in case you want to try.

 

Also, in the past I used TARGET for my TM HOTAS and that allowed me to create sequences with multiple commands for one button press. That seems the easiest solution to your issue - if you use TARGET.

 

Joy2Key is conceptually similar to TARGET but I have no experience with it. From what I've read, it is limited to 4 commands for one button press.

 

I don't use TARGET, because I've never needed it, and avoid all complications if at all possible. Everything I've ever wanted to do, I've been able to do without TARGET.

 

Macros are not useful in my situation. I'm not trying to streamline a series of key or button presses, but rather create parallel definitions of what the same key or button will do, depending on the setting of a Switch.

 

I was thinking that since there is already a function to display the status of axis flight controls (<LCtrl><Enter>) there might be a way to either modify this function, or copy it and modify the copy to display the current status of all Switches.

When you hit the wrong button on take-off

hwl7xqL.gif

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
 
Link to comment
Share on other sites

8<

I can also generate a small nonspecific overlay to pop up in a corner of the screen when a switch is active.

 

Haha, this is exactly what I'm looking for...

 

I linked the switches to these indicators via VoiceAttack.

 

and now you've lost me again. I've used VoiceAttack and have some major issues with it. I eventually gave up, because the author doesn't understand what using a non-US keyboard means in his environment.

 

Not a bad workaround but it can only tell you that a switch is activated, BUT Not which one. Also, overlays and Reshader3 currently don't work in VR.

 

And here I'm completely out in the cold. The entire reason for needing a Switch indicator is needing it in VR.

 

I've also used the Conditions logic in VoiceAttack to turn off any active switches when a switch is actuated. Only a fair solution cuz can occasionally get out of phase.

 

Im currently checking out USB LED light strips with which I can identify any and all active switches with a particular LED. Again, limited utility in VR.

 

I was thinking that since there is already a function to display the status of axis flight controls (<LCtrl><Enter>) there might be a way to either modify this function, or copy it and modify the copy to display the current status of all Switches.

When you hit the wrong button on take-off

hwl7xqL.gif

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
 
Link to comment
Share on other sites

Okay, my latest switch fix is this.

Using VoiceAttack conditional blocks and homemade sound files, I now get an audio message every four seconds telling me which switch is active. Sound notices stop when switch is deactivated. Should work fine in VR.

A Co, 229th AHB, 1st Cav Div

ASUS Prime Z370-A MB, Intel Core i7 8700K 5.0GHz OC'd, RTX 3090, 32GB DDR4, 1TB SSD, Win 10

Samsung 65" 4K Curved Display (Oculus Rift occaisionally), Track IR5, VoiceAttack, Baur's BRD-N Cyclic base/Virpil T-50CM Grip, UH-1h Collective by Microhelis & OE-XAM Pedals. JetSeat & SimShaker for Aviators.

JUST CHOPPERS

 

Link to comment
Share on other sites

Okay, my latest switch fix is this.

Using VoiceAttack conditional blocks and homemade sound files, I now get an audio message every four seconds telling me which switch is active. Sound notices stop when switch is deactivated. Should work fine in VR.

 

That's not what I was originally thinking, but if it works, it's a solution.

 

Will it work with multiple switches? IE if you have two switches active at the same time, will you get two different audio signals?

 

I was at first thinking you were using VAC, but I then realized, no VoiceAttack, which I have because of VAC. Would you be so kind as to provide your VA script, maybe with a quick guide to install it?

When you hit the wrong button on take-off

hwl7xqL.gif

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
 
Link to comment
Share on other sites

If you activate multiple Switches then you will hear multiple switch sound notifications. The audio playback reminds you to turn the switch off. Not sure why you would need multiple Switches activated simultaneously though. My profile has 6 Switches. Attached is the profile. My sound files are too large to upload. You will need to modify the profile to fit your rig.

"Quick guide" is frankly not practical. You'll need some basic understanding of VoiceAttack. You will need to map your own buttons to the switches, and reprogram the "play a Sound" commands.

Happy to take specific questions.

Switch Profile-Profile.rar

A Co, 229th AHB, 1st Cav Div

ASUS Prime Z370-A MB, Intel Core i7 8700K 5.0GHz OC'd, RTX 3090, 32GB DDR4, 1TB SSD, Win 10

Samsung 65" 4K Curved Display (Oculus Rift occaisionally), Track IR5, VoiceAttack, Baur's BRD-N Cyclic base/Virpil T-50CM Grip, UH-1h Collective by Microhelis & OE-XAM Pedals. JetSeat & SimShaker for Aviators.

JUST CHOPPERS

 

Link to comment
Share on other sites

I wouldn't need multiple switches active at a time. That's actually the whole point. However, I'm using the Data Management Switch on the TM HOTAS Joystick--below the Trim Switch (thumb hat)--for my switches, and I'm uncoordinated enough with my thumb to not always hit it right, plus depending what's going on, I sometime forget to turn a switch off. Then while I'm busy trying to figure out which switch is on, and which not, and it can turn into a big mess, especially if something comes up and I need to use an unswitched button in a hurry :cry:

 

I've never programmed VoiceAttack, but I have programmed professionally in COBOL, and I do scripting in unix often, just no modern programming languages. But I understand the concepts--sometimes, and might be able to figure it out.

 

Many thanks for the offer of assistance if I have specific question. I'll see what I can do on my own first.

 

I'm thinking of looking for the "Bitchin' Betty" files and seeing if I might scavenge something from them. Depending on what I might find, I could probably put some short phrases together like "Radio Switch On", "Control Switch On", and "Weapons Switch On", or some variation of that would do the trick. Otherwise I'll just record myself saying what would be necessary, but I absolutely hate listing to my own voice :doh: Weird isn't it?

 

Many thanks again :thumbup:

When you hit the wrong button on take-off

hwl7xqL.gif

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
 
Link to comment
Share on other sites

I've got a kind of bodge for this, but it needs a few things to work. But basically your visual feedback ideas got me to thinking what overlays I use and how I could port them to use as a Switch State visual guide. Well I use MSI Afterburner to see my GPU stats and this has a key you can assign to toggle the overlay on and off. Shift + ALT + D. I get Voice Attack to watch for me pressing my modifier switch (Warthog Pinky Lever) and when I do it sends the Shift + ALT + D command which MSI picks up and switches the overlay on or off and then VA says via TTS "Pinky State Toggled".

 

It's a bodge but it works (I think, not used in flight yet) and I'm hoping at some point I can refine it further as MSI has discrete key commands for both on and off assignments. So if we can track the state of the modifier switch somehow in game then the on and off commands can keep the overlay in sync. Yes it has a major limitation in being only able to track one Mod Switch but for me at the moment its fine as the Worty has lots of buttons and switches.

 

Edit: Yup works great in flight and I have another VA command to flip the MSI Overlay state so that if it does get out of sync I just send the key presses to MSI on their own with a voice command, I say "Flip Pinky State".


Edited by Andydigital
Link to comment
Share on other sites

I've got a kind of bodge for this, but it needs a few things to work. But basically your visual feedback ideas got me to thinking what overlays I use and how I could port them to use as a Switch State visual guide. Well I use MSI Afterburner to see my GPU stats and this has a key you can assign to toggle the overlay on and off. Shift + ALT + D. I get Voice Attack to watch for me pressing my modifier switch (Warthog Pinky Lever) and when I do it sends the Shift + ALT + D command which MSI picks up and switches the overlay on or off and then VA says via TTS "Pinky State Toggled".

 

It's a bodge but it works (I think, not used in flight yet) and I'm hoping at some point I can refine it further as MSI has discrete key commands for both on and off assignments. So if we can track the state of the modifier switch somehow in game then the on and off commands can keep the overlay in sync. Yes it has a major limitation in being only able to track one Mod Switch but for me at the moment its fine as the Worty has lots of buttons and switches.

 

Edit: Yup works great in flight and I have another VA command to flip the MSI Overlay state so that if it does get out of sync I just send the key presses to MSI on their own with a voice command, I say "Flip Pinky State".

 

 

 

Does your DCS window lose "focus" when the overlay is up.

A Co, 229th AHB, 1st Cav Div

ASUS Prime Z370-A MB, Intel Core i7 8700K 5.0GHz OC'd, RTX 3090, 32GB DDR4, 1TB SSD, Win 10

Samsung 65" 4K Curved Display (Oculus Rift occaisionally), Track IR5, VoiceAttack, Baur's BRD-N Cyclic base/Virpil T-50CM Grip, UH-1h Collective by Microhelis & OE-XAM Pedals. JetSeat & SimShaker for Aviators.

JUST CHOPPERS

 

Link to comment
Share on other sites

Good work around.

Keep in mind, you can use Condition Blocks in VA to allow your Switch Command to know the status of the overlay. In other words, if the Switch is inactive (no overlay), the Switch command will activate the Switch mode and put up the overlay. The next time you toggle off your switch, the overlay will disappear as well.

This will allow identification of multiple switches (using audio feedback).

I know from experience that overlays that will work for you are few. Less immersive as well. I tried using sticky notes at one point. No joy.


Edited by Chic

A Co, 229th AHB, 1st Cav Div

ASUS Prime Z370-A MB, Intel Core i7 8700K 5.0GHz OC'd, RTX 3090, 32GB DDR4, 1TB SSD, Win 10

Samsung 65" 4K Curved Display (Oculus Rift occaisionally), Track IR5, VoiceAttack, Baur's BRD-N Cyclic base/Virpil T-50CM Grip, UH-1h Collective by Microhelis & OE-XAM Pedals. JetSeat & SimShaker for Aviators.

JUST CHOPPERS

 

Link to comment
Share on other sites

But without some way to know for sure what the state of the virtual modifier switch is in DCS itself they can become out of sync with the real switch (or in my case the overlay) for various reasons.

 

Like I say the overlay is a bit of a bodge, but it’s working for me. My overlay has a huge amount of info displayed, but I could, if I wanted to, reduce it to just a very small amount of detail such as just showing the FPS for example.

Link to comment
Share on other sites

Thanks for your idea Andydigital.

 

Unfortunately the Afterburner overlay--actually the RivaTuner overlay--does not appear in VR; only on the mirrored display.

When you hit the wrong button on take-off

hwl7xqL.gif

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
 
Link to comment
Share on other sites

  • Recently Browsing   0 members

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