Jump to content

Recommended Posts

Posted (edited)

If you're unfamiliar with editing the input .lua files, take a look here. That's a guide I typed up for the P-51D, and most of it carries over. I'm going to try to impart what I've discovered so far about the Hip's somewhat confusing controls.

 

First off, anything that's not in clickabledata.lua won't work using these methods! You can still map these through the config menu, but this thread will address the clickable things in the cockpit. For some odd reason, the left and right engine throttle controls are not clickable, and thus, this thread does not apply to them. I haven't figured out how to get them to work as a 3-way with the ENG OPER switches on the TM Warthog throttle.

 

In clickabledata.lua, you'll find different control types, starting around line 20. I'm going to step through these to explain how to set each of them up.

 

Buttons

First off, we have buttons. They're simple - they're either pushed in (1) or not pushed in (0).

Example: APU Start button

elements["PTR-CPE-BTN-TURBOSTART-ON"] = default_button(_("APU start"), devices.ENGINE_INTERFACE, device_commands.Button_26, 413)

 

If we look in devices.lua, we find this in the 3rd line of devices:

devices["ENGINE_INTERFACE"] = counter()

So our cockpit device id is 3 (because it's the 3rd in the device list).

 

Put that together and our throttle.lua file looks like:

{combos = {{key = "JOY_BTN15"}, }, down = 3026, up = 3026, cockpit_device_id = 3, value_down = 1, value_up = 0, name = "APU Start", category = "Central panel"},{down = iCommandViewBriefing, name = "Briefing window", category = "General"},

 

2-position switch

Next in the list is the 2-position switch. It has 2 possible values: 0 and 1. Practically speaking, it's set up in the same way as the button, so I won't clog up the page with duplicate info.

 

3-position switch

Ah, the bread and butter of throttle.lua modification! These guys are great. They have 3 possible values: -1, 0, 1. These typically correlate to down, middle, up, but not always. Trial and error is key: if you map the switch and it's backwards, swap your -1 and +1 values.

Example: Rocket series quantity (8/16/4) on the boat switch.

elements["PTR-LPE-TMB-SHOOT1"] = default_3_position_tumb(_("8/16/4"),devices.WEAPON_SYS, device_commands.Button_20,342)

Devices.lua indicates that WEAPONS_SYS is device #12, so our throttle.lua reads as follows:

{combos = {{key = "JOY_BTN10"}, }, down = 3020, up = 3020, cockpit_device_id = 12, value_down = -1, value_up = 0, name = "Rocket Serie 8-16-4 Down", category = "Armament System"},

{combos = {{key = "JOY_BTN9"}, }, down = 3020, up = 3020, cockpit_device_id = 12, value_down = 1, value_up = 0, name = "Rocket Serie 8-16-4 Up", category = "Armament System"},

See the positive and negative values bolded there?

 

Multi-position switch

There's a few of these around. The most important one for me is the GUV mode switch (the 800/622/624 one). I have this mapped to the DMS on my TM Warthog stick. Up is up, down is middle, left and right are down-left and down-right.

In clickabledata.lua, multi-position switches are declared thusly:

function multiposition_switch(hint_,device_,command_,arg_,count_,delta_,inversed_, min_)

This is important. As you can see, we have two new colors to worry about. Count is the total number of positions the switch has (4 for the GUV switch, 6 for the pod variants switch, etc.), and delta is the value that it counts in (0.1 for both of the above examples).

So for our example of the GUV switch, we see this:

elements["PTR-LPE-TMB-VAR"] = multiposition_switch(_("In800Out/800inOr624/622"),devices.WEAPON_SYS, device_commands.Button_42,347, 4, 0.1, 0)

This means that the GUV switch has 4 possible values: 0, 0.1, 0.2, 0.3. You can assign these to any controls you wish. It will take a little bit of experimentation to figure out what value correlates to what position, but here's the aforementioned DMS mapping:

{combos = {{key = "JOY_BTN12"}, }, down = 3042, up = 3042, cockpit_device_id = 12, value_down = 0.3, name = "GUV Mode 622", category = "Armament System"},

{combos = {{key = "JOY_BTN11"}, }, down = 3042, up = 3042, cockpit_device_id = 12, value_down = 0.1, name = "GUV Mode 800", category = "Armament System"},

{combos = {{key = "JOY_BTN14"}, }, down = 3042, up = 3042, cockpit_device_id = 12, value_down = 0.2, name = "GUV Mode 800/624", category = "Armament System"},

{combos = {{key = "JOY_BTN13"}, }, down = 3042, up = 3042, cockpit_device_id = 12, value_down = 0, name = "GUV Mode Off", category = "Armament System"},

You can thank DCS for ordering it all screwy-like for me.

 

Multi-position switch, limited

There's only one of these so far: the static pressure system mode knob in front of the commander's left knee. I don't know how it differs from the normal multi-position switch, and I'm not too worried about it. If someone else is, I can try to figure it out.

 

Radio wheel

These little bastards had me going for quite awhile. I think I've got them cracked now.

We'll reference clickabledata.lua again to see how these are declared:

function radio_wheel(hint_,device_,command1_,command2_,arg_)

As you can see, we have two buttons to worry about now. But which one do we use, you might ask yourself. Fear not, for my blood/sweat/tears have led me to deduce the following: You use command_1 to decrement and comand_2 to increment. Simple, huh?

These guys are only used for the R-863 frequency knobs. I have mine mapped to the 4 rockers on my right-hand TM Cougar MFD (aka F16 MFD 2). The rockers are buttons 21-28 in pairs (odd number = rocker up, even number = rocker down). Let's get to it.

elements["PTR-APP-LVR-SEL1"] = radio_wheel(_("R-863, 1st rotary"), devices.R_863, device_commands.Button_6, device_commands.Button_7, 163)

elements["PTR-APP-LVR-SEL2"] = radio_wheel(_("R-863, 2nd rotary"), devices.R_863, device_commands.Button_8, device_commands.Button_9, 164)

elements["PTR-APP-LVR-SEL3"] = radio_wheel(_("R-863, 3rd rotary"), devices.R_863, device_commands.Button_10, device_commands.Button_11, 165)

elements["PTR-APP-LVR-SEL4"] = radio_wheel(_("R-863, 4th rotary"), devices.R_863, device_commands.Button_12, device_commands.Button_13, 166)

Okay, so we've got even-numbered buttons ((300)6, (300)8, (30)10, (30)12) that are used to decrement the knobs, and odd-numbered buttons ((300)7, (300)9, (30)11, (30)13) that are used to increment them. That means that the value_down for the even-numbered buttons is -0.1 and the value_down for the odd-numbered buttons is 0.1.

Open up devices.lua and you'll find that the cockpit device ID is 38 (or, if you're me, you'll miscount twice and pull your hair out trying to find out why it's not working). This gives us the following:

