Okay, now i will once again share my findings with that whole foray into sliding reenabling. The following is what i know thus far.
NOTE: Most things which only have one [ starting bracket were supposed to have an end bracket but TLR's forum seems to cut off all my closing brackets
First up: KEYLIST.INI structure.
Keylist.ini is separated into three distinct groups. They are Group Number 0 (SHIP CONTROLS), Group Number 1 (USER INTERFACE) and Group Number 2 (MULTIPLAYER). The commands represent bindable commands in Freelancer's Control Options Panel. If a command is in one of these groups, it is bindable. Plain and simple.
You will find [key followed by id = <command>. The <command> that is shown, like below, enables binding of that key in the Control Options panel. Basically, if your binding isn't in KEYLIST.INI, it will not show up in Freelancer's Control Options. The following example is from the MULTIPLAYER section, or group_num = 2.
<pre><font size=1 face=Courier>
[key
id = USER_CHAT
[key
id = USER_CHAT_WINDOW
[key
id = USER_GROUP_WINDOW
[key
id = USER_GROUP_INVITE
[key
id = USER_TRADE_REQUEST
</font></pre>
The above represent the five key binds you will see in the MULTIPLAYER section of your CONTROLS options in Freelancer.
That's it for KEYLIST.INI.
------------
Now we turn to the big one: KEYMAP.INI. This one is the true driving force behind every single command in Freelancer, from simply clicking a button onscreen, to being able to hit Y or N instead of clicking YES or NO on a Y/N dialog box.
Keymap.ini has two distinct sections to it.
First, there is a slew of [KeyCmd sections that all represent a specific freelancer action. They all have a special structure I will now explain.
<pre><font size=1 face=Courier>
[KeyCmd
nickname = USER_REMAPPABLE_LEFT
ids_name = 1950
ids_info = 3201
state = keydown, keyup
</font></pre>
The above information is rather confusing, even to myself. I had to figure out their functions by pure trial and error.
It is still unclear whether the NICKNAME refers to something listed in KEYLIST.INI, or if it refers to a listing in the actual EXE itself.
------------ nickname
In any case, I am certain that the nickname must equal the action desired by its exact name.
------------ ids_name and ids_info - introduction
IDS_NAME and IDS_INFO correspond directly to DLL String Table Resource Numbers in Freelancer's RESOURCES.DLL. You can find appropriate resource numbers by searching the DLL with Resource Hacker, a DLL resource viewer/editor.
In this case, ids_name = 1950, so finding it in Resource Hacker it is in Resource Folder 122:
<pre><font size=1 face=Courier>
STRINGTABLE
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
1950, "TURN LEFT" <------------ There it is.
1951, "TURN RIGHT"
}
</font></pre>
And ids_info = 3201, so using Resource Hacker, looking for the correct resource, I find it in Folder 201:
<pre><font size=1 face=Courier>
STRINGTABLE
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
3200, "Opens the Neural Net."
3201, "Turns the ship left." <------------ There it is.
</font></pre>
(...rest of stringtable omitted to save space...)
------------ ids_name
IDS_NAME is actually what you see in Freelancer's CONTROLS OPTIONS window. KeyList.ini, as described above, determines the positioning and the grouping of the binding list, however, the IDS_INFO in KeyMap.ini determines the text that you will see for that item.
------------ ids_info
IDS_INFO is the onscreen help tooltip that appears when you mouseover the relevant command in the key bindings in CONTROLS OPTIONS ingame. I dont think it is necessarily needed, but it's good to have it referenced for completeness' sake.
------------ state
....Now we come to this "State" entry. "State", as far as I have figured out, is designed to tell Freelancer whether the key is a one-time-push key or whether it can be held down for extended periods of time.
VALID STATE FLAGS:
keydown
Indicates that the action will be started upon keypress. This is used for toggle buttons and other ingame functions that are not "constant actions", like turning on and off the nav-map display and engaging the cruise drive.
keyup
Indicates that the action will begin upon keypress and cease upon the release of the key. Keyup is always found after keydown. Besides, without keydown, I don't think you can even initiate the action at all.
shift_ignore
All commands are "SHIFT-sensitive" by default. If the command specifically requires that SHIFT be held with another key, then releasing SHIFT for a command with state = keydown, keyup will cause the command to no longer be active. Likewise, if the command does not specifically require SHIFT to be held, and you hold SHIFT along with the other key, then it will not work. The state flag shift_ignore removes the sensitivity and causes a command to function regardless of whether or not the user is holding the SHIFT key.
repeat
I am pretty sure that repeat causes whatever action was started to repeat itself if the key is continued to be held down. In other words, it seems to be an alternative version of the keydown, keyup combo. Repeat, however, is only used on certain types of commands, which leads me to believe that those commands require them. An example is USER_FIRE_WEAPON9, which by default is the 9 key and fires whatever weapon is in Slot 9 as long as you hold the 9 key down. However, it is different from USER_FIRE_WEAPONS in that USER_FIRE_WEAPONS uses the keydown, keyup combination and USER_FIRE_WEAPON9 uses keydown, repeat instead. I am not entirely sure why keydown, repeat is used instead, but my best guess is that keydown, keyup is used for "creating a specific status" with regards to what the ship is doing (e.g. turning), and keydown, repeat is used for doing a specific singular action (firing a weapon) repeat-edly. Basically I assume that keydown, repeat is used for an action that is designed to occur at specific intervals while the key is held down, whereas keydown, keyup is used for continuous action.
However, there is an anomaly: USER_THRUST, whatever it is, has multiple keys listed on it and has a keydown, keyup, AND repeat combination (!!!). If someone can get the keycodes for these keys below, 37, 38, 39 and 40, I would appreciate it, as they could shed light as to what the heck USER_THRUST is, and thus, what Repeat does when combined with keydown and keyup.
<pre><font size=1 face=Courier>
[KeyCmd
nickname = USER_THRUST
state = keydown, keyup, repeat
key = 37, SHIFT
key = 38, SHIFT
key = 39, SHIFT
key = 40, SHIFT
</font></pre>
------------ key
The Key section is NOT necessarily needed if the key is going to be mapped in the CONTROLS OPTIONS panel by the end user, in which case the following information isn't necessary. If they are included even though they can be remapped, then the included one designates the default binding that Freelancer will use if the user doesn't specify one. The key is either represented by a keyboard keycode, or as an actual keyboard character in quotation marks. The format is as follows:
<pre><font size=1 face=Courier>
key = {keycode}{, modifier}
</font></pre>
{keycode} above can be either a numeric keycode representing a specific key on the keyboard, or, a specific key represented by quotation marks surrounding a character, e.g. "W".
{, modifier} is not needed, especially if the action is set as SHIFT_IGNORE in its STATE flags. There are keyboard modifiers: SHIFT, ALT, and CONTROL. When one of them are included in the key designation, the action will require the use of that modifier in addition to the designated key, EXCEPT if SHIFT_IGNORE is in the action's STATE flags. However, I have not tested whether or not shift_ignore affects ALT and CONTROL modifiers in addition to SHIFT.
Examples:
<pre><font size=1 face=Courier>key = "W", SHIFT </font></pre>
Used for cruise drive activation.
<pre><font size=1 face=Courier>key = 13 </font></pre>
Used for the ENTER key, a.k.a. the chat key.
You may notice that some commands do not have keys, or even IDS_NAME's or IDS_INFO's. The reason is that those commands are either keys that you are not supposed to be able to use, OR, they are commands representing clicked commands, commands you use by clicking icons or buttons with your mouse.
------------------------------------------------
Now, we're not done yet! Oh no, we are nowhere near done yet. The second part of Keymap.ini is VERY important. It dictates valid locations to use various commands! You can't activate your cruise drive when you're on a base, can you? It tells you what you can use in each part of Freelancer.
First, the different location divisions are designated by the nickname of each group of valid commands. The groups are named as follows:
[KeyMap
nickname = IDR_ALWAYS_PRESENT
^---- These commands are, always present. You can use them ANYWHERE. On bases, in space, no matter what, these commands work. These include things like your nav map, your stats card, your mission log, your information button, and the good ol' CHAT button.
[KeyMap
nickname = IDR_GAMEFLOW
^---- There is nothing by default in KeyMap.ini inside the IDR_GAMEFLOW keymap group. This could mean that it is no longer used, that it is a debug group, or that it is really a master group that others are contained in. In any event, in most cases you needn't worry about this group.
[KeyMap
nickname = IDR_SPACE
^---- As the name implies, this designates commands that you can always use while sailing through space, whether in cockpit or chasecam/turret views.
[KeyMap
nickname = IDR_COCKPIT
^---- The commands in IDR_COCKPIT are specific to, well, cockpit view. They don't work anywhere else...although they all seem to work in the chase cam view.
[KeyMap
nickname = IDR_CHASECAM
^---- This one is somewhat confusing, as chase cam view ingame DOES allow most of the commands usable in cockpit view. I am pretty certain that IDR_CHASECAM doesnt mean the chase cam we know, but in reality means the turret view, which has many restrictions on what you can do with your ship. I am still trying to figure out the true purpose of IDR_CHASECAM.
------------------------------------------------
Note on DBG Commands: Debug commands are not generally usable in the final game, the ONLY exception seems to be be an unbindable "Fire Forward" debug command, and I am not quite certain whether it is DBG_FIRE_FORWARD or USER_FIRE_FORWARD. The action itself is activated by the " key, adjacent to the left of the enter key on standard keyboards:
<pre><font size=1 face=Courier>
[KeyCmd
nickname = DBG_FIRE_FORWARD
state = keydown
key = 32
</font></pre>
I checked the EXE itself for any references to DBG commands but came up completely dry. It would appear that the KeyMap.ini references to Debug Commands are in fact hangovers from beta testing and are actually useless in the final game...but I'm not entirely sure, especially because of the existence of the above Fire Forward key.
------------------------------------------------
FINAL PART: FULL LIST OF ALL FREELANCER COMMANDS THAT ARE ACTUALLY REFERENCED IN THE EXECUTABLE - If the command you want to use is not listed here, it is highly improbable that it will work!!!
------------------------------------------------
<pre><font size=1 face=Courier>
USER_SCREEN_SHOT
USER_TRADE_REQUEST
USER_GROUP_INVITE
USER_TURN_SHIP
USER_FIRE_WEAPONS
USER_MANEUVER_FREE_FLIGHT
USER_EXIT_GAME
USER_PREV_OBJECT
USER_NEXT_OBJECT
USER_TURN
USER_LAUNCH_CRUISE_DISRUPTORS
USER_LAUNCH_TORPEDOS
USER_AUTO_TURRET
USER_LAUNCH_COUNTERMEASURES
USER_LAUNCH_MINES
USER_LAUNCH_MISSILES
USER_FIRE_FORWARD
USER_REMAPPABLE_DOWN
USER_REMAPPABLE_UP
USER_REMAPPABLE_RIGHT
USER_REMAPPABLE_LEFT
USER_ASSIGN_WEAPON_GROUP6
USER_ASSIGN_WEAPON_GROUP5
USER_ASSIGN_WEAPON_GROUP4
USER_ASSIGN_WEAPON_GROUP3
USER_ASSIGN_WEAPON_GROUP2
USER_ASSIGN_WEAPON_GROUP1
USER_FIRE_WEAPON_GROUP6
USER_FIRE_WEAPON_GROUP5
USER_FIRE_WEAPON_GROUP4
USER_FIRE_WEAPON_GROUP3
USER_FIRE_WEAPON_GROUP2
USER_FIRE_WEAPON_GROUP1
USER_FIRE_WEAPON10
USER_FIRE_WEAPON9
USER_FIRE_WEAPON8
USER_FIRE_WEAPON7
USER_FIRE_WEAPON6
USER_FIRE_WEAPON5
USER_FIRE_WEAPON4
USER_FIRE_WEAPON3
USER_FIRE_WEAPON2
USER_FIRE_WEAPON1
USER_TOGGLE_WEAPON10
USER_TOGGLE_WEAPON9
USER_TOGGLE_WEAPON8
USER_TOGGLE_WEAPON7
USER_TOGGLE_WEAPON6
USER_TOGGLE_WEAPON5
USER_TOGGLE_WEAPON4
USER_TOGGLE_WEAPON3
USER_TOGGLE_WEAPON2
USER_TOGGLE_WEAPON1
USER_WEAPON_GROUP6
USER_WEAPON_GROUP5
USER_WEAPON_GROUP4
USER_WEAPON_GROUP3
USER_WEAPON_GROUP2
USER_WEAPON_GROUP1
USER_REPAIR_SHIELD
USER_REPAIR_HEALTH
USER_CLOAK
USER_STEALTH
USER_JAMMER
USER_TRACTOR_BEAM
USER_SCAN_CARGO
USER_ACTIVATE_MANEUVER
USER_MANEUVER_SLIDE_EVADE_DOWN
USER_MANEUVER_SLIDE_EVADE_UP
USER_MANEUVER_SLIDE_EVADE_RIGHT
USER_MANEUVER_SLIDE_EVADE_LEFT
USER_MANEUVER_SLIDE_EVADE
USER_MANEUVER_CORKSCREW_EVADE
USER_MANEUVER_TRAIL_FARTHER
USER_MANEUVER_TRAIL_CLOSER
USER_MANEUVER_STRAFE
USER_MANEUVER_FORMATION
USER_MANEUVER_DRASTIC_EVADE
USER_MANEUVER_TRADE_LANE
USER_MANEUVER_CRUISE
USER_MANEUVER_FACE
USER_MANEUVER_GOTO
USER_MANEUVER_DOCK
USER_MANEUVER_BRAKE_REVERSE
USER_MANEUVER_ENGINEKILL
USER_MANEUVER_EVADE
USER_MANEUVER_AFTERBURNER
USER_MANEUVER_TRAIL
USER_MANEUVER_WINDOW
USER_SET_MANEUVER_DIRECTION
USER_MANEUVER
USER_ACTIONS
USER_COLLECT_LOOT
USER_DISPLAY_LAST_OBJECTIVE
USER_MINIMIZE_HUD
NN_TOGGLE_OPEN
USER_INVENTORY_CLOSE
USER_HELP
USER_GROUP_WINDOW
USER_CHAT_WINDOW
USER_STORY_STAR
USER_INVENTORY
USER_PLAYER_STATS
USER_NAVMAP
USER_NAV_MAP
USER_NN
USER_TOGGLE_MAINFRAME
USER_STATUS_MODE
USER_TARGET
USER_STATUS
USER_CHAT
USER_RADIO
USER_RADAR_ZOOM_OUT
USER_RADAR_ZOOM_IN
USER_FORMATION_LIST
USER_SWITCH_TO_TARGET
USER_SWITCH_TO_WEAPON_LIST
USER_SWITCH_TO_PLAYER_SHIP
USER_RADAR_ZOOM
USER_CONTACT_LIST
USER_RADAR
USER_THROTTLE_100
USER_THROTTLE_90
USER_THROTTLE_80
USER_THROTTLE_75
USER_THROTTLE_70
USER_THROTTLE_60
USER_THROTTLE_50
USER_THROTTLE_40
USER_THROTTLE_30
USER_THROTTLE_25
USER_THROTTLE_20
USER_THROTTLE_10
USER_THROTTLE_0
USER_CRUISE
USER_DEC_THROTTLE
USER_INC_THROTTLE
USER_SET_THROTTLE
USER_ENGINE_TOGGLE
USER_WARP
USER_TOGGLE_LEVEL_CAMERA
USER_TOGGLE_AUTO_LEVEL
USER_TOGGLE_AUTO_AVOIDANCE
USER_AFTERBURN_ON
USER_AFTERBURN_OFF
USER_AFTERBURN
USER_REARVIEW_CAMERA_MODE_OFF
USER_REARVIEW_CAMERA_MODE
USER_CHASE_CAMERA_MODE
USER_LOOK_ROTATE_CAMERA_RESET
USER_LOOK_ROTATE_CAMERA_DOWN
USER_LOOK_ROTATE_CAMERA_UP
USER_LOOK_ROTATE_CAMERA_RIGHT
USER_LOOK_ROTATE_CAMERA_LEFT
USER_COCKPIT_CAMERA_MODE
USER_VIEW_RESET
USER_Z_UNROTATE
USER_Z_ROTATE
USER_Y_UNROTATE
USER_Y_ROTATE
USER_X_UNROTATE
USER_X_ROTATE
USER_ZOOM_TOGGLE
USER_ZOOM_OUT
USER_ZOOM_IN
USER_CLOSEST_ENEMY
USER_PREV_ENEMY
USER_NEXT_ENEMY
USER_CLEAR_TARGET
USER_PREV_SUBTARGET
USER_NEXT_SUBTARGET
USER_PREV_WEAPON_SUBTARGET
USER_NEXT_WEAPON_SUBTARGET
USER_PREV_TARGET
USER_NEXT_TARGET
USER_SET_TARGET
USER_PREV_ITEM
USER_NEXT_ITEM
USER_ACTIVATE_ITEM
USER_USE_ITEM
USER_FULLSCREEN
USER_SAVE_GAME
USER_RESET
USER_PAUSE
USER_YES
USER_NO
USER_ENTER
USER_STACKABLE_CANCEL
USER_CANCEL
USER_EVENTS
USER_BUTTON7
USER_BUTTON6
USER_BUTTON5
USER_BUTTON4
USER_BUTTON3
USER_BUTTON2
USER_BUTTON1
USER_BUTTON0
USER_MOVE
USER_WHEEL
USER_BUTTON
USER_CHAR
USER_KEY
USER_NONE
------------------------------------------------
</font></pre>
Hope this helps you, Aegir.
----- Gregster2K/LordSolarix/g.men/SolarixEclipse
Edited by - Gregstar2k on 7/12/2004 7:04:39 PM