Controls.sii file changes to enhance the trucking experience. First post Updated 20/02/2025

Make your game even better
User avatar
fra_xt
Posts: 11
Joined: January 25th, 2025, 1:22 pm

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by fra_xt » January 28th, 2025, 9:54 pm

Sorry guys for my delayed replies, during the week I'm kinda tired. This weekend I will try to make a first summary of everything :)

@JHTrucker unfortunately mouse steering does not allow for other controllers to be used (at least through in-game ui). So far the dial/mouse scrollwheel steering works best in steering wheel mode together with on the fly sensitivity adjustment. You can get rid of autocentering in gamepad mode but you have to edit the physics file. In steering wheel mode you get the same result without needing to edit the physics file so it's best. Thanks again for the new lines of code. G27 is pretty cool!

@a1337cookie oh that's interesting :) I've tried a few programs for remapping axes etc but none of them was set up for the mouse scroll wheel. Xmouse or Elephant do work with the scroll wheel (Elephant is explicitly for the MS dial as you'll know) but then in ETS2 the cursor does not move, so it definitely has something to do with the game engine. If using the scroll axis to control steering was possible that would be awesome indeed
User avatar
JHTrucker
Expert
Posts: 1382
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by JHTrucker » January 29th, 2025, 3:00 am

@fra_xt - There's no rush, take your time, get it to work how you want it.

Just a thought, previously, I said about pressing the dial as a middle mouse button for 'on the fly' changes and you said it didn't work...
Out of interest, did you just use mouse.button_middle?0 or something else?
If I don't know what a button is called, I do a horn test:
In game assign the button to the horn (in your case, press your dial).
Exit game.
Then look in the controls.sii file at 'mix horn' to see what it's called.

Hope that's helpful.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
Driving Enhancements: viewtopic.php?p=67254#p67254
TrackIR Driving Enhancements: viewtopic.php?p=46613#p46613
TruckerNyxion
PPM
Posts: 1
Joined: January 25th, 2025, 2:35 pm

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by TruckerNyxion » January 31st, 2025, 2:41 am

hey little question: i have a fanatec dd1 with the clubsport v3 pedals (which needs to be inverted ingame) and i want to change my engine brake to be active when i push my clutch pedal (driving real automatic so its simply free to use elsewhere), now my question is: can i invert the axis (joy2.sl1) so i can activate my engine brake when pushing the clutch in the controls.sii?
User avatar
JHTrucker
Expert
Posts: 1382
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by JHTrucker » January 31st, 2025, 1:56 pm

@TruckerNyxion - You can invert an axis by adding a minus sign:
joy2.sl1 = -1.0 <-> 0.0 <-> +1.0
-joy2.sl1 = +1.0 <-> 0.0 <-> -1.0

But you'd need to press your clutch 50% down to register as a button press...

Here, for example, the clutch pedal would only need to be pressed 25%. Change 0.25 to suit your requirements.
"mix motorbrake `sign(deadzone(-joy2.sl1?0, 0.25)) | semantical.motorbrake?0`"

Hope that's ok.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
Driving Enhancements: viewtopic.php?p=67254#p67254
TrackIR Driving Enhancements: viewtopic.php?p=46613#p46613
User avatar
fra_xt
Posts: 11
Joined: January 25th, 2025, 1:22 pm

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by fra_xt » February 2nd, 2025, 12:55 pm

Hi guys sorry again for my delay :)

I've been thinking about it and I've started messing with this idea. From now on I'll do tests with the normal mouse scroll wheel since it's easier to understand what it's doing and anyone has one :)

Code: Select all

 config_lines[264]: "mix lookpos8 `memory(scrol_up, ! lookpos8)`"
 config_lines[265]: "mix lookpos9 `memory(scrol_dwn, ! lookpos9)`"
 
 config_lines[314]: "mix dsteerleft `keyboard.larrow?0 + lookpos8?0 * 0.01`"
 config_lines[315]: "mix dsteerright `keyboard.rarrow?0 + lookpos9?0 * 0.01`"
 config_lines[316]: "mix dsteering `dsteerleft - dsteerright`"
 config_lines[317]: "mix steering `dsteering - memory(j_steer_c?1, (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`"
