home *** CD-ROM | disk | FTP | other *** search
/ Hacker 9 / HACKER09.ISO / Games / StarSiege.exe / Starsiege / Docs / Input.txt < prev    next >
Text File  |  1998-07-21  |  15KB  |  343 lines

  1. ----------------------------------------------------------------------------------------------------
  2.                 INPUT MAPPING HELP TEXT
  3. ----------------------------------------------------------------------------------------------------
  4.  
  5. The purpose of this document is explain how to use StarSiege's input mapping utility.
  6. It will allow complete control over how you control your HERC.
  7.  
  8.     SECTIONS:
  9.     
  10.     1. CHANGES
  11.     2. CREATING A CUSTOM KEYMAPPING
  12.     3. USING MAKES AND BREAKS
  13.     4. USING PARAMETERS
  14.     5. LOADING A CUSTOM KEYMAPPING
  15.     6. INPUT
  16.     7. ACTION DEFINITIONS
  17.     8. EXAMPLES
  18.  
  19.  
  20.  
  21.  
  22. 1.  CHANGES
  23. ---------------------------------------------------------------------------------------
  24.  
  25. Since the first ATR, there have been several changes with keymapping.  The syntax has been changed slightly to look 
  26. more like a C function call.  For example, the statement "bindAction keyboard make p TO ACTION_FIRE 1.0" 
  27. now would look like:
  28.  
  29. bindAction( keyboard, make, p, TO, IDACTION_FIRE, 1.0);
  30.  
  31. Note that after each bindAction call, you must include a ";".  This is true in for all *.cs files.
  32. Additionally, almost all previous action tags (e.g.,ACTION_FIRE), have been preserved, 
  33. except now all action tags start with "ID".  
  34.  
  35. Another change is the firing system.  The current system is based around weapon groups and firing chains.
  36. There are 3 weapon groups to which a weapon can belong ( a weapon can belong to multiple groups).  When you fire,
  37. the currently selected weapon group executes in 1 of 2 modes, either Series, or All.  The Series mode will fire all weapons
  38. in the group sequentially, while the All mode fires all weapons in unison.  Additionally you can fire only one particular
  39. weapon by using IDACTION_WEAPON_SELECT.  When this tag is used, you will continue to fire that weapon until you select 
  40. a group.  
  41.  
  42. Weapon Linking and the Alpha Strike feature (bug) have both been removed, as the new weapon system makes them obsolete.  
  43.            
  44. IDACTION_WEAPON_SELECT                 Selects weapon, number selects weapon
  45. IDACTION_WEAPON_GROUP_SELECT           Selects weapon group, numbers range from 0.0 to 2.0           
  46. IDACTION_WEAPON_ADJ                    Cycles through all weapons, number is added to current weapon selection             
  47. IDACTION_WEAPON_GROUP_ADJ              Cycles through weapon groups, number is added to current group selection 
  48. IDACTION_WEAPON_MODE_SELECT            Toggles mode of fire, 0.0 = fire series, 1.0 = fire all
  49. IDACTION_WEAPON_GROUP_TOGGLE           Toggles weapon in/out of selected weapon group, number indicates weapon 
  50.  
  51. The way Starsiege handles joystick hat input has changed also.  The original x, y axes can still be used, but the hat can
  52. also be treated like a set of 4 buttons labeled (upov,dpov,rpov,lpov).  The hat isn't automatically centered.
  53. This means that if you were using the hat to zoom in/out, or some other action that requires a postive and negative value,
  54. include center in the bindAction call.  
  55.  
  56.  
  57. 2. CREATING A CUSTOM KEYMAPPING
  58. ------------------------------------------------------------------------------------------------------
  59.  
  60. The easiest way to get started is to open one of the included keymaps in ..\es3Alpha\keymaps directory,
  61. and use that keymap file as reference.  Once you've modified the file to your liking, 
  62. save the *.cs file in ..\es3Alpha\keymaps directory. 
  63.  
  64. The Keymapping files can be nested, or "included" within each other. In the Joystick.cs file,
  65. the following lines indicate other keymap files that are combined with the joystick.cs
  66. file to create a complete keymap for multiple input devices and functions:
  67.  
  68. #------------------------------------------------------------------------------
  69. # include generic camera controls
  70. exec _defCamera.cs
  71.  
  72.  
  73. #------------------------------------------------------------------------------
  74. # include generic keyboard controls
  75. exec _defKeyboard.cs
  76.  
  77.  
  78. This is done mainly for convenience. If you wish to create a single file that contains 
  79. "everything" you can do so.
  80.  
  81.  
  82. 3. USING MAKES AND BREAKS 
  83. -------------------------------
  84.  
  85. It is crucial to use the "make" and "break" keywords correctly.  When binding input to actions such as
  86. firing, moving, or looking ( actions that should generally occur only when holding down a key or button ), 
  87. use the "make" to initiate the action, and "break" to turn it off.
  88. Example:
  89.  
  90. "bindAction( keyboard, make, space, TO, IDACTION_FIRE, 1.0);"
  91. "bindAction( keyboard, break, space, TO, IDACTION_FIRE 0.0);"
  92.  
  93. The value at the end represents a toggle, where 1.0 is on and 0.0 is off. 
  94.  
  95. 4.  USING PARAMETERS 
  96. --------------------------------
  97.  
  98. Most actions require a value at the end of a binding statement ( see ACTION DEFINITIONS below for more info ). 
  99. There are five additional parameters that you have the option of using.  They are: 
  100.  
  101. flip:        Reverses the coordinate system for the chosen action (ACTION_YAW -1.0 would turn left instead of right)
  102.         Example : "bindAction( joystick, yaxis, TO, IDACTION_LOOK_Y, flip);" 
  103.  
  104. deadzone:    Kills all input that lies within the specified range.
  105.         (e.g.,If you enter 'deadzone 0.1', the deadzone will be 10% of your total axis ).
  106.         Example: "bindAction( joystick, xaxis, TO, IDACTION_YAW, deadzone, 0.1);" 
  107.  
  108. center:        Centers your the coordinate system of your control device from (0.0, 1.0) to (-1.0,1.0)
  109.         Example: "bindAction( joystick, yaxis, TO, IDACTION_SPEED, center);"        
  110.  
  111. square:        Changes the growth rate of constant input (e.g., pulling down on a joystick)from linear to parabolic.
  112.         Example: "bindAction( joystick, yaxis, TO, IDACTION_SPEED, square);"
  113.  
  114. scale:        Scales the sensitivity of an input signal, based on the value you give it.  
  115.         Example:"bindAction( joystick, zaxis, TO, IDACTION_SPEED, scale, 0.2);"
  116.  
  117. Note that it is possible to string five of these parameters onto the end of one action.  For example,
  118. you could enter a line that looked like this: 
  119.  
  120. "bindAction( joystick, yaxis, TO, IDACTION_SPEED, deadzone, 0.2, center, square, scale, 0.1);".
  121.  
  122. This would have the effect of giving a deadzone of 20% in the center the yaxis of your joystick, 
  123. while scaling the input signal by a factor of 0.1. Pushing forward would increase your HERC's forward throttle 
  124. at a parabolic rate, and pulling back would do the same thing, in reverse.
  125.  
  126. 5.  LOADING A CUSTOM KEYMAP FILE
  127. --------------------------------
  128.  
  129. In order to load a custom keymap file, it needs to  be located in the ..\es3Alpha\keymaps directory.
  130. At the Player Setup Menu, click on the Input Configuration field. This will call up a list of the
  131. available KeyMap files.  Highlight the one you want to load. 
  132.  
  133.  
  134. 6.  INPUT
  135. --------------------------------------------------------------------------------------------
  136.  
  137.  
  138. JOYSTICK INPUT( keyword is "joystick" ):
  139.  
  140. "zaxis"            Throttle control
  141. "yaxis"            Up/down 
  142. "xaxis"            Left/right 
  143. "rzaxis"        Twist left right (e.g., sidewinder joysticks)
  144. "rxaxis"        extra input
  145. "ryaxis"        extra input            
  146. "slider0"        extra input
  147. "slider1"        extra input
  148. "xpov"            left/right on joystick hat
  149. "ypov"            up/down on  hat    
  150. "upov"            up direction on hat 
  151. "dpov"            down direction on hat
  152. "rpov"            right direction on hat
  153. "lpov"            left direction on hat
  154.  
  155. "button0"        varies per joystick
  156. "button1"        
  157. "button2"
  158. "button3"         
  159. "button4"        
  160. "button5"
  161. "button6"
  162. "button7"
  163. "button8"
  164. "button9"
  165. "button10"
  166. "button11"
  167. "button12"
  168.  
  169. MOUSE INPUT( keyword is "mouse" ):
  170.  
  171. "xaxis"
  172. "yaxis"
  173. "zaxis"
  174. "button0"
  175. "button1"
  176. "button2"
  177. "button3"
  178.  
  179. KEYBOARD INPUT( keyword is "keyboard" ):
  180.  
  181. Note that key modifiers( alt, shift, control) are supported, 
  182. but the modifier must come before the key (e.g., "shift s").
  183. Any key not listed below is represented by it's direct keyboard character.
  184.  
  185. "escape"      Esc
  186. "backspace"    BackSpace
  187. "tab"        Tab
  188. "enter"        Enter
  189. "control"    Control
  190. "shift"        Shift
  191. "alt"        Alt
  192. "capslock"    Caps Lock    
  193. "numlock"    Num Lock
  194. "numpad1"    Numpad1
  195. "numpad2"    Numpad2
  196. "numpad3"    Numpad3
  197. "numpad4"    Numpad4
  198. "numpad5"    Numpad5
  199. "numpad6"    Numpad6
  200. "numpad7"    Numpad7
  201. "numpad8"     Numpad8
  202. "numpad9"    Numpad9
  203. "numpad0"    Numpad0
  204. "numpad+"       Numpad plus
  205. "numpad-"    Numpad minus
  206. "numpad/"    Numpad slash
  207. "numpad*"       Numpad star
  208. "scroll"    Scroll Lock
  209. "numpadequals"    Numpad Equals
  210. "stop"        Stop
  211. "numpadenter"    Numpad Enter
  212. "numpadcomma"    Numpad Comma
  213. "sysreq"    Print Screen/ Sys Req
  214. "home"        Home
  215. "up"        Up Arrow
  216. "down"        Down Arrow
  217. "left"        Left Arrow
  218. "right"        Right Arrow
  219. "end"        End
  220. "next"        Next
  221. "insert"    Insert
  222. "delete"    Delete
  223. "win"        Windows
  224. "app"        Apps
  225.  
  226.  
  227. 7.  ACTION DEFINITIONS
  228. ------------------------------------------------------------------------------
  229.  
  230. ACTIONS                PARAMETER DEFINITIONS    
  231.  
  232. IDACTION_FIRE                          Fires weapon, 1.0 = true, 0.0 = false            
  233. IDACTION_WEAPON_SELECT                 Selects weapon, number selects weapon
  234. IDACTION_WEAPON_GROUP_SELECT           Selects weapon group, numbers range from 0.0 to 2.0           
  235. IDACTION_WEAPON_ADJ                    Cycles through all weapons, number is added to current weapon selection             
  236. IDACTION_WEAPON_GROUP_ADJ              Cycles through weapon groups, number is added to current group selection 
  237. IDACTION_WEAPON_MODE_SELECT            Toggles mode of fire, 0.0 = fire series, 1.0 = fire all
  238. IDACTION_WEAPON_GROUP_TOGGLE           Toggles weapon in/out of selected weapon group, number indicates weapon            
  239.  
  240. IDACTION_REACTOR                       Toggles reactor, no number required            
  241.  
  242. IDACTION_LOOK_X                        Looks left/right, -1.0 = left, 1.0 = right            
  243. IDACTION_LOOK_Y                        Looks up/down, -1.0 = down, 1.0 = up          
  244. IDACTION_LOOK_CENTER                   Look center, No number required            
  245.  
  246. IDACTION_MOVE_X                        Move left/right, -1.0 = left, 1.0 = right            
  247. IDACTION_MOVE_Y                        Move forward/backward, 1.0 = forward, 1.0 = back            
  248. IDACTION_MOVE_Z                        Move up/down, -1.0 = down, 1.0 = up             
  249.  
  250. IDACTION_PITCH                         Pitch rotation             
  251. IDACTION_YAW                           Yaw rotation            
  252. IDACTION_ROLL                          Roll rotation            
  253.  
  254. IDACTION_STOP                          Stops HERC, no Number needed            
  255. IDACTION_SPEED                         Speed, 1.0 = positive acceleration, -1.0 = negative acceleration           
  256. IDACTION_TURBO                         Toggles turbo mode            
  257.  
  258. IDACTION_CROUCH                        Toggle Crouch, no number needed            
  259. IDACTION_CAMOUFLAGE                    Toggle Camouflage, no number needed            
  260.  
  261. IDACTION_TARGET_ADJ_ENEMY              next/prev enemy target, -1.0 = cycle back, 1.0 = cycle forward
  262. IDACTION_TARGET_ADJ_FRIENDLY           next/prev friendly, -1.0 = cycles back, 1.0 = cycles forward
  263. IDACTION_TARGET_CLOSEST_ENEMY            targets closest enemy, no number needed
  264. IDACTION_TARGET_CLOSEST_FRIENDLY         targets closest friendly, no number needed
  265. IDACTION_TARGET_SELECTED               targets object currently under aiming reticle, no number needed
  266.  
  267. IDACTION_USE_PROJECTILE_CAM            Sets projectile cam for next shot 
  268.  
  269. IDACTION_SENSOR_MODE_TOGGLE            Toggles between active and passive radar, no number needed
  270. IDACTION_SENSOR_RANGE_TOGGLE           Cycles through ranges, no number needed
  271. IDACTION_SENSOR_RANGE_SET              Sets range, number indicates something
  272.  
  273. IDACTION_SHIELD                        Toggles Shield on/off, no number needed
  274. IDACTION_SHIELD_TRACK                  Shield tracking on/off, no number needed
  275. IDACTION_SHIELD_FOCUS_ADJ              Adjusts shield balance, number is added to current shield focus
  276. IDACTION_SHIELD_FOCUS_SET              Set shield balance, number sets shield focus
  277. IDACTION_SHIELD_ROTATION_ADJ           Adjusts shield rotation, number is added to current shield rotation
  278. IDACTION_SHIELD_ROTATION_SET           Set shield rotation, number sets shield rotation
  279.  
  280. IDACTION_NAVPOINT_NEXT                 Selects next navpoint, no number needed
  281. IDACTION_NAVPOINT_PREV                 Selects previous navpoint, no number needed
  282. IDACTION_NAVPOINT_SET                  Selects navpoint, number indicates which navpoint is selected
  283.  
  284. IDACTION_DAMAGE_ROTATE                 Toggles HUD damage indicator rotation
  285. IDACTION_DAMAGE_ANIMATE                Toggles HUD damaga indicator animation
  286.  
  287. IDACTION_NEXT                          Selects next HERC while in OrbitCam
  288. IDACTION_PREV                          Selects previous HERC while in OrbitCam
  289.  
  290. IDACTION_REVERSE_THROTTLE              Toggle forward/reverse throttle
  291.  
  292. IDACTION_ZOOM_SET                      Set zoom factor, number indicates zoom factor
  293. IDACTION_ZOOM_ADJ                      Adjust zoom factor, number is added to current zoom factor
  294. IDACTION_CENTER_TURRET                 Centers Turret 
  295. IDACTION_CENTER_BODY                   Centers Body
  296.  
  297. IDACTION_AUTOTARGET                    Autotargets enemy, no number needed   
  298.  
  299.  
  300. 8.  EXAMPLES
  301. -----------------------------------------------------------------------------------
  302. These examples are some of the more commonly asked questions about creating a custom keymapping:
  303.  
  304. Q: How do I use my joystick axis to look?
  305.  
  306. A: bindAction( joystick, xaxis, TO, IDACTION_LOOK_X, deadzone, 0.1, center, square);
  307.    bindAction( joystick, yaxis, TO, IDACTION_LOOK_Y, deadzone, 0.1, center, square);
  308.    
  309.  
  310. Q: How do I use the joystick hat to look?
  311.  
  312. A: bindAction( joystick, xpov, TO, IDACTION_LOOK_X, center, flip);
  313.    bindAction( joystick, ypov, TO, IDACTION_LOOK_Y, center); 
  314.  
  315.  
  316. Q: How do I reconfigure the throttle ?
  317.  
  318. A: It depends on which device you want to use as input.  For keyboard, you might want something like this:
  319.         
  320.     bindAction( keyboard, make, up, TO, IDACTION_SPEED, +1.0);
  321.     bindAction( keyboard, break, up, TO, IDACTION_SPEED,  0.0);
  322.  
  323.    For joystick zaxis ( throttle ):
  324.    
  325.     bindAction (joystick, zaxis, TO, IDACTION_SPEED, deadzone, 0.1, center, square);
  326.  
  327.  
  328. Q: When I look with my mouse/ joystick/ keyboard, the HERC response seems backwards.  How do I fix this ?
  329.     
  330. A: Simply add the flip parameter at the end of the appropriate action in your custom keymap file.
  331.    If flip is already there, remove it. This will flip the response of your HERC.
  332.  
  333.  
  334. Q: I added a keyboard command, but it dosn't seem to work. What's the deal?
  335.  
  336. A: Make sure you typed 'make' or 'break' before the specific key you wanted to bind.  Otherwise nothing will happen.
  337.    Also, key combinations involving more than two keys will not work.
  338.  
  339.  
  340. Q: Whenever I try to use the joystick hat, my HERC fires or does some other incorrect action.
  341.  
  342. A: Most likely you need to recalibrate your joystick.  To do this, select Start menu/settings/control panel/Game Controllers. 
  343.    and calibrate.