Elnocho3 Posted December 22, 2016 Posted December 22, 2016 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
Binary Posted December 22, 2016 Posted December 22, 2016 (edited) 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 December 23, 2016 by n26 Author of Scratchpad, DATIS, and maintainer of DCS-gRPC.
dannyq8 Posted December 22, 2016 Posted December 22, 2016 Could I also suggest using JSGME. It saves so much time and effort when ED updates DCS https://forums.eagle.ru/showthread.php?t=98607 Wise men speak because they have something to say; Fools because they have to say something. Plato
Rabso Posted December 23, 2016 Posted December 23, 2016 I would suggest use this TARGET SCRIPT by Gizzy : https://forums.eagle.ru/showthread.php?t=153039 i7-6700K | MSI Z170A Gaming M7 | Dominator 32GB 3000MHz | MSI GTX 1070 GAMING Z | 2TB SSD & 1TB HDD | Acer H277HU 27" WQHD | Audeze Mobius | TM Warthog | MFG Crosswind | TrackIR 5 | Windows 10 Pro
firmek Posted December 23, 2016 Posted December 23, 2016 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
gospadin Posted December 23, 2016 Posted December 23, 2016 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 My liveries, mods, and missions for DCS:World M-2000C English Cockpit | Extra Beacons Mod | Nav Kneeboard | Community A-4E
Recommended Posts