Main Menu

Configuring Joystick and Wingman Controllers for Gold Source Games

What are all the HL commands for Joystick and Wingman controllers?

Enable use of joysticks or gamepads by checking the joystick box in the Configuration/Controls/Advanced controls menu. Joystick and gamepad buttons can then be configured through the Configuration/Controls menu.

Valve thanks James Barnes at First-Person Gaming, Inc. for permission to use his excellent documentation on joystick support.

Half-Life supports standard joysticks, digital joysticks and advanced controllers like the FPgaming Assassin 3D, the Logitech WingMan Warrior and the SpaceTec IMC SpaceOrb.

To enable Half-Life joystick support, verify that your joystick or game controller is selected in the Joystick control panel applet and has been calibrated and tested, then launch Half-Life. Check the joystick box in the Configuration/Controls/Advanced controls menu of Half-Life.

For advanced controllers, you must have a configuration file called joystick.cfg. Typically this configuration file should be obtained from your game controller company. However you can create your own and place this file in the Valve subdirectory of your Half-Life directory.  Half-Life will automatically execute this configuration file each time you start the game.

The configuration files for common game controllers are included below.

Half-Life Joystick functionality

  • Proportional movement (the farther you move the stick, the faster you move)
  • Support for up to 32 buttons (JOY1-JOY4 and AUX5-AUX32)
  • Sensitivity setting for each control (allows tuning and inverting the control direction)
  • Dead-zone setting for each control
  • Support for all 6 axes (X, Y, Z, R, U, V)
  • Mapping of any axis to any control (Forward, Look, Side, Turn)
  • Support for absolute controls (like joysticks) and relative controls (like trackballs and spinners)

The default joystick setting is for joystick left/right movement to control turning and for joystick forward/backward movement to control moving forward/backward. To control strafing, assign the 'strafe modifier' to one of your joystick buttons (via the Configuration/Controls menu). To control joystick looking, assign the 'Joystick look modifier' to one of your joystick buttons (also via the Configuration/Controls menu).

'Reverse mouse' in the Configuration/Controls/Advanced controls menu also changes the direction the joystick has to move when looking up and down.

The following variables can be set in your joystick.cfg.

Sensitivity Settings

Joyforwardsensitivity

Controls the ramp-up speed or how much joystick movement is required for moving "full speed" forward and backward
Default: -1.0
Comments: If your joystick is not as fast as you think it should be try a setting of -1.5, you will reach full speed with only half of the movement.

Joysidesensitivity

Controls the ramp-up speed or how much joystick movement is required for moving "full speed" side to side
Default: 1.0
Comments: If your joystick is not as fast as you think it should be try a setting of 1.5, you will reach full speed with only half of the movement.

Joypitchsensitivity

Controls the speed or ratio used when you look up and down using the Assassin 3D
Default: -0.25
Comments: This setting will allow you to look Up and Down at a 45 degree angle without repositioning your hand.

Joyyawsensitivity

Controls the speed that or ratio used when you look left to right using the Assassin 3D
Default: -0.5
Comments: This setting will allow you to look left and right at a 90 degree angle without repositioning your hand.

Note:

You can set the sensitivity settings to negative numbers. This inverts the direction of movement for the control. The default sensitivity settings are 1 (or -1).

Threshold Settings

Joyforwardthreshold

Controls the dead-zone for moving forward and backward
Default: 0.15
Comments: If you have problems with your character moving forward or back when trying to stop or strafe, increase this number to .20

Joysidethreshold

Controls the dead-zone for moving side to side
Default: 0.15
Comments: If you have problems with your character moving left or right when trying to stop or walk a ledge, increase this number to .20

Joypitchthreshold

Controls the dead-zone for looking up and down
Default: 0.15

Joyyawthreshold

Controls the dead-zone for looking left and right
Default: 0.15

The threshold settings allow you to control your dead-zone (or no-movement zone). The default threshold settings are .15 (meaning 15% of the full-range). The range of the threshold settings is from 0 to 1. Troublesome analog joysticks may need a larger number (like .2). Premium joysticks can use a smaller number (like .1).

If your joystick has a POV hat, the buttons are mapped to AUX29-AUX32. So, you get 8 buttons with the Logitech WingMan Extreme, 12 buttons with the Microsoft SideWinder 3D Pro, etc.

Axis Mapping

Joyadvaxisx

Controls mapping of DirectInput axis X (typically joystick left and right)
Default: 3
Comments: Allows the joystick to turn.

Joyadvaxisy

Controls mapping of DirectInput axis Y (typically joystick forward and backward)
Default: 1
Comments: Allows the joystick to move forward and backward. 

Joyadvaxisz

Controls mapping of DirectInput axis Z (typically joystick throttle)
Default: 0
Comments: Not used.

Joyadvaxisr

Controls mapping of DirectInput axis R (typically joystick rudder)
Default: 0
Comments: Not used.

Joyadvaxisu

Controls mapping of DirectInput axis U (custom axis - Assassin 3D trackball left and right, WingMan Warrior SpinControl and SpaceOrb roll)
Default: 20
Comments: Sets the Assassin 3D to relative turning left and right. (Not self centering)

Joyadvaxisv

Controls mapping of DirectInput axis V (custom axis - Assassin 3D trackball forward and backward and SpaceOrb yaw)
Default: 18
Comments: Sets the Assassin 3D to relative free-look up and down. (Not self centering)

JOYADVAXIS Setting Options

Each joyadvaxis variable can be set to the following controls:

  • 0 = Axis not used
  • 1 = Axis is for forward and backward movement
  • 2 = Axis is for looking up and down (pitch)
  • 3 = Axis is for side to side movement
  • 4 = Axis is for turning left and right (yaw)

Relative Axis Controls

Each axis can be designated as an absolute axis (like a joystick) or a relative axis (like the FPgaming trackball or the WingMan Warrior SpinControl). Absolute axes are defined as having a stopping position whereas relative axes don't have a stopping position and just go around and around. To designate an axis as a relative axis, add 16 to the above control number. For example, to set the Assassin 3D's axis U to be looking left and right, type joyadvaxisu 20. As another example, to make your rudder pedals control turning left and right, type joyadvaxisr 4. It's a bit complicated, but only needs to be done once.

The advanced axes variables will not have any effect until joyadvanced is set to 1.0. Additionally, any changes to the axes will not take effect until the joyadvancedupdate command is executed. So, the procedure for creating an advanced mapping is:

  1. Set joyadvanced 1
  2. Make any desired mapping changes
  3. Make any desired sensitivity changes
  4. Make any desired threshold changes
  5. Call joyadvancedupdate

Here is the configuration file for the FPgaming Assassin 3D:
// Revision 1.0
joyname "FPgaming Assassin 3D"
joyadvanced 1
joyadvaxisx 3
joyadvaxisy 1
joyadvaxisz 0
joyadvaxisr 0
joyadvaxisu 20
joyadvaxisv 18
joyforwardsensitivity -1.0
joysidesensitivity 1.0
joypitchsensitivity -0.25
joyyawsensitivity -0.5
joyforwardthreshold 0.15
joysidethreshold 0.15
joyyawthreshold 0.0
joypitchthreshold 0.0
+mlook
joyadvancedupdate


Here is a configuration file for the Logitech WingMan Warrior:
// Revision 0.1 -- refer to www.logitech.com for updates
joyname "Logitech WingMan Warrior"
joyadvanced 1.0
joywwhack1 1.0
joywwhack2 1.0
joyadvaxisx 3
joyadvaxisy 1
joyadvaxisz 0
joyadvaxisr 0
joyadvaxisu 20
joyadvaxisv 0
joyforwardsensitivity -1.0
joysidesensitivity 1.0
joypitchsensitivity 0.0
joyyawsensitivity -0.6
joyforwardthreshold 0.15
joysidethreshold 0.15
joypitchthreshold 0.0
joyyawthreshold 0.0
joyadvancedupdate


Here is a config file for the SpaceTec IMC SpaceOrb:
// Revision 0.1
joyname "SpaceTec IMC SpaceOrb"
joyadvanced 1.0
joyadvaxisx 3
joyadvaxisy 1
joyadvaxisz 0
joyadvaxisr 2
joyadvaxisu 0
joyadvaxisv 4
joyforwardsensitivity -1.0
joysidesensitivity 1.0
joypitchsensitivity -0.5
joyyawsensitivity 1
joyforwardthreshold 0.1
joysidethreshold 0.1
joypitchthreshold 0.1
joyyawthreshold 0.1
+mlook
joyadvancedupdate


Here is a config file for making your joystick operate looking around and strafing, your rudder pedals control turning left and right and throttle control moving forward and backward:

joyname "Joystick, Rudder & Throttle"
joyadvanced 1.0
joyadvaxisx 3
joyadvaxisy 2
joyadvaxisz 1
joyadvaxisr 4
joyadvaxisu 0
joyadvaxisv 0
joyforwardsensitivity -1.0
joysidesensitivity -1.0
joypitchsensitivity 1.0
joyyawsensitivity -1.0
joyforwardthreshold 0.15
joysidethreshold 0.15
joyyawthreshold 0.15
joypitchthreshold 0.15
joyadvancedupdate

Additional Wingman Controls

There are two variables which enable special response curves tuned for the Logitech Wingman Warrior joystick. joywwhack1 fixes a centering problem. joywwhack2 fixes an "out of control" spin problem when using the joystick to turn or look left/right.

 

See the Wingman Warrior configuration above for an example of how to use these in your joystick.cfg.
 

Problem with Steam?

Contact Steam Support