Controls.sii file changes to enhance the trucking experience. First post Updated 18/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 » February 10th, 2025, 10:04 pm

Here I come again, pardon

@JHTrucker that works awesome!! Now it's much more professional :)

For some reason that I don't understand I had to slightly modify one of the values to get 1:1 scroll-wheel-to-wheel-animation ratio but I think it should be fine

If you agree I think we can call this code final :grin: just to recap here are the lines to paste in the controls.sii file, together with steering wheel mode setting in-game.
"A" is the amount of ticks in half a rotation of your scroll wheel; "B" is the in-game steering wheel animation degrees

Code: Select all

"mix lookpos7 `memory(mouse.button_middle?0, ! lookpos7)`"
"mix lookpos8 `max(min(memory(scrol_up + scrol_dwn, lookpos8 + ((scrol_up - scrol_dwn) * (1/A)*(480/B)*(1.0 + (4.0 * lookpos7)))), 0.5), -0.5)`"
"mix lookpos9 `max(min(memory(scrol_dwn + scrol_up, lookpos9 + ((scrol_dwn - scrol_up) * (1/A)*(480/B)*(1.0 + (4.0 * lookpos7)))), 0.5), -0.5)`"
"mix dsteerleft `keyboard.larrow?0 + lookpos8?0`"
"mix dsteerright `keyboard.rarrow?0 + lookpos9?0`"
Anyone should then set their preferred button for lookpos7, and also play with the lookpos7 multipliers to get the suitable experience

If you're ok with it I'd love to post a link to this stuff on the SCS forum to tease them a bit :D in the meantime thanks again for your help, it's been amazing
User avatar
JHTrucker
Expert
Posts: 1379
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 11th, 2025, 11:34 pm

@fra_xt - If what we've created fulfills your original requirements... then yes, its done.

However, hope you don't mind and sorry if I come across as a teacher, marking your work... But for clarity I think you need to edit your post to add some missing info, something like this?:

Steering that using MS Dial or Mouse Scroll Wheel.
Requires:
A game controller, but it won't be used for steering, then set, for example:
In game, Controls = keyboard + controller (xbox360)
Controller subtype = Wheel
OR
If you don't have a controller, add this to your controls.sii file:
config_lines[2]: "device joy `di8.'{Used to force analogue steering for MS Dial}'`"
In game, Controls = keyboard + missing di8 {Used to force analogue steering for MS Dial}
Controller subtype = Wheel
Note: You'll get the 'missing controller' popup, just close it and continue to drive.

Steering Sensitivity Slider = 100% (far right)
Steering Non-linearity Slider = 0% (far left)
Or you can adjust to suit.

Note: Lookpos7 is used to toggle 'on demand' faster steering on/off, assign a button as required.

-----

You'll also need to add your disable scrolling for cam2.

I'll add your post to my list.

Happy for you to share a link to here, but be careful... If you're a long time scs forum member then you'll probably be ok to post a link.
My story, from a couple of years ago:
There's a lot of stuff on this forum, for things that may or may not be useful to the "bestcommunityever", but after seeing too many people requesting multimonitor help on the scs forum and only getting basic non-helpful replies, I decided to join and point them in the right direction, all the info here is free to see and nobody has to join this forum to use it...
I got an instant life time ban (my account requires manual unlocking by an admin), the reason, promoting paid content...

But whilst your still here, if you haven't looked beyond this "controls" topic then perhaps check out the main section, “Tweaking and Enhancing the Game - Make your game better”.
If doing things like, climbing into the sleeper and laying down before sleeping, climbing out of the truck to refuel, use the crank handle & walk around the truck etc, appeals to you, then look at "Driving Enhancements"... your scroll steering can still be used...

Thanks, you provided a fun challenge.
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 18th, 2025, 11:19 pm

I'm back :)

@JHTrucker don't worry, you are a good teacher :) I'm sorry for rushing it a bit, here's the complete message to be added to your post if you like it

