Euro Truck Simulator 2

Euro Truck Simulator 2

Statistieken weergeven:
How to improve controller support?
I play with a controller as I don't have a wheel and I'd love a way to map the controls to the controller a little better. Things like; using the bumper buttons for indicators; headlights, wipers and horn are usable via the right buttons. But I've looked and there' very little options for a controller user. Going from controller to keyboard is a little immersion-breaking. I really hope SCS do something about it. I mean, how hard can it be?
< >
1-15 van 34 reacties weergegeven
You can. Under the menu pick the option to edit Keyboad controls. Even though it says keyboard it will bind to controller buttons.
If you own a xbox 360 controller for pc, here is how i have set up mine:

Left joystick to turn wheel, and right joystick to turn head.
LT: brake
RT: forward
LB: left indicator
RB: right indicator
Start: engine
Back: activate
Left arrow: wippers
Right arrow: light mode
Y: pause (to toggle menu)
B: shift up
X: shift down
A: default interior view

With those settings, I only need to access keyboard to drop the cargo at the end of a delivery, or to use the horn. I didn't bind any key to the up and down arrows because I experienced problems when I did so. Don't forget to adjust the ''deadzone'' for both joysticks, otherwise they might be too sensitive and unstable. One last thing, if you want to increase view axis sensitivity, you can set it by manually editing controls.sii in your profile directory (My Documents/Euro Truck Simulator 2/profiles/############/controls.sii). You change the value in the following line:

config_lines[42]: "constant c_jrspeed 2.094395"

to this:

config_lines[42]: "constant c_jrspeed 4.094395" (or any value you want).
Laatst bewerkt door Bruno; 26 mrt 2013 om 23:14
Oh wow, I didn't know this. Thanks very much, guys.
wow, great info, thank you
Do you know if there is a way to zoom the view or lean forward so you can look at your dash or mirrors? Something I miss from Flight Simulator. I think it is possible if you use TrackIR so it could be possible via keybinds?
Something i wouldn't mind is some kind of ' Shift ' key to virtually double up the number of button on the controller, like this :

A : Motor Brake / Shift+A : Cruise Control
X : Lights On / Off / Shift+X : High Beam On / Off
Y : Map Zoom on GPS / Shift+Y : loop GPS page (F5 > F6 > F7 > F8)

and such. My old SideWinder joystick has this, really practical.
You can do this with AutoHotkey. I even saw someone mention it on this hub.
Nono54r there's no 'shift' function in the game. who knows, maybe in the future,
however, what you can do if you don't mind editing the controls file and binding them yourself you can actually 'double bind' functions. of course some work better together than others but an example would be i currently have the 'enter/activate' function and cycle zoom level on the route advisor set to the back button on an xbox controller. so when you're not anywhere to 'activate' something like a toll booth, it just cycles the zoom on the map.
for an xbox controller the controls.sii file would look like this:

config_lines[142]: "mix activate `keyboard.enter?0 | joy.b7?0`"
...
config_lines[203]: "mix advpage0 `joy.b7?0 | keyboard.uarrow?0`"

you see the joy.b7?0 is the same in both entries so both things trigger on the single button press.
the other place i've used this is to have the A button and right stick click both center my view inside the cab and set the cruise control. so a press of either, does both things. just for example sake, those lines look like:

config_lines[85]: "mix cam1 `joy.b1?0 | joy.b10?0`"
...
config_lines[154]: "mix cruiectrl `joy.b1?0 | joy.b10?0`"

however, the most useful change in the controlls.sii anyone can make regarding an xbox controller is thanks to badken on the SCS forums who figured out how to add the game menu to the start button those changes look like this;

config_lines[56]: "mix back `keyboard.esc?0 | joy.b8?0`"
config_lines[57]: "mix skip `keyboard.esc?0 | joy.b8?0`"
...
config_lines[143]: "mix menu `keyboard.esc?0 | joy.b8?0`"

BAM, menu on the start button!! beautiful!

@zoidberg that code line looks familiar. ;)
oh and i forgot but of course ... horn and flashing your lights work great together. for me it's on X (joy.b3) but you could change these lines to whichever button works for you.

config_lines[146]: "mix horn `keyboard.h?0 | joy.b3?0`"
config_lines[147]: "mix lighthorn `keyboard.j?0 | joy.b3?0`"
last thing, if you were curious how the game labels the buttons on the xbox controller, it is as follows:

A joy.b1
X joy.b3
B joy.b2
Y joy.b4
Left Shoulder joy.b5
Right Shoulder joy.b6
Start joy.b8
Select joy.b7
Left Stick Press joy.b9
Right Stick Press joy.b10
D-Pad UP joy.pov1_up
D-Pad DOWN joy.pov1_down
D-Pad LEFT joy.pov1_left
D-Pad RIGHT joy.pov1_right
Thanks for the 'menu on the start button' thing. Very useful and saves me bothering to do that with AutoHotkey. Weird how it doesn't let you bind that directly to START in-game.

I think it might be very possible to have shift function buttons on the gamepad, in a few different ways. In the config file there are certain lines that specify 'any shift', 'any ctrl' 'any alt' etc. If you used AutoHotkey you could quite easily bind a specific button, say the BACK button, to function the same as SHIFT on the keyboard, and then in the config file you would specify ANY SHIFT + JOY BUTTON x (with whatever number, and the correct formatting).

However, if I am reading it properly there are actually lines in the config (43-45) that specify what those ANY keys are. I haven't tested it but perhaps if you specify a gamepad button there, you can then use it like a shift key even without using external programs :)

Worth a try.

The second way you can do it is entirely through AutoHotkey.

Here's a basic script for that program which I just scribbled down.

