Cockpit Control Configuration: The Back End

Collection of useful posts.
Forum rules
If you write a FAQ be sure that you are accurate as possible!
No General posts in this forum!
Post Reply
User avatar
LordNova2
House Steiner Sergeant
House Steiner Sergeant
Posts: 146
Joined: Sun Mar 08, 2009 5:33 pm
Location: Pocahontas, IA USA
Contact:

Cockpit Control Configuration: The Back End

Post by LordNova2 »

As most people already know, NetMech was distributed free from the Activision website. This was due to the fact that the development of the multi-player game NetMech was behind schedule and released two years after MechWarrior2 was released. This is why the "NetMech DOS" game can be downloaded free at mech2.org.
Unfortunately there was no way to edit your cockpit controls in NetMech, unless you knew the back-end to the software, and only people who picked apart the game files learned how to reconfigure the cockpit controls from the back end.

The two files we will be working with are INPUT.MAP and GAMEKEY.MAP, they are found in the main directory of any MW2 game. The INPUT.MAP was the main file that got changed when you edited the controls, the GAMEKEY.MAP was all the controls you did not have access to changing in the full games.
And they both have two different syntaxes to them, and some keys are apparently not mapped in both of them.
Today we will go over the INPUT.MAP File.

The key-mapping for INPUT.MAP:

The syntax is as follows:
(Function) {
(Input Designator) (input device) (input)
}
So for example the default setting for the "Eye Point: Left" is 'Ctrl + Grey Left Arrow'

Code: Select all

 pilot_pan_minus {
	+ keyboard	GreyLeftArrow
	+ keyboard	Control
}
The "pilot_pan_minus" is the "Function"
The "+" designates that this key/button must be pressed.
The "keyboard" designates the input device.
The "GreyLeftArrow" and "Control" are the "Inputs" that must be made to make this Function.
Here is a small list of available Functions for the INPUTE.MAP file:
torso_tilt (up and down torso tilting for axis input only)
torso_tilt_plus (up torso tilting)
torso_tilt_minus (down torso tilting)
torso_tilt_reset (recenter torso tilting to center)
torso_pan (left and right torso panning for axis input only)
torso_pan_plus (left torso panning)
torso_pan_minus (right torso panning)
torso_pan_reset (center torso panning to legs)
throttle (throttle speed setting for axis only)
legs_pan_delta (turning mech left and right for axis only)
jumpjet_enabled (jumpjets thrust upwards)
jumpjet_fire_left (jumpjets strafe left)
jumpjet_fire_right (jumpjets strafe right)
jumpjet_fire_forward (jumpjets thrust forwards)
jumpjet_fire_backward (jumpjets thrust backwards)
throttle_plus (increase throttle speed)
throttle_minus (decrease throttle speed)
weapon_fire (fire weapon or current group, depending upon firing mode)
weapon_cycle (cycle to next weapon)
weapon_fire_group (fire all weapons in currently selected group)
weapon_fire_group_1 (fire all weapons in group 1)
weapon_fire_group_2 (fire all weapons in group 2)
weapon_fire_group_3 (fire all weapons in group 3)
weapon_cycle_group (Cycle to next group)
toggle_group_fire (toggle between group fire and single fire)
legs_pan_minus (turn mech left)
legs_pan_plus (turn mech right)
advance_nav (cycle forward through nav-points)
previous_nav (cycle backwards through nav-points)
reset_nav (cycle to first nav-point)
advance_target (cycle forwards through the targets)
previous_target (cycle backwards through the targets)
reset_target (cycle to first target, not sure which is first)
target_reticle (target whatever is under the reticle)
target_friendly (cycle through friendly units)
nearest_enemy (target nearest enemy unit)
inspect_target (inspect target)
self_destruct (it is that thing in the cockpit that says "in case of emergency: break glass, and press button.")
autopilot (engage/disengage autopilot)
pilot_tilt (up and down eye point for axis only)
pilot_tilt_plus (tilt eye point down)
pilot_tilt_minus (tilt eye point up)
pilot_tilt_reset (center eye point tilt)
pilot_pan (pan eye point left and right for axis only)
pilot_pan_plus (pan eye point right)
pilot_pan_minus (pan eye point left)
pilot_pan_reset (center eye point pan)
glance_left (glace left)
glance_right (glace right)
glance_up (glance up)
glance_down (glance down)
zoom_factor (zoom in and out for axis only)
zoom_factor_plus (zoom in)
zoom_factor_minus (zoom out)
zoom_factor_reset (reset zoom)

