The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
March 29, 2024, 09:39:24 am
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  [UQM] Disabling Gamepad OR Editing Menu Controls? **SOLVED**
« previous next »
Pages: [1] Print
Author Topic: [UQM] Disabling Gamepad OR Editing Menu Controls? **SOLVED**  (Read 3836 times)
Joseph Collins
Zebranky food
*
Offline Offline

Gender: Male
Posts: 7


Lv. 32 Black Spathi Dagger


View Profile WWW
[UQM] Disabling Gamepad OR Editing Menu Controls? **SOLVED**
« on: August 26, 2016, 04:28:48 pm »

Wow.  It's been some time since I've been here.  Kind of surprised my account still works...  But anyway, let's get to the point of the topic.

I like to play The Ur-Quan Masters using a controller.  Specifically, a PlayStation 2 Dual Shock controller.  Now, the way I do this is by using a third-party adapter that maps the buttons to DirectInput (I think?).  It works perfectly, but there's just one problem...  The buttons are mapped in a very specific order from 0 to 11:
/\, O, X, [¯], L2, R2, L1, R1, Start, Select, L3, R3

Bearing that in mind, The Ur-Quan Masters tends to automatically detect your controllers and, like all programs that acknowledge your game controller, maps buttons automatically without your input.  With the case of The Ur-Quan Masters, it automatically maps Confirm to Button 0 and Cancel to Button 1.  As you may have guessed, that means I need to press /\ or O to navigate the menus... and I've always found that kind of inconvenient, not to mention mildly baffling, considering you can change your flight controls to suit your tastes, or even remove flight controls altogether! (Not sure why you'd ever want to do this, though...)

So, with all that being said, I was wondering if there was a way to either disable the game from using detecting and controllers so I can just use JoyToKey and the like... or much more preferably, a way to set the menu navigation buttons exactly how I want them.

Thanks in advance!
« Last Edit: August 31, 2016, 02:19:25 am by Joseph Collins » Logged

I'm not that hard to find... if you know where to look.
-=( http://josephlithius.tumblr.com/ )=-
Joseph Collins
Zebranky food
*
Offline Offline

Gender: Male
Posts: 7


Lv. 32 Black Spathi Dagger


View Profile WWW
Re: [UQM] Disabling Gamepad OR Editing Menu Controls? **SOLVED**
« Reply #1 on: August 31, 2016, 02:17:22 am »

Feel free to merge this post with the above, whomever's in-charge.

So, I kinda stumbled upon the solution myself while looking for something entirely unrelated.

As of The Ur-Quan Masters v0.7.0, controls are separated into different files.  "flight.cfg" is, as you might have guessed, the flight controls.  At a glance, there is no option or file to change the menu controls like there was in v0.6.x and earlier.  However, there is still a way, as pointed-out by Novus five years ago:
I can't find any documentation, so I'll give a brief explanation.

Basically, override.cfg is an extension to menu.key and uses the same syntax. Basically, the format is:

<function name>.<definition number> = STRING:key <key name>

  • <function name> is what you want the key to do; look for the corresponding function in menu.key.
  • <definition number> is the number of the binding you want to change; you can bind several keys to the same function by giving them consecutive numbers. So, to add a binding like in the example, you use a definition number larger than the highest one used so far (in both menu.key and override.cfg). To change a previously defined key, use the same number.
  • <key name> is the name of the key you want to assign; for a list, see src/libs/input/sdl/keynames.c.

Sooo... undocumented in this version, but still there.  I am A-OK with that.

Thanks, Novus from August 28th, 2011!

Edit: For the curious, I basically just wanted to swap Button 0 and Button 1 (so 1 = Confirm and 0 = Cancel/Menu), since that's how I have JoyToKey set for the MS-DOS version.
« Last Edit: August 31, 2016, 04:18:07 am by Joseph Collins » Logged

I'm not that hard to find... if you know where to look.
-=( http://josephlithius.tumblr.com/ )=-
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3872


We did. You did. Yes we can. No.


View Profile
Re: [UQM] Disabling Gamepad OR Editing Menu Controls? **SOLVED**
« Reply #2 on: September 01, 2016, 03:56:56 am »

Glad you worked it out!
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!