edit: the below code functions properly but somehow ETS captures the input from the controller before you have a chance to modify it using AutoHotKey.

The only way to use AutoHotKey with a gamepad and ETS would be to remove all in-game remapping for controller face buttons, and simply send keyboard functions with AutoHotKey. However... you can use the in-built ETS method I outlined above.

Read the below post by Fidelio for exact code.


$Joy7:: ; define gamepad buttons as hotkeys, the $ is needed to detect state changes below $Joy1:: $Joy2:: $Joy3:: $Joy4:: $Joy5:: $Joy6:: $Joy8:: ;ABUTTON If GetKeyState("Joy1","P") ; if the user presses A { If GetKeyState("Joy7","D") ; ...and BACK is being held down { Send {F5} ; send F5 instead } else ; if BACK is not being held down { Send {Joy1} ; send A button as normal } } ;.... etc for other buttons

Like I say, this is very basic, but already you have four extra face buttons. If I have time later I will add to it, I think I will probably modify it so that when BACK is being held down, X and B cycle through the GPS modes. If anyone knows AHK and wants to go ahead and make that script, be my guest... :)
Laatst bewerkt door Harmonica; 29 mrt 2013 om 15:48
ok so i figured out it is possible to have a 'shift' function, but setting it up is bit tedious because it takes a little forethought.
so you need to know what button you want to use as the modifier, what function and what button you want for the unmodified button press, and the function and button you want for the modified button press.

ok, so an example goes like this; press the x button and it blows the horn, or hit the d-pad up and the x button together and it turns on the wipers (but doesn't blow the horn).
the lines in the controls.sii would look like this;

config_lines[146]: "mix horn `keyboard.h?0 | (! joy.pov1_up?0) & joy.b3?0`" config_lines[153]: "mix wippers `keyboard.w?0 | ( joy.pov1_up?0) & joy.b3?0`"

you can dedicate a modifier (shift) key if you want but it doesn't seem to serve much purpose as you have to edit each bind anyway, and it would look like this for the same function as above.

config_lines[43]: "mix any_shift `keyboard.lshift?0 | keyboard.rshift?0 | joy.pov1_up?0`" config_lines[146]: "mix horn `keyboard.h?0 | (! any_shift) & joy.b3?0`" config_lines[153]: "mix wippers `keyboard.w?0 | (any_shift) & joy.b3?0`"

you'll also need a good memory because when you fire up the game and look in the keybind screen anything more than a button press (like the above) will be labeled as 'complex', so you won't see the key combo listed.

... but, it's possible, so there you go.
after a bit more playing around there does seem to be a tiny advantage to defining the keys/buttons you want to use as a modifier, as a variable. it's just cleaner and easier to read in the controls.sii file but i'm not sure there's any real advantage once you get in game.

in this example i'll set the two shoulder buttons on an xbox controller as the modifiers
config_lines[43]: "mix any_shift `keyboard.lshift?0 | keyboard.rshift?0 | joy.b5?0 | joy.b6?0`"
in the next excerpt we define how they'll be used
config_lines[142]: "mix activate `keyboard.enter?0 | (! any_shift) & joy.b7?0`" config_lines[143]: "mix menu `keyboard.esc?0 | (! any_shift) & joy.b8?0`" config_lines[144]: "mix engine `unbound?0 | (joy.b6?0) & joy.b8?0`" config_lines[145]: "mix attach `keyboard.space?0 | (joy.b6?0) & joy.b7?0`" config_lines[146]: "mix horn `keyboard.h?0 | (! any_shift) & joy.b3?0`" config_lines[147]: "mix lighthorn `keyboard.j?0 | (! any_shift) & joy.b3?0`"
as you can see:
line 142 shows buying fuel, paying tolls etc can be done pressing the 'select' button (joy.b7)
line 143 shows you can open the main game screen by pressing the 'start' button (joy.b8)
line 144 shows turning the engine on/off by holding the right shoulder button and pressing 'start' (joy.b6 and joy.b8)
line 145 shows attaching/detaching the trailer by holding the right shoulder button and pressing 'select' (joy.b6 and joy.b7)
lines 146 and 147 show that when I press the 'X' button both the horn is sounded and the lights flash. (joy.b3)

by defining the modifier we can use (! any_shift) as an indication of a base function, so when no other buttons are pressed other than this one, do this (ie. open the menu as in line 143). it seems strange to have to tell each line what to do when your modifier is not pressed but if you don't, both functions will trigger when you press the two button combo.

it would be great to see SCS implement this functionality into the game in a clean and easy way as it would be one step closer to full gamepad compatibility for steam big picture mode.
Komfr  [ontwikkelaar] 29 mrt 2013 om 7:13 
Origineel geplaatst door fidelio:
it seems strange to have to tell each line what to do when your modifier is not pressed but if you don't, both functions will trigger when you press the two button combo.

The reason is that the mixes are just mathematical expressions which evaluate to number regardless of how the value was calculated. For button-like usage the value is used as one virtual button. When the expression evaluates to value bigger than 0.5, the "button" is pressed.

This has advantage in flexibility. For example someone with disability could use TrackIR and set up the mixes to drive the truck just by moving his body. Or you can use a axis of a flight trottle controller to emulate several stick positions for h-shifter.

The downside is that you need to explicitly tell it when you want the press to be ignored and that some combinations might be problematic to achieve.
Laatst bewerkt door Komfr; 29 mrt 2013 om 8:45
wow, thank you kindly for the information, and thanks for the great game. it's my first scs game, but i'm sure not my last.
< >
1-15 van 34 reacties weergegeven
Per pagina: 1530 50

Geplaatst op: 26 mrt 2013 om 9:38
Aantal berichten: 34