Assume that all functions are not for an axis (a key-press or mouse-click), unless otherwise noted.
Anything in brackets "()" are notes and definitions of the functions, they are not to be inserted inside the INPUT.MAP file.
Also this is not a complete list of every function that can be used in INPUT.MAP, however most functionality that a person would wish to modify in the game is present.

Next is the Input Designator, rather simple it is "+" or "-".
For buttons and keys a "+" signifies the input must be pressed, and a "-" signifies the button/key must be depressed.
For an axis "+" means regular and "-" means inverted.

Now we define the input device, which can either be "keyboard" for the keyboard and "mouse" for the mouse.
And yes, there other input devices for joysticks and virtual i/O devices, however I am not going to get into them since they are rarely used.

The Inputs, rather self-explanatory.
Refer to the "INPUT" image below for the list of key bindings. The red text is what you type in to designate that key, the Shift/ Ctrl/Alt keys each have two designations, the top one is for any Shift/Alt/Ctrl key pressed, and the bottom is to define it as left or right.
Anything that is "*UNKNOWN*" I could not find the Input for, or it just did not work when I tried it. if you know what it is or how to get it working post it up so everyone else will know too.
I am sure we can get into an interesting discussion in this area since this game has support for some funky keys I have never seen before on keyboards.

If you choose to have use a key to press to have alternate functions for a key you have to tell it to be pressed or depressed for each mapped function or you could find your key doing multiple things.
As an example let's say you want to use the Grey Home key as an alternate, when Home is pressed you want the Space-Bar to fire weapon, and when you only hit Space-Bar it cycles weapons.
You would think all it would take for the mapping would be:

Code: Select all

 weapon_fire {
	+ keyboard	Space
	+ keyboard	GreyHome
}
weapon_cycle {
	+ keyboard	Space
}
But this is incorrect. It will still work in this case, and you may be able to get away with this in other cases too. However if you start getting really exotic you will start finding that things will not work correctly. So for correct syntax, use the following:

Code: Select all

 weapon_fire {
	+ keyboard	Space
	+ keyboard	GreyHome
}
weapon_cycle {
	+ keyboard	Space
	- keyboard	GreyHome
}
You can also assign multiple keys to a function, you may do so by:

Code: Select all

 weapon_fire {
 + keyboard Space
}
weapon_fire {
 + keyboard Tab
}
Attachments
INPUT.JPG
INPUT.JPG (165.4 KiB) Viewed 27016 times
Image
User avatar
Sir MMPD Radick
Clan Nova Captain
Clan Nova Captain
Posts: 1625
Joined: Tue Jan 22, 2008 10:07 am

Re: Cockpit Control Configuration: The Back End

Post by Sir MMPD Radick »

Not bad, moved to the FAQ section. :)
James 3:5-10: My Reminder
And the tongue is a fire, a world of iniquity: so is the tongue among our members, that it defileth the whole body. Out of the same mouth proceedeth blessing and cursing. My brethren, these things ought not so to be.
User avatar
LordNova2
House Steiner Sergeant
House Steiner Sergeant
Posts: 146
Joined: Sun Mar 08, 2009 5:33 pm
Location: Pocahontas, IA USA
Contact:

INPUT.MAP Continued... (Mouse Inputs)

Post by LordNova2 »

INPUT.MAP Continued...

I almost forgot about the inputs for the mouse, so here they are...

Button 1: LeftBtn
Button 2: RightBtn
Button 3: MiddleBtn
Up/Down Axis: Up/Down
Right/Left Axis: Left/Right

So just for an example:

Code: Select all

weapon_fire {
	+ mouse	LeftBtn
}
torso_pan {
	- mouse	Left/Right
}
torso_tilt {
	+ mouse	Up/Down
}
Also note that there is a "-" for the "torso_pan" designator, in this case it is signifying to invert the axis, causing the torso to swivel to the left when you move the mouse to the right.
Image
Ademan
I.S. Baby
Posts: 3
Joined: Sun Aug 05, 2012 10:12 pm

Re: Cockpit Control Configuration: The Back End

Post by Ademan »

I'm happy to report that to my knowledge all keys marked UNKNOWN on the keyboard diagram are accessible as *X where X is the key

I'm successfully using:

Code: Select all

throttle_plus {
	+ keyboard *W
	- keyboard Shift
}

throttle_minus {
	+ keyboard *S
	- keyboard Shift
}

torso_tilt {
   - mouse       Up/Down
}

torso_pan {
   + mouse       Left/Right
}

# Turning, on the keypad arrows
legs_pan_minus {
	+ keyboard	 *A
}

