The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Razorback on June 18, 2005, 04:12:00 am



Title: Start using my joystick!
Post by: Razorback on June 18, 2005, 04:12:00 am
Been playing single player with a joypad just fine, but when I recently picked up a 2nd controller for pvp action, it's not so simple.  I tried cut-and-pasting the two blocks of joypad command lines in keys.cfg. Then I changed the player-1 values to player-2, and they joystick values from 0 to 1, but it won't even load the game set up like that.  Any suggestions?

EDIT:  Adding in my joystick command lines as they currently are.

# joystick 0 threshold 10000   # How far to move before it counts; 0-30000
Menu-Left: joystick 0 axis 0 negative
Player-1-Left: joystick 0 axis 0 negative
Lander-Left: joystick 0 axis 0 negative
Menu-Right: joystick 0 axis 0 positive
Player-1-Right: joystick 0 axis 0 positive
Lander-Right: joystick 0 axis 0 positive
Menu-Up: joystick 0 axis 1 negative
Player-1-Thrust: joystick 0 axis 1 negative
Lander-Thrust: joystick 0 axis 1 negative
Menu-Down: joystick 0 axis 1 positive
Menu-Cancel: joystick 0 button 0
Player-1-Special: joystick 0 button 1
Menu-Select: joystick 0 button 2
Player-1-Weapon: joystick 0 button 2
Lander-Weapon: joystick 0 button 2
Menu-Page-Up: joystick 0 button 4
Menu-Page-Down: joystick 0 button 6
Menu-Zoom-In: joystick 0 button 5
Player-1-Escape: joystick 0 button 3
Lander-Escape: joystick 0 button 3
Menu-Zoom-Out: joystick 0 button 7

#  And now the POV hat controls.
Menu-Left: joystick 0 hat 0 left
Player-1-Left: joystick 0 hat 0 left
Lander-Left: joystick 0 hat 0 left
Menu-Right: joystick 0 hat 0 right
Player-1-Right: joystick 0 hat 0 right
Lander-Right: joystick 0 hat 0 right
Menu-Up: joystick 0 hat 0 up
Player-1-Thrust: joystick 0 button 7
Lander-Thrust: joystick 0 button 7
Menu-Down: joystick 0 hat 0 down

Menu-Left: joystick 1 axis 0 negative
Player-2-Left: joystick 1 axis 0 negative
Lander-Left: joystick 1 axis 0 negative
Menu-Right: joystick 1 axis 0 positive
Player-2-Right: joystick 1 axis 0 positive
Lander-Right: joystick 1 axis 0 positive
Menu-Up: joystick 1 axis 1 negative
Player-2-Thrust: joystick 1 axis 1 negative
Lander-Thrust: joystick 1 axis 1 negative
Menu-Down: joystick 1 axis 1 positive
Menu-Cancel: joystick 1 button 0
Player-2-Special: joystick 1 button 1
Menu-Select: joystick 1 button 2
Player-2-Weapon: joystick 1 button 2
Lander-Weapon: joystick 1 button 2
Menu-Page-Up: joystick 1 button 4
Menu-Page-Down: joystick 1 button 6
Menu-Zoom-In: joystick 1 button 5
Player-2-Escape: joystick 1 button 3
Lander-Escape: joystick 1 button 3
Menu-Zoom-Out: joystick 1 button 7

#  And now the POV hat controls.
Menu-Left: joystick 1 hat 0 left
Player-2-Left: joystick 1 hat 0 left
Lander-Left: joystick 1 hat 0 left
Menu-Right: joystick 1 hat 0 right
Player-2-Right: joystick 1 hat 0 right
Lander-Right: joystick 1 hat 0 right
Menu-Up: joystick 1 hat 0 up
Player-2-Thrust: joystick 1 button 7
Lander-Thrust: joystick 1 button 7
Menu-Down: joystick 1 hat 0 down


Title: Re: Start using my joystick!
Post by: Defender on June 18, 2005, 06:06:30 am
number out both POV values:

#  And now the POV hat controls.
#Menu-Left: joystick 0 hat 0 left
#Player-1-Left: joystick 0 hat 0 left
#Lander-Left: joystick 0 hat 0 left
#Menu-Right: joystick 0 hat 0 right
#Player-1-Right: joystick 0 hat 0 right
#Lander-Right: joystick 0 hat 0 right
#Menu-Up: joystick 0 hat 0 up
#Player-1-Thrust: joystick 0 button 7
#Lander-Thrust: joystick 0 button 7
#Menu-Down: joystick 0 hat 0 down

why...you dont need them. (optional)

ok it took me a minute to figure out what you did wrong cause i got the same resutls. see this line in your config:

Code:
Player-2-Escape: joystick 1 button 3


change this back to:
Code:
player-1-Escape: joystick 1 button 3


player 2 does not need this enabled and the game crashes because of it. this is why:

Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\Games\The Ur-Quan Masters>uqm
The Ur-Quan Masters v0.4.0 (compiled May 18 2005 16:47:39)
This software comes with ABSOLUTELY NO WARRANTY;
for details see the included 'COPYING' file.

Initializing base SDL functionality.
Using SDL version 1.2.8 (compiled with 1.2.8)
Initializing Pure-SDL graphics.
SDL driver used: directx
SDL initialized.
Initializing Screen.
Set the resolution to: 640x480x32
2 joysticks were found.
The names of the joysticks are:
   PSX/USB Pad
   PSX/USB Pad
VControl opened joystick: PSX/USB Pad
4 axes, 12 buttons, 1 hats.
VControl opened joystick: PSX/USB Pad
4 axes, 12 buttons, 1 hats.
VControl: Illegal command type 'Player-2-Escape' on config file line 143
1 errors encountered in key configuration file.