It kinda works but not quite. In steering wheel mode, one mouse-scroll-wheel tick moves the in-game-steering-wheel by 1% (I guess), but obviously the next mouse-scroll-wheel tick makes the in-game-steering-wheel go back to center because of the memory function. The cool thing is that the in-game-steering-wheel moves instantly

Unfortunately I lack the knowledge and documentation to make it work, but do you think there is a way to add up mouse-scroll-wheel ticks?

Thanks :dance2:
User avatar
JHTrucker
Expert
Posts: 1382
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by JHTrucker » February 2nd, 2025, 3:26 pm

@fra_xt - Unless I've misunderstood what it is your trying to do, I already gave you what you needed in a previous post, but here it is again with some help.
In 'wheel' mode every click up/down increases/decreases the counter 'hmdyaw' by 0.01 per click.
That gives a analogue value (-1.0 <--> 0.0 <--> +1.0) that is then used to hold the wheel in a fixed position.

"mix lookpos8 `memory(long_press((mouse.wheel_up?0 * ! lookpos8) + long_press(lookpos8, 1), 0.000001), ! lookpos8)`" <-- requires auto disable after 1ms
"mix lookpos9 `memory(long_press((mouse.wheel_down?0 * ! lookpos9) + long_press(lookpos9, 1), 0.000001), ! lookpos9)`" <-- requires auto disable after 1ms
"mix hmdyaw `max(min(memory(lookpos8 | lookpos9, hmdyaw + sel(lookpos8, 0.01, -0.01)), 1.0), -1.0)`" <-- 0.01 = 1% wheel position left/right per click, adjust to suit.
"mix dsteerleft `keyboard.larrow?0 | keyboard.a?0`" <-- game default
"mix dsteerright `keyboard.rarrow?0 | keyboard.d?0`" <-- game default
"mix dsteering `dsteerleft - dsteerright`" <-- game default
"mix steering `dsteering - memory(j_steer_c?1, (pow(normalize(abs(hmdyaw?0), c_steer_dz), (1.0 + c_steer_func * 0.5)) * sign(-hmdyaw?0))) - semantical.steering?0`"

If that's not it, then what is it that you're trying to do?
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
Driving Enhancements: viewtopic.php?p=67254#p67254
TrackIR Driving Enhancements: viewtopic.php?p=46613#p46613
User avatar
fra_xt
Posts: 11
Joined: January 25th, 2025, 1:22 pm

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by fra_xt » February 2nd, 2025, 3:54 pm

Yes thanks for all the code you already sent me, that's perfectly fine :) your help is really amazing

was trying to experiment with other stuff before considering it done. May I ask if there is any source from where I can learn something more than SCS's official documentation? Thanks
User avatar
JHTrucker
Expert
Posts: 1382
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by JHTrucker » February 2nd, 2025, 5:43 pm

@fra_xt - I've only read the SCS info regarding controls.sii and then did what you are doing now, playing about with different functions to see what's possible.

You said previously you can't select 'mouse steering' because you have a controller attached but not using it for steering.

Here's mouse steering without selecting 'mouse steering', controller attached and in 'wheel' mode, play about with sensitivity & non-linearity sliders.
Press and hold right mouse button to look around.

"mix camlr `mouse.button_right?0 * -mouse.rel_position.x?0 * c_msens - semantical.camlr?0`"
"mix camud `mouse.button_right?0 * -mouse.rel_position.y?0 * sel(c_minvert, -c_msens, c_msens) - semantical.camud?0`"

"mix hmdyaw `max(min(memory(-mouse.rel_position.x?0 * c_msens * ! mouse.button_right?0 | mouse.rel_position.x?0 * c_msens * ! mouse.button_right?0, hmdyaw + sel(-mouse.rel_position.x?0 * c_msens, 0.01, -0.01)), 1.0), -1.0)`"