-------------------------

Steer your truck with Mouse Scroll Wheel or Surface Dial

Requirements
- external controller (will not be used for steering) or see the first line of code

Controls.sii file changes

Code: Select all

"device joy `di8.'{force analogue steering for Scroll Wheel and MS Dial only if you don't have a controller}'`"
"mix camzoomin `keyboard.pgup?0 | semantical.camzoomin?0`"
"mix camzoomout `keyboard.pgdn?0 | semantical.camzoomout?0`"
"mix lookpos7 `memory(mouse.button_middle?0, ! lookpos7)`"
"mix lookpos8 `max(min(memory(scrol_up + scrol_dwn, lookpos8 + ((scrol_up - scrol_dwn) * (2/A)*(480/B)*(1.0 + (4.0 * lookpos7)))), 0.5), -0.5)`"
"mix lookpos9 `max(min(memory(scrol_dwn + scrol_up, lookpos9 + ((scrol_dwn - scrol_up) * (2/A)*(480/B)*(1.0 + (4.0 * lookpos7)))), 0.5), -0.5)`"
"mix dsteerleft `keyboard.larrow?0 + lookpos8?0`"
"mix dsteerright `keyboard.rarrow?0 + lookpos9?0`"
set "A" as the number of ticks in a full rotation of your scroll wheel (for MS Dial it's 1800); set "B" as the in-game steering wheel animation degrees number

In-game settings
- input type = Keyboard + controller (Xbox360, ...) only if you have a controller, else see above
- controller subtype = wheel
- steering non-linearity = 0 (adjust to taste)
- steering sensitivity = 1.0 (adjust to taste, shouldn't affect scroll wheel steering)

How it works
- controller (existing or not) is used for scroll wheel to analogue steering conversion
- chasing camera zoom is replaced with PageUp and PageDown; you may need to unassing them if they were already assigned to something, or choose different buttons in config.sii for zooming
- lookpos7 is used to alternate between slow and fast steering; default button is mouse middle button, or set another button in config.sii
- because of event-based functions limitation, if you scroll really fast you may lose some steering ticks, so you'll have to toggle fast steering
- in slow mode, the in-game steering wheel should turn the same as your scroll wheel
- works with trackpad too, but "A" value needs to be experimented with

-------------------------

Hope it is fine this way, sorry if I made changes to what you suggested but I hope it is clear like this too. Else I'll make adjustments as needed

I won't be leaving this forum anytime soon :) I think this method might also be interesting for changing stuff on the fly (steering sensitivity etc, as you've already done) by multiplying the lookpos8/9 values by the variable you want. Of course feel free to do anything you want with it

Thanks for your suggestion about posting on the SCS forum, it's a shame they banned you. I guess that will be a problem, maybe I'll try contacting a moderator before posting any link

Thanks again for your help :good2:
User avatar
JHTrucker
Expert
Posts: 1379
Joined: February 7th, 2020, 3:19 pm
Location: UK

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

Post by JHTrucker » February 19th, 2025, 10:44 pm

@fra_xt - No need to be sorry! I did say "something like this?" The choice was yours.

Anyway, I think I was wrong to give the original idea of a fake controller when there's no controller to attach... Having just thought about it again, any one without a controller can just pick the game default "Keyboard + Controller (xbox360)" and then choose "wheel", you'll still get the "missing controller popup", but just X it off.
That should simplify your post, if you wish to edit it.

I've now linked your post in my list.

Being instant banned was probably for the best, I'd have just wasted too much time on a forum that the devs themselves should reply too in certain topics, instead of leaving it to their members...

Out of interest I typed my JHTrucker into the SCS forum search box and got 17 post references, all from other members that referred to me and about half of them posted direct links to here... so some can do it, but I certainly couldn't!

Never mind, I like being here, if people manage to find my work and like it, they're welcome.

If you have another idea you need help with, you know where I am.
Thanks.
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