Jump to content

Keybind for trigger guard


Mange

Recommended Posts

1 hour ago, frostycab said:

Can you not bind the button to action the command on press AND release in the Virpil software? My first bit of Virpil kit is finally arriving next week, so I haven't had a chance to play with the software yet.

I don`t have the Virpil base. I havethe grip on a Brunner FFB base so the Virpil software don`t work..

Link to comment
Share on other sites

Oh. I've never used it myself, but I've heard that in the past a bit of software called JoyToKey adds some functionality to some controller configurations. It's fairly old software now I think, and I have no idea if it would work, but might be worth a look to see if it can offer a workaround.

Link to comment
Share on other sites

9 hours ago, Mange said:

I need a keybind like “trigger guard closed else open” 

I have a Virpil grip and it has only a button for the trigger guard when it’s closed…

You can overcome this with a bit of creativity in the Virpil software. I assume you are talking about the flip trigger on, say, a constellation where the physical switch is pressed if the trigger is up? You can assign two logical switches to the same physical switch and set one to inverse such that one logical is “pressed” when the trigger is up (that’s your open) and one is “pressed” when the trigger is down (that’s your close). That’s what I’ve done and it works fine for me.

Link to comment
Share on other sites

1 hour ago, Shiroka said:

You can overcome this with a bit of creativity in the Virpil software. I assume you are talking about the flip trigger on, say, a constellation where the physical switch is pressed if the trigger is up? You can assign two logical switches to the same physical switch and set one to inverse such that one logical is “pressed” when the trigger is up (that’s your open) and one is “pressed” when the trigger is down (that’s your close). That’s what I’ve done and it works fine for me.

I think the issue for Mange is that he's not using a Virpil base. In order for all the functions on the stick to work the base has to be able to pass the signals to the software, but I've been told that some 3rd party bases are obviously not designed to support all of the buttons on newer grips. It does mention something about it on the Virpil site where it talks about using their grips with a Warthog base, warning you that some functionality may be lost.

In any case, he said the Virpil software doesn't work for his base. Google "Brunner force feedback" to get an idea of how good his setup must be though!

  • Like 1
Link to comment
Share on other sites

The Brunner software detect every button on the grip… in the software you can invert the button but that doesn’t help me either…

The button i’m talking about is pushed in when the trigger guard is down,not up

Link to comment
Share on other sites

As mentioned a simple if not the most elegant solution would be something like Joy2Key.

For example set it so pressing the button returns A and releasing it returns B. Then in DCS map B to the Trigger Guard release.

 

j2k 0.png

AMD 5800X3D · MSI 4080 · Asus ROG Strix B550 Gaming  · HP Reverb Pro · 1Tb M.2 NVMe, 32Gb Corsair Vengence 3600MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · VIRPIL T-50CM3 Base, Alpha Prime R. VIRPIL VPC Rotor TCS Base. JetSeat

Link to comment
Share on other sites

I believe the solution is literally a single line of code in dcs. Give me some time and I’ll send it over when I can. 


Edited by Bailey
  • Thanks 1
Link to comment
Share on other sites

Voice Attack is handy for things like this. You can create a command therein to send key presses that are mapped in DCS to both open the guard and pull the trigger. No need for voice activation as you can map the joystick trigger pull to this in Voice Attack. 

  • Like 2
Link to comment
Share on other sites

On 3/24/2022 at 7:28 PM, Mange said:

I need a keybind like “trigger guard closed else open” 

I have a Virpil grip and it has only a button for the trigger guard when it’s closed…

Here you go. Copy this code:

---------------------------------------------
-- Custom -----------------------------------
---------------------------------------------

{	down = hotas_commands.CYCLIC_TRIGGER_GUARD,		up = hotas_commands.CYCLIC_TRIGGER_GUARD,	cockpit_device_id = devices.HOTAS_INPUT,	value_down =  1.0, value_up = 0.0,		name = _('Weapons Trigger Guard - OPEN else CLOSE'),	category = {_('Cyclic Stick'), _('HOCAS'), _('Custom')}},
{	down = hotas_commands.CYCLIC_TRIGGER_GUARD,		up = hotas_commands.CYCLIC_TRIGGER_GUARD,	cockpit_device_id = devices.HOTAS_INPUT,	value_down =  0.0, value_up = 1.0,		name = _('Weapons Trigger Guard - CLOSE else OPEN'),	category = {_('Cyclic Stick'), _('HOCAS'), _('Custom')}},


and then paste it into these files:
`C:\...\DCS World OpenBeta\Mods\aircraft\AH-64D\Input\AH-64D_PLT\joystick\default.lua`
`C:\...\DCS World OpenBeta\Mods\aircraft\AH-64D\Input\AH-64D_CPG\joystick\default.lua`