"mix steering `dsteering - memory(j_steer_c?1, (pow(normalize(abs(hmdyaw?0), c_steer_dz), (1.0 + c_steer_func * 0.5)) * sign(-hmdyaw?0))) - semantical.steering?0`"


EDIT: Probably best to ignore the above mouse steering as it would alter the steering when you open the map and look around it...

Also, just to be clear, when you said "do you think there is a way to add up mouse-scroll-wheel ticks?", my reply "I already gave you what you needed in a previous post" was mainly referring to the line hmdyaw as that is what it does, I wasn't saying do it my way.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
Driving Enhancements: viewtopic.php?p=67254#p67254
TrackIR Driving Enhancements: viewtopic.php?p=46613#p46613
User avatar
fra_xt
Posts: 11
Joined: January 25th, 2025, 1:22 pm

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by fra_xt » February 4th, 2025, 11:30 pm

@JHTrucker Yeah yeah don't worry thanks, I understood :) thank you as always, your help is really appreciated since we can also learn from it more than with SCS resources :dance2:

Yes mouse steering seems to add complications unfortunately. By mixing (pun intended) everything you've suggested so far I've come up with this thing

Code: Select all

 config_lines[263]: "mix lookpos7 `memory(mouse.button_middle?0, ! lookpos7)`"
 config_lines[264]: "mix lookpos8 `memory(scrol_up, lookpos8 + ((1/A)*(720/B)*(1.0 + (5.0 * lookpos7))))`"
 config_lines[265]: "mix lookpos9 `memory(scrol_dwn, lookpos9 + ((1/A)*(720/B)*(1.0 + (5.0 * lookpos7))))`"
 
 config_lines[314]: "mix dsteerleft `keyboard.larrow?0 + lookpos8?0`"
 config_lines[315]: "mix dsteerright `keyboard.rarrow?0 + lookpos9?0`"
Where A is the amount of ticks in half a rotation of your scroll wheel, B is the in-game-steering-wheel animation degrees. Mouse middle click increases sensitivity, otherwise it should be a 1:1 rotation between the scroll-wheel and the in-game-steering-wheel

As you'll notice I've tried an alternative to the longpress function (which already worked good). Both methods work the same since the lost-inputs issue is reached at the same point. As you already said, that's likely because the event based functions can be evaluated at a maximum rate. I think this method is a bit simpler but let me know

JHTrucker wrote:
February 2nd, 2025, 5:43 pm
Here's mouse steering without selecting 'mouse steering', controller attached and in 'wheel' mode, play about with sensitivity & non-linearity sliders.
Press and hold right mouse button to look around.
This is really cool btw! thanks :)
User avatar
JHTrucker
Expert
Posts: 1382
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 20/10/2024

Post by JHTrucker » February 5th, 2025, 5:48 pm

@fra_xt - That works quite well and it's unaffected by zooming the map!

The only possible problem, perhaps, is that both lookpo8 & 9 are both always counting up and they may come a point, in the journey, where those numbers become too large and steering stops working?
Also, once the animated wheel stops rotating at it's limit, if you keep scrolling it creates a deadzone and so when you scroll in the opposite direction nothing happens until that deadzone has been decreased...

Here's the changes I made showing the values I used for A & B:
"mix lookpos8 `max(min(memory(scrol_up + scrol_dwn, lookpos8 + ((scrol_up - scrol_dwn) * (1/20)*(720/720)*(1.0 + (5.0 * lookpos7)))), 0.5), -0.5)`"
"mix lookpos9 `max(min(memory(scrol_dwn + scrol_up, lookpos9 + ((scrol_dwn - scrol_up) * (1/20)*(720/720)*(1.0 + (5.0 * lookpos7)))), 0.5), -0.5)`"

Now lookpos8 will count up with scroll up and count down with scroll down and the opposite for lookpos9.
Both are now limited to +/-0.5 to remove the 'over scrolling' deadzone.

See how that works for you.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
Driving Enhancements: viewtopic.php?p=67254#p67254
TrackIR Driving Enhancements: viewtopic.php?p=46613#p46613
Post Reply