Ultratron > General Discussions > Topic Details
Allicorn  [developer] Jan 17 @ 5:04am
Reconfiguring controllers
UPDATED January 23rd 2014 at 16:00 GMT.

Choosing controls for players

On the game's OPTIONS page you can now choose which controller, if any, each player should be using. Player #1 can use mouse+keyboard, controller 1 or controller 2. Player #2 needs to be on either controller 1 or controller 2 or can optionally be completely deactivated.

Default controller setup

The default controller bindings are this:

Left stick: Move
Right stick: Fire
Triggers: Smartbomb
Left Shoulder: Smartbomb
Right Shoulder: Turbo boost

If these aren't working for you though, you can now reconfigure the setup yourself. Have a look in the game's folder in your user home directory (on Windows that's C:\Users\<YOU>\.<GAME-NAME> ) and you should find a file called "controls.txt". You can open it up with any text editor (like Notepad for example).

Binding controls to controller sticks and buttons

Up two two controllers are supported. Each line must start "controller1" or
"controller2" followed by a dot "." then either "axis", "button" or "pad" and another dot ".". For "axis" or "button" a number follows indicating the index of the axis or button.

Axes can be assigned one of these values:
moveX controls the horizontal movement of the player
-moveX same but with the direction reversed
moveY controls the vertical movement of the player
-moveY same but with the direction reversed
aimX controls the horizontal firing direction of the player
-aimX same but with the direction reversed
aimY controls the vertical firing direction of the player
-aimY same but with the direction reversed
fireaxis fires a smartbomb whenever there is any movement

Buttons can be assigned one of these values:
firebutton fires a smartbomb
action activates turbo boost
start start button, for spawning the second player
back back button, saves and exits the game

So for example, for regular Xbox 360 controllers, what you probably want is this:

controller1.axis.0=moveY
controller1.axis.1=moveX
controller1.axis.2=aimY
controller1.axis.3=aimX
controller1.axis.4=fireaxis
controller1.button.4=firebutton
controller1.button.5=action
controller1.button.6=back
controller1.button.7=start

controller2.axis.0=moveY
controller2.axis.1=moveX
controller2.axis.2=aimY
controller2.axis.3=aimX
controller2.axis.4=fireaxis
controller2.button.4=firebutton
controller2.button.5=action
controller2.button.6=back
controller2.button.7=start

You can't bind the same axis or button twice and case is important throughout so "aimY" will work but "aimy" or "Aimy" won't.

Any of the axis values can be reversed if that's needed for your controller, so if moving the left stick to the left makes the droid go right, you need to rebind the movement axis to "-moveX".

If you're having trouble finding the right axis or button numbers for your particular controller then - while the game is running, press CTRL+F7 which'll copy some controller diagnostics into your clipboard. Then quit the game, open up Notepad or some other text editor and hit PASTE. The resulting file should make it easy to see how many axes and buttons your controller reports to the system.

Case is always important in everything in controls.txt. So "moveX" is right, "movex" is wrong, "AUTO" is right, "auto" is wrong, and so on.

Lefty controller setup

If you prefer the left stick to aim and the right stick to move, you can edit the controls.txt and swap wherever it says "moveX" or "moveY" with wherever it says "aimX" and "aimY". So for a Xbox 360 controller, it'd look this like for the Controller 1 lines:

controller1.axis.0=aimY
controller1.axis.1=aimX
controller1.axis.2=moveY
controller1.axis.3=moveX
controller1.axis.4=fireaxis
controller1.button.4=firebutton
controller1.button.5=action
controller1.button.6=back
controller1.button.7=start

Choosing which devices act as Controller 1 & 2 in-game

When controls.txt is first created (or any time you delete it and run the game, which'll re-create it) the game will write some lines into the file that show you what devices were found on your system that might be controllers. Usually this should detect any actual controllers but might also detect some mice, graphics tablets or other unusual input devices.

Here's an example of the kind of thing you might see in your controls.txt file:

device2=Controller (Gamepad F310)
device1=Wacom Graphics Tablet
device0=Controller (XBOX 360 For Windows)

In the example, the game found 3 devices that might work as controllers: an actual Xbox controller, a Logitech controller and a Wacom tablet that obviously won't work well for the game at all.

You shouldn't try to change these lines, it won't do anything. If you need to set which devices act as controllers, you need to look for these two lines:

controller1=AUTO
controller2=AUTO

These lines tell the game that it should just try to automatically work out which of those 3 devices should be treated as Controller 1 and Controller 2 in game. The game always tries to pick sensibly from this list but sometimes you might need or want to change which of your input devices the game should be trying to use.


To override that setting, just change "AUTO" to one of the "device" labels we saw above.

So in the example, maybe you want the Logitech F310 gamepad to be Controller 1 in-game and the Xbox device to be Controller 2. You would change the above two lines to say:

controller1=device2
controller2=device0

Disabling some or all controllers

If for some reason you want to disable a particular controller slot entirely - or both - perhaps some device on your system interferes with the game running properly and you don't have a controller to point the game at instead. Just edit one or both of those two lines again, like this:

controller1=NONE
controller2=NONE
Last edited by Allicorn; Jan 23 @ 8:13am
Showing 1-15 of 17 comments
< >
BombDog Feb 1 @ 9:09am 
Thanks for the continued efforts in trying to get our controllers working... but mine isn't yet!

I have found my controls.txt file generated by the game, and it shows my found controller.

#Contoller configuration
#Sat Feb 01 17:02:00 GMT 2014
controller2.button.7=start
controller2.button.6=back
controller2.button.5=action
controller2.button.4=firebutton
controller2.axis.4=fireaxis
controller2.axis.3=aimX
controller2.axis.2=aimY
controller2.axis.1=moveX
controller2.axis.0=moveY
controller2=AUTO
controller1=AUTO
controller1.axis.4=fireaxis
controller1.button.7=start
controller1.axis.3=aimX
controller1.button.6=back
controller1.axis.2=aimY
controller1.button.5=action
controller1.button.4=firebutton
controller1.axis.1=moveX
controller1.axis.0=moveY
device0=Logitech Dual Action

My out.log file doesn't mention any allocation to a device unless I go into the above file, and change the line...

controller1=AUTO
to
controller1=device0,

...when i get this....

Sat Feb 01 16:54:52 GMT 2014 Load config from C:\Users\John\.ultratron_3.03\controls.txt
Sat Feb 01 16:54:52 GMT 2014 Reassigned Controller #0 to Logitech Dual Action[0]

However the controller is back how it was before the update - inversely mapped to player 2 (sort of). It still runs thinking Player 1 is keyboard/mouse - I can't adjust the controls in the Options page.
Allicorn  [developer] Feb 3 @ 4:40am 
Thanks John, I'll have a fiddle around with the hardware I've got here and see if I can get it behaving similarly using your config.
FragmentalStew Apr 20 @ 12:57pm 
I have a logitech rumblepad and the move and fire is reversed. Move is on right. Fire is on left. Thanks for posting this. I haven't tried it, but I assume this will fix it. I had really been hoping the controller would work out of the box.
Sylvain May 4 @ 7:01am 
I use GNU/Linux (fedora rawhide and debian steamos). I use a logitech F310 controller. The settings are wrong, I would like to reconfigure them, but I don't have a controls.txt in steam game directory.
Allicorn  [developer] May 4 @ 12:42pm 
Hi Sylvain, "controls.txt" should turn up in <USER HOME>/.ultratron rather than the Steam install direction. Sorry for the confusion.
Sylvain May 4 @ 9:05pm 
Actually the file is in $HOME/.ultratron_3.03.
But it seems the control file handling is buggy on GNU/Linux (tested on fedora rawhide).
For the menu, the defaults settings are ok. But not for in-game.

In-game, it's going crazy. Here what I could get:

# axes: 0="start button" 1=ls-x 2=ls-y 3=lt 4=rs-x 5=rs-y 6=rt
# buttons: 0=a 1=b 2=x 3=y 4=lb 5=rb 6=back 7=special 8=lsb 9=rsb
controller1=device0
controller1.axis.6=fireaxis
controller1.axis.0=start
controller1.axis.4=aimX
controller1.button.6=back
controller1.axis.5=aimY
controller1.button.4=action #action seems to do nothing
controller1.button.5=firebutton #firebutton seems to do nothing, but fireaxis does
controller1.axis.1=moveX
controller1.axis.2=moveY
device0=Logitech Gamepad F310
Last edited by Sylvain; May 4 @ 10:06pm
Captain_Falcon_21 Jul 5 @ 1:37pm 
Does this game have DirectInput support?
Hasenpfeffer Fishstick Jul 8 @ 11:32am 
Where can I find "controls.txt" file on the Mac side?
Blackbluue~The Feral Fenrir Jul 17 @ 6:01pm 
Same question as Hasenpfeffer. I checked the App package folder in the Steam directory, but the controls.txt file wasn't in there. I assume it's in the Userdata folder with all the containing folders labeled with numbers, but with no names it prooves to be almost impossible to find the right file without knowing it's name beforehand (I already did a search under the name "controls.txt" which came up empty)
Char-Char, dewd Jul 27 @ 11:16pm 
^
Allicorn  [developer] Jul 29 @ 4:06pm 
Mac location is ~/Library/Application Support/.ultratron_X.xX

Note that little "." on the last folder - that means it'll normally be hidden. That's really where it is tho.
Blackbluue~The Feral Fenrir Jul 29 @ 5:03pm 
Ok, I found it. Tricky little devil, being hidden like that. I don't have time now, but I'll test the controller work-around later to see if I can configure my gamepad correctly.
Ahiru Aug 13 @ 7:11pm 
nope, it doesn't work at all.
Mac OS X 10.8.2, wired X360 controller. not working no matter what. the "controller1=device0" does nothing in game, it always show up as "Player 1=kb+m" whereas "controller2=NONE" always shows up as "Player 2 = controller 1" in game.

and the analogs are all messed up no matter what....
Richard Cheesington Aug 25 @ 5:00pm 
Hey,
I've been mucking around with the Linux version of this. The default config for me was way off. In Windows, default works fine, but here is a config that got me up and running.

Note:
I have 3 controllers: 1 Logitech F510, 2 Rock Candy Xbox 360 controllers.
This config works for all 3.

I'm running Steam on OpenSUSE 13.1 if anyone cares about that. I'm pretty sure this should work for all Xbox clone controllers using the evdev driver.

Location: ~/.ultratron_3.03/controls.txt

#Contoller configuration
#Mon Aug 25 18:52:55 EDT 2014
controller2.axis.4=fireaxis
controller2.button.7=start
controller2.axis.4=aimX
controller2.button.6=back
controller2.axis.5=aimY
controller2.button.5=action
controller2.button.4=firebutton
controller2.axis.1=moveX
controller2.axis.2=moveY
controller2=device1
controller1=device0
controller1.axis.4=fireaxis
controller1.button.7=start
controller1.axis.4=aimX
controller1.button.6=back
controller1.axis.5=aimY
controller1.button.5=action
controller1.button.4=firebutton
controller1.axis.1=moveX
controller1.axis.2=moveY
device0=Generic X-Box pad
device1=Generic X-Box pad

I know the fireaxis is doublemapped. In the end, it doesn't matter.

I'll be glad if this helps out at least 1 person.
Last edited by Richard Cheesington; Aug 25 @ 5:02pm
Ahiru Aug 26 @ 3:58am 
I had to set the controls file permission to read only (owner, group and everyone else), everytime I started the game it would overwrite it...
Showing 1-15 of 17 comments
< >
Per page: 15 30 50