at this location near the top:
image.png

 

That's it! No fumbling with third party programs that could interfere with your other modules. The catch is that this file may be replaced during DCS Repair or a DCS version update. You will have to replace the code afterwards. Just keep this thread handy and you'll be fine. I have tested it ingame and it works great. Enjoy!
(Yes, I said "one line of code" earlier, but I like to make it a bit more accessible and fancy 😛 )
image.png


Edited by Bailey
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Yep, I did the same trick yesterday for myself 🙂
I'm sure "Special for joystick" (what a strange name!) commands will start popping up later in EA period, but for now, if you don't want to mess with your Lua files as shown above by Bailey, you can check if your trigger is guarded or not without actually shooting any weapon.
1. Take off (no weight on wheels).
2. A/S ARM.
3. Make sure NO weapon is WASed!
4. Pull the trigger and now:
A) If your trigger is unguarded, you'll see "WEAPON?" in the bottom right part of "High Action Display" part of your IHADSS. Apache can see you want to fire but doesn't know which weapon it should fire.
B) If your trigger is guarded, nothing will happen (no "WEAPON?" text), because you haven't actually pulled the trigger - as it is guarded.

Such a quick and dirty workaround.

 


Edited by scoobie
  • Like 2

i7-8700K 32GB 2060(6GB) 27"@1080p TM Hawg HOTAS TPR TIR5 SD-XL 2xSD+ HC Bravo button/pot box

Link to comment
Share on other sites

9 hours ago, Bailey said:

Here you go. Copy this code:

---------------------------------------------
-- Custom -----------------------------------
---------------------------------------------

{	down = hotas_commands.CYCLIC_TRIGGER_GUARD,		up = hotas_commands.CYCLIC_TRIGGER_GUARD,	cockpit_device_id = devices.HOTAS_INPUT,	value_down =  1.0, value_up = 0.0,		name = _('Weapons Trigger Guard - OPEN else CLOSE'),	category = {_('Cyclic Stick'), _('HOCAS'), _('Custom')}},
{	down = hotas_commands.CYCLIC_TRIGGER_GUARD,		up = hotas_commands.CYCLIC_TRIGGER_GUARD,	cockpit_device_id = devices.HOTAS_INPUT,	value_down =  0.0, value_up = 1.0,		name = _('Weapons Trigger Guard - CLOSE else OPEN'),	category = {_('Cyclic Stick'), _('HOCAS'), _('Custom')}},


and then paste it into these files:
`C:\...\DCS World OpenBeta\Mods\aircraft\AH-64D\Input\AH-64D_PLT\joystick\default.lua`
`C:\...\DCS World OpenBeta\Mods\aircraft\AH-64D\Input\AH-64D_CPG\joystick\default.lua`

at this location near the top:
image.png

 

That's it! No fumbling with third party programs that could interfere with your other modules. The catch is that this file may be replaced during DCS Repair or a DCS version update. You will have to replace the code afterwards. Just keep this thread handy and you'll be fine. I have tested it ingame and it works great. Enjoy!
(Yes, I said "one line of code" earlier, but I like to make it a bit more accessible and fancy 😛 )
image.png

 

Great thanks 👍

That working just like I want it to do 👍🍺

  • Like 1
Link to comment
Share on other sites

@Mange Your request is very reasonable. Any control that behaves like a switch rather than button needs the 'Action or not action' control binding, like Master Arm and Arrestor Hook often do in modules.  We should not need hacks that will get overridden by updates. Chance this module, including controls, will be updated in future... 100%

By the way, I do appreciate hacks and work arounds. For now, I just bind Open and just never close the guard. Would personally be happy for option to start open.


Edited by DimSim
  • Like 1
Link to comment
Share on other sites

21 hours ago, Bailey said:

That's it! No fumbling with third party programs that could interfere with your other modules. The catch is that this file may be replaced during DCS Repair or a DCS version update. You will have to replace the code afterwards.

I agree if feels a more correct solution. The downsides can be a bit of a pain though if you use say a common switch combination for gear - press and release. Mapping G & H for example to a press and release and using those for gear up and down is a once only bind using a third party product like Joy2Key or Voice Attack. Plus if you change your mind which switch to use you only have to change it once!

If you are already using a 3rd party program (Voice Attack for example) then there is no additional PC load to consider. Just some thoughts.

AMD 5800X3D · MSI 4080 · Asus ROG Strix B550 Gaming  · HP Reverb Pro · 1Tb M.2 NVMe, 32Gb Corsair Vengence 3600MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · VIRPIL T-50CM3 Base, Alpha Prime R. VIRPIL VPC Rotor TCS Base. JetSeat

Link to comment
Share on other sites

  • Recently Browsing   0 members

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