{combos = {{key = "JOY_BTN28"}, }, down = 3006, cockpit_device_id = 38, value_down = -0.1, name = "R-863, 1st rotary down", category = "Central panel"},

{combos = {{key = "JOY_BTN27"}, }, down = 3007, cockpit_device_id = 38, value_down = 0.1, name = "R-863, 1st rotary up", category = "Central panel"},

{combos = {{key = "JOY_BTN22"}, }, down = 3008, cockpit_device_id = 38, value_down = -0.1, name = "R-863, 2nd rotary down", category = "Central panel"},

{combos = {{key = "JOY_BTN21"}, }, down = 3009, cockpit_device_id = 38, value_down = 0.1, name = "R-863, 2nd rotary up", category = "Central panel"},

{combos = {{key = "JOY_BTN26"}, }, down = 3010, cockpit_device_id = 38, value_down = -0.1, name = "R-863, 3rd rotary down", category = "Central panel"},

{combos = {{key = "JOY_BTN25"}, }, down = 3011, cockpit_device_id = 38, value_down = 0.1, name = "R-863, 3rd rotary up", category = "Central panel"},

{combos = {{key = "JOY_BTN24"}, }, down = 3012, cockpit_device_id = 38, value_down = -0.1, name = "R-863, 4th rotary down", category = "Central panel"},

{combos = {{key = "JOY_BTN23"}, }, down = 3013, cockpit_device_id = 38, value_down = 0.1, name = "R-863, 4th rotary up", category = "Central panel"},

 

Important notes:

The left and right engine cutoff valves (cockpit device id = 3, buttons = (300)9 and (30)10 (respectively), value_down = 1, value_up = 0) DO NOT WORK CORRECTLY for me. They switch on and off just fine, but if you click them with the mouse and then switch them again, they toggle incorrectly and then you can't click them anymore. I don't know why, and I'd appreciate if someone could please confirm this for me.

 

I haven't delved into button-axes or axes in general yet, because they're easily mappable through the normal config screen. I think that's pretty much it for most of the common controls. Questions or comments?

Edited by seikdel
  • Recently Browsing   0 members

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