American Truck Simulator

American Truck Simulator

25 ratings
Gaming Wheel Realism - Algorithm for controls.sii
By Eddie Yantz
1.55 changed things; updated config_lines exist below.

I absolutely adore this Steering algorithm. It makes steering so much better!!: https://www.reddit.com/r/trucksim/comments/4a1gbu/people_with_steering_wheels_take_a_look_at_this/

Below are my updates:
- for 1.55, 1.53-1.54, 1.42-1.52, 1.35 - 1.41

2
   
Award
Favorite
Favorited
Unfavorite
Steering algorithm
===== 1.55 =====
steering sensitivity ("constant c_rsteersens) must be maximized: 1.500000
steering linearity ("constant c_relatsteer) remains irrelevant.

config_lines[xxx]: "constant c_rsteersens 1.500000"
(config_lines[xxx]: "constant c_asteersens 9.000000" - SEE NOTE BELOW)
config_lines[xxx]: "mix j_steer_c `0`"
config_lines[xxx]: "mix steering `(-(normalize(abs(j_steer?0), 0)) * sign(j_steer?0)) - semantical.steering?0`"

NOTE: when you set steering sensitivity ("constant c_rsteersens), game automatically adjusts "constant c_asteersens".

===== 1.53 =====
I'm not sure what SCS changed (or exactly when), but here's what works for me now in controls.sii:

config_lines[xxx]: "mix j_steer_c `0`"

config_lines[xxx]: "mix steering `(-(normalize(abs(j_steer?0), 0)) * sign(j_steer?0)) - semantical.steering?0`"

irrelevant / ignored: config_lines[XX]: "constant c_asteersens . . ." AND config_lines[XX]: "constant c_relatsteer . . ."

==== 1.42-1.52 =====

SCS introduced "Steering animation range" in Gameplay Options. This is used to match in-game steering-wheel rotation to your gaming wheel rotation. Set your gaming wheel's rotation outside the game (with manufacturer's software), then set "Steering animation range" to match.

"mix steering" algorithm simplification:

My controls.sii are now able to use this simplified config_line (because of my wheel's features (Thrustmaster TS300):
config_lines[289]: "mix steering `-(normalize(abs(j_steer?0), 0)) * sign(j_steer?0)`"

This simplified algorithm does the following:
- forces direct gaming-wheel input (uses 1.0 and 0.0 values instead of 0.58 and 0.42 in pre-1.42 equation). (SCS' new "Steering animation range" eliminates the need for split values.)
- forces straight curve (eliminates need for exponent "pow"used in pre-1.42 equation)
- independent of mouse movement (ignores "dsteering", "dsteerleft", and "dsteerright)"
- forces non-linearity = 0 (ignores "c_steer_func")
- forces deadzone = 0 (ignores "c_steer_dz")
- forces gaming-wheel to use "centered" (ignores "c_jisteer") Does not allow gaming-wheel rotation to be inverted.
- note: "sign" returns -1, 0, or 1 , so it must remain in equation or a huge center dead zone exists.

===== 1.35 - 1.41 =====

Below are original and edited strings for controls.sii.

This edit is working for my Thrustmaster T300 wheel (1080 degree, set to 900).
(For my old 300Deg wheel, the variables were 0.19, 0.81, & 4.):

Original = "mix steering `dsteering - (pow(normalize(abs(sel(c_jisteer, -j_steer?0, j_steer?0)), c_steer_dz), (1.0 + c_steer_func * 0.5)) * sign(sel(c_jisteer, -j_steer?0, j_steer?0))) - semantical.steering?0`"

Edited = "mix steering `dsteering - ((0.58 * normalize(abs(j_steer?0), c_steer_dz) + (0.42 * (c_steer_func / 2)) * pow(normalize(abs(j_steer?0), c_steer_dz), 4)) * sign(sel(c_jisteer, -j_steer?0, j_steer?0))) - semantical.steering?0`"

I set both "steering sensitivity" and "steering non-linearity" sliders all the way right, and my 1080 wheel is set at 900 outside the game so it matches the in-game wheel rotation.
10 Comments
Eddie Yantz  [author] Apr 10 @ 4:10am 
:)
kraftwerkd Apr 9 @ 8:13pm 
A+ fantastic work. Moza R5 feels real good with these changes.
Eddie Yantz  [author] Dec 28, 2024 @ 1:24pm 
1.53+
Eddie Yantz  [author] Jun 3, 2023 @ 11:15pm 
1.42+
Acrillix Jun 3, 2023 @ 4:45pm 
Should the G29 be using the simplified under 1.42 or the edited string from 1.41?
Eddie Yantz  [author] Jun 1, 2023 @ 6:11am 
:)
crazyhenkie Jun 1, 2023 @ 4:46am 
Many thanks for sharing your tweaked steering algorithm! I love realism in driving games and this change is simply amazing, because I find the steering to be much more natural. It is quite strange that the default line contains an exponential factor (the 'pow' function); no wonder the steering has always felt so strange. With your simplified line, the steering feels absolutely spot on and I feel like the trucks are finally steering according to my inputs. I'm over the moon! :steamhappy:

I use it with a Logitech G29 at the default 900 degrees of rotation. This steering fix also works in Euro Truck Simulator 2!
✪KASTI_OFICJALNIE✪ Feb 18, 2022 @ 7:12am 
yes
Eddie Yantz  [author] Feb 11, 2022 @ 6:39am 
Wonderful :)
racer2787 Feb 10, 2022 @ 3:48pm 
I started playing ATS at the beginning of the year with keyboard controls. I liked the game, but hated the handling with a keyboard and mouse config. So I bought a cheap ($125) steering wheel and got immediate 99% improvement.... Still difficult to keep control at higher speeds. Then I found this algorithm and this took the gameplay to a whole new level. 100 thumbs up.