PDA

View Full Version : CoD keybinding issue #1



BuddhaMan
03-08-2005, 07:17 PM
This article assumes you know how to view file extensions in WinXP. If you don't, you need to turn it on before going further so ask myself, Ronin, Artis, etc in Vent and we'll guide you thru it.

This is going to consist of two parts...coming up with our bind, and getting it into a file that will execute when the game starts. Hex complained that the game engine will overwrite some of his binds if he edits the config_mp.cfg file. I'll show you how to overcome this if it happens to you (the way with the least pain).

Sasha asked me for help in getting a certain key on the keyboard to be bound to a certain action in the game. In this case, she wants the numpad #4 key to be "switch to the secondary weapon". The #4 on the keypad is refered to by the game engine as "KP_LEFTARROW" and the game engine command to switch to your secondary weapon is "weaponslot primaryb". Putting these together we get our bind command:


bind KP_LEFTARROW "weaponslot primaryb"

Now, how to execute this when the game launches if the game engine keeps rewriting your config_mp.cfg file....

Bring up Windows Explorer and navigate to your ..\Program Files\Call of Duty\Main folder. Right click in any open area (not on any text) and select New --> Text Document. Open that file up with notepad and paste our bind command from above in there. Save it and close it out. Now, rename the file to autoexec.cfg. Say "yes" when explorer complains about you changing the file extension. This is a special file that automagically executes wheny oyu start the game and has been around since Quake 1 (I think). It's often used to execute other .cfg files.

That's it! Now when you start the game the #4 on the keypad will switch to your secondary weapon.

If anyone else has config questions about binding keys and the like, just ask me on Vent. I've bee doing this stuff since Quake 1.