Jump to content

TM Warthog - help with 2 position switches


Elnocho3
 Share

Recommended Posts

Hey all,

 

Apologies, I have searched the forums - but it's still not clear to me. How do I setup 2 position switches for the M2K with the Thrustmaster Warthog?

 

So for example, I want to use the 'EAC' toggle switch as the Master arm switch. Up being Armed and down being unarmed. At the moment I can only get it acting as a toggle. Do I have to go down into lovely(!) lua to achieve this? Any and all help would be massively appreciated!

 

 

P.S. I do not use Target, and do not want to (personal preference - have achieved this sort of thing without it in the past).

PC spec: i9 9900KS @ 5.1ghz, 32GB RAM, 2 TB NVME M2, RTX 3090

Peripherals: TM Warthog, Saitek Pro Flight Pedals, Rift S, Custom UFC

Link to comment
Share on other sites

I achieved it by adding the following

 

-- Alternate Switch Abstractions
{down = 3234, up = 3234, cockpit_device_id = 6, value_up = -1, value_down = 1, name = _('Master UNARMED, else ARMED'), category = _('Alternate Switch Abstractions')},
{down = 3463, up = 3463, cockpit_device_id = 6, value_up = -1, value_down = 1, name = _('Gun UNARMED, else ARMED'), category = _('Alternate Switch Abstractions')},

 

to

 

DCS World\Mods\aircraft\M-2000C\Input\M-2000C\joystick\default.lua

 

The beginning of this file should then look like:

 

local res = external_profile("Config/Input/Aircrafts/common_joystick_binding.lua")
local cockpit = folder.."../../../Cockpit/"
dofile(cockpit.."devices.lua")
dofile(cockpit.."command_defs.lua")

join(res.keyCommands,{
-- Alternate Switch Abstractions
{down = 3234, up = 3234, cockpit_device_id = 6, value_up = -1, value_down = 1, name = _('Master UNARMED, else ARMED'), category = _('Alternate Switch Abstractions')},
{down = 3463, up = 3463, cockpit_device_id = 6, value_up = -1, value_down = 1, name = _('Gun UNARMED, else ARMED'), category = _('Alternate Switch Abstractions')},

-- 3-Pos. Switch Abstractions
 	...

 

Doing this will give you a new category in the controller settings ("Alternate Switch Abstractions") where you can setup your Hotas.

 

This change has to be applied after every update.


Edited by n26
Link to comment
Share on other sites

I've done it for M2000-C (as also for almost every other module) using the same approach as n26.

The JSGME may not be so bad idea with M2000-C as it becomes stable but on the other hand I wouldn't suggest it for a number of reasons:

1. DCS has a really good update system. After running an update it takes just a moment to copy-paste from the latest "__backupXYZ" folder. Can't get easier than that.

2. From time to time it's good to compare the files in order to check if the update didn't bring changes to overwritten file. In such case own customizations should be re-added manually. For that reason knowing what to do becomes handy. With JSGME there may be a false impression that running it after an update makes everything right while in reality the fixes/updates are potentially overwritten with old code.

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

Link to comment
Share on other sites

JSGME is fine, as you mentioned you just need to understand how your mods work, and what they affect. Run a side-by-side diff before and after the update, to make sure your mod isn't overwriting lines they shouldn't be.

 

Personally not a fan of target. The built in works just fine.

 

The key issue (re: Elnocho3's question) is that the Warthog switches only send information when in the active state. 2 position switches are only active when "up" and 3 position switches are active when up/down or foward/backward, but are inactive when in the center position.

 

Thus, to map them "correctly" in-game, the module author (RAZBAM in this case) ideally needs to create a bunch of "A else B" where A is the active position and B is the inactive position bindings, as n26 did above. (Luckilly there were enough command capabilities that this was possible, some modules don't have enough capability in their existing bindings to do this.) For 3-position switches, you need "A else B" and "C else B" bindings, where A/C are up/down, and B is the center position behavior.

 

--gos

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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