legs_pan_plus {
	+ keyboard	 D
}

jumpjet_enabled {
	+ keyboard	 Space
}
for a rudimentary WASD setup. Note that since D is noted on the keyboard map image, *D does NOT work. I'll be updating this as I go, but it should form an Ok basis for people wanting to play with WASD. I'm going to modify it to be as much like Mechwarrior Online as I can since that's what I'm used to lately.

I discovered this by cracking open a number of files in a hex editor and searching for "GreyArrowUp" since I figured that would be a fairly unique string. I found it in GIDDI/KEYBOARD.DLL and it is surrounded with all valid key names. Other interesting keys are there like *One through *Nine, *Backspace *F1 through *F11 and many more.

Cheers,
Dan

EDIT: Yay internet at my house again!

Code: Select all

*Esc
*One
*Two
*Three
*Four
*Five
*Six
*Seven
*Eight
*Nine
*Zero
Minus
Equal
*Backspace
Tab
*Q
*W
*E
*R
*T
Y
*U
*I
*O
*P
LeftBracket
RightBracket
Enter
LeftControl
*A
*S
D
*F
G
H
J
*K
*L
*Semicolon
*Quote
*BackQuote
LeftShift
*BackSlash
Z
*X
*C
*V
*B
*N
*M
Comma
Period
*Slash
RightShift
GreyStar
LeftAlt
Space
CAPSLock
*F1
*F2
*F3
*F4
*F5
*F6
*F7
*F8
*F9
*F10
NUMLock
ScrollLock
Home
UpArrow
PageUp
GreyMinus
LeftArrow
Keypad5
RightArrow
GreyPlus
End
DownArrow
PageDown
Insert
Delete
SYSREQ
KeypadEnter
LeftBackSlash
*F11
F12
GreySlash
PA1
F13
F14
F15
GreyHome
GreyUpArrow
GreyPageUp
GreyLeftArrow
GreyRightArrow
GreyEnd
GreyDownArrow
GreyPageDown
GreyInsert
GreyDelete
F21
F22
F23
F24
UNNAMED_1
EraseEOF
CopyPlay
RightCtrl
RightAlt
CRSel
EXSel
UNAMED_2
Clear
Shift
Control
Alt

Escape Key
Number One
Number Two
Number Three
Number Four
Number Five
Number Six
Number Seven
Number Eight
Number Nine
Number Zero
Minus (-) Key
Equal (=) Key
Backspace Key
Tab Key
Q Key
W Key
E Key
R Key
T Key
Y Key
U Key
I Key
O Key
P Key
Left Bracket ([) Key
Right Bracket (]) Key
Enter (CR) Key
Left Control Key
A Key
S Key
D Key
F Key
G Key
H Key
J Key
K Key
L Key
Semicolon (;) Key
Quote (") Key
Back Quote (`) Key
Left Shift Key
Back Slash (\) Key
Z Key
X Key
C Key
V Key
B Key
N Key
M Key
Comma (,) Key
Period (.) Key
Slash (/) Key
Right Shift Key
Grey Star (*) Key
Left Alt Key
Spacebar
CAPS Lock Key
F1 Key
F2 Key
F3 Key
F4 Key
F5 Key
F6 Key
F7 Key
F8 Key
F9 Key
F10 Key
NUM Lock Key
Scroll Lock Key
Home Key
Up Arrow Key
Page Up Key
Grey Minus (-) Key
Left Arrow Key
Keypad 5 Key
Right Arrow Key
Grey Plus (+) Key
End Key
Down Arrow Key
Page Down Key
Insert Key
Delete Key
SYSREQ Key
Keypad Enter Key
Left Back Slash () Key
F11 Key
F12 Key
Grey Slash (/) Key
PA1 Key
F13 Key
F14 Key
F15 Key
Grey Home Key
Grey Up Arrow Key
Grey Page Up Key
Grey Left Arrow Key
Grey Right Arrow Key
Grey End Key
Grey Down Arrow Key
Grey Page Down Key
Grey Insert Key
Grey Delete Key
F21 Key
F22 Key
F23 Key
F24 Key
UNNAMED Key
Erase EOF Key
Copy Play Key
Right Control Key
Right Alt Key
CR Sel Key
EX Sel Key
UNAMED_2 Key
Clear Key
Any Shift Key
Any Control Key
Any Alt Key
Note that I have not tried any of the keys with spaces in them, I wonder if they *aren't* part of the table...

EDIT: Erroneously included throttle_0, hadn't tested since that addition apparently.
Post Reply