Repair your keys.cfg file to continue.

D:\Games\The Ur-Quan Masters>


this is my config, but you probably dont need it. you can, however, use it for reference.

Code:
joystick 0 threshold 1   # How far to move before it counts; 0-30000
Menu-Left: joystick 0 axis 0 negative
Player-1-Left: joystick 0 axis 0 negative
Lander-Left: joystick 0 axis 0 negative
Menu-Right: joystick 0 axis 0 positive
Player-1-Right: joystick 0 axis 0 positive
Lander-Right: joystick 0 axis 0 positive
Menu-Up: joystick 0 axis 1 negative
Player-1-Thrust: joystick 0 axis 1 negative
Lander-Thrust: joystick 0 axis 1 negative
Menu-Down: joystick 0 axis 1 positive
Menu-Cancel: joystick 0 button 1
Player-1-Special: joystick 0 button 1
Menu-Select: joystick 0 button 2
Player-1-Weapon: joystick 0 button 2
Lander-Weapon: joystick 0 button 2
Menu-Page-Up: joystick 0 button 4
Menu-Page-Down: joystick 0 button 5
Menu-Zoom-In: joystick 0 button 7
Player-1-Escape: joystick 0 button 0
Lander-Escape: joystick 0 button 1
Menu-Zoom-Out: joystick 0 button 6

joystick 1 threshold 1   # How far to move before it counts; 0-30000
Menu-Left: joystick 1 axis 0 negative
Player-2-Left: joystick 1 axis 0 negative
Lander-Left: joystick 1 axis 0 negative
Menu-Right: joystick 1 axis 0 positive
Player-2-Right: joystick 1 axis 0 positive
Lander-Right: joystick 1 axis 0 positive
Menu-Up: joystick 1 axis 1 negative
Player-2-Thrust: joystick 1 axis 1 negative
Lander-Thrust: joystick 1 axis 1 negative
Menu-Down: joystick 1 axis 1 positive
Menu-Cancel: joystick 1 button 1
Player-2-Special: joystick 1 button 1
Menu-Select: joystick 1 button 2
Player-2-Weapon: joystick 1 button 2
Lander-Weapon: joystick 1 button 2
Menu-Page-Up: joystick 1 button 4
Menu-Page-Down: joystick 1 button 5
Menu-Zoom-In: joystick 1 button 7
Player-1-Escape: joystick 1 button 0
Lander-Escape: joystick 1 button 1
Menu-Zoom-Out: joystick 1 button 6

# And now the POV hat controls.
# Menu-Left: joystick 0 hat 0 left
# Player-1-Left: joystick 0 hat 0 left
# Lander-Left: joystick 0 hat 0 left
# Menu-Right: joystick 0 hat 0 right
# Player-1-Right: joystick 0 hat 0 right
# Lander-Right: joystick 0 hat 0 right
# Menu-Up: joystick 0 hat 0 up
# Player-1-Thrust: joystick 0 hat 0 up
# Lander-Thrust: joystick 0 hat 0 up
# Menu-Down: joystick 0 hat 0 down


let me know how it goes. :)


Title: Re: Start using my joystick!
Post by: Razorback on June 18, 2005, 03:39:23 pm
Quote

ok it took me a minute to figure out what you did wrong cause i got the same resutls. see this line in your config:

Code:
Player-2-Escape: joystick 1 button 3


change this back to:
Code:
player-1-Escape: joystick 1 button 3


player 2 does not need this enabled and the game crashes because of it. this is why:

Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\Games\The Ur-Quan Masters>uqm
The Ur-Quan Masters v0.4.0 (compiled May 18 2005 16:47:39)
This software comes with ABSOLUTELY NO WARRANTY;
for details see the included 'COPYING' file.

Initializing base SDL functionality.
Using SDL version 1.2.8 (compiled with 1.2.8)
Initializing Pure-SDL graphics.
SDL driver used: directx
SDL initialized.
Initializing Screen.
Set the resolution to: 640x480x32
2 joysticks were found.
The names of the joysticks are:
   PSX/USB Pad
   PSX/USB Pad
VControl opened joystick: PSX/USB Pad
4 axes, 12 buttons, 1 hats.
VControl opened joystick: PSX/USB Pad
4 axes, 12 buttons, 1 hats.
VControl: Illegal command type 'Player-2-Escape' on config file line 143
1 errors encountered in key configuration file.

Repair your keys.cfg file to continue.

D:\Games\The Ur-Quan Masters>


Used the K.I.S.S. method, started out by only numbering out the extra line for the escape button on player 2.  Did the trick, both gamepads now work just fine!



Title: Re: Start using my joystick!
Post by: fossil on June 18, 2005, 08:53:26 pm
Also, you do not need any of the Menu-XXX and Lander-XXX controls in your 2nd joypad section. You should remove them, unless you want to be able to play single player with the 2nd controller, or want your buddy to fight you for the menu controls :)


Title: Re: Start using my joystick!
Post by: hool on July 06, 2005, 07:37:35 pm
hi

if anyone could give me their KEY.CFG file for a PS2 analog pad to PC via USB, i would greatly appreciate it.  i can't get this to work no matter what i've tried :(

very frustrated :(


Title: Re: Start using my joystick!
Post by: Razorback on November 05, 2006, 01:29:24 am
*bump*


Title: Re: Start using my joystick!
Post by: Defender on November 07, 2006, 05:54:23 am
EDIT: NEVERMIND, I see whats going on. ;D