Controls.sii file changes to enhance the trucking experience. First post Updated 22/03/2024

Make your game even better
Post Reply
User avatar
JHTrucker
Expert
Posts: 1334
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 08/04/2022

Post by JHTrucker » April 14th, 2022, 4:07 pm

UPDATE: 'Keyboard Driving Adjustments' post re-written to include support for analogue gamepads. But will also work for any analogue device, wheel & pedals etc. - viewtopic.php?p=50448#p50448

What's new?

New menu mod 'Driving Adjustments' - Remove the previous 'Keyboard Driving Adjustments' mod from your mod manager.

New menu option 'Slow Speed Cruise Control - Resume'. Using the brake will disable this. You can use the throttle if you require a burst of acceleration.

New 'Manual Hill Descent Control'. When using 'Slow Speed Cruise Control' or 'Slow Speed CC - Resume' and your speed increases due to going down hill, press your 'Cruise Control' key, this will apply the trailer brake to help you maintain the 'slow speed' you require without disabling the 'Slow Speed Cruise Control' modes. If you want to stop, use the brake as normal.
Note: The above will only work when using 'Slow Speed Cruise Control' or 'Slow Speed CC - Resume' and your speed is below 20mph/30kph, otherwise it will enable the normal cruise control function.

Re-read the post for all the new descriptions and re-apply all required line edits again.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
User avatar
JHTrucker
Expert
Posts: 1334
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 14/04/2022

Post by JHTrucker » April 25th, 2022, 6:48 pm

How to combine your key functions with shift, ctrl or alt.
(For those of you that don't have enough spare keys for all the functions you require).

Note: If you use 'shift' & 'ctrl' for gear up/down then you can't use them for other functions.
"mix gearup `keyboard.lshift?0 | keyboard.rshift?0 | semantical.gearup?0`" <--- Game default
"mix geardown `keyboard.lctrl?0 | keyboard.rctrl?0 | semantical.geardown?0`" <--- Game default

Typical formatting:
modifier(no_modifier?0, keyboard.a?0) <-- Press 'a' without pressing 'Shift', 'Ctrl' or 'Alt' at the same time.
modifier(shift_only, keyboard.a?0) <-- Press 'a' whilst also pressing 'Left or Right Shift'
modifier(ctrl_only, keyboard.a?0) <-- Press 'a' whilst also pressing 'Left or Right Ctrl'
modifier(alt_only, keyboard.a?0) <-- Press 'a' whilst also pressing 'Left or Right Alt'
keyboard.lshift?0 & keyboard.a?0 <-- Press 'a' whilst also pressing 'Left Shift'
keyboard.rshift?0 & keyboard.a?0 <-- Press 'a' whilst also pressing 'Right Shift'
keyboard.lctrl?0 & keyboard.a?0 <-- Press 'a' whilst also pressing 'Left Ctrl'
keyboard.rctrl?0 & keyboard.a?0 <-- Press 'a' whilst also pressing 'Right Ctrl'
keyboard.lalt?0 & keyboard.a?0 <-- Press 'a' whilst also pressing 'Left Alt'
keyboard.ralt?0 & keyboard.a?0 <-- Press 'a' whilst also pressing 'Right Alt'

OR

! keyboard.lshift?0 & keyboard.a?0 <-- Press 'a' without pressing 'Left Shift'.
keyboard.lshift?0 & keyboard.a?0 <-- Press 'a' whilst also pressing 'Left Shift'.

Note: keyboard.key1?0 and not keyboard.1?0 it seems you need .key when it's a number only.

Example: Assign 'Horn' & 'Air Horn' to the same key 'h' but use 'shift' to separate them.
"mix horn `modifier(no_modifier?0, keyboard.h?0) | semantical.horn?0`" <-- Horn = Press 'h' only
"mix airhorn `modifier(shift_only, keyboard.h?0) | semantical.airhorn?0`" <-- Air Horn = Press 'Left or Right Shift' & 'h'
You can replace 'shift_only' with 'ctrl_only' or 'alt_only' as required.
OR
"mix airhorn `keyboard.lshift?0 & keyboard.h?0 | semantical.airhorn?0`" <-- Air Horn = Press 'Left Shift' & 'h'
OR
"mix airhorn `keyboard.rshift?0 & keyboard.h?0 | semantical.airhorn?0`" <-- Air Horn = Press 'Right Shift' & 'h'
OR
"mix airhorn `keyboard.lctrl?0 & keyboard.h?0 | semantical.airhorn?0`" <-- Air Horn = Press 'Left Ctrl' & 'h'
OR
"mix airhorn `keyboard.rctrl?0 & keyboard.h?0 | semantical.airhorn?0`" <-- Air Horn = Press 'Right Ctrl' & 'h'
OR
"mix airhorn `keyboard.lalt?0 & keyboard.h?0 | semantical.airhorn?0`" <-- Air Horn = Press 'Left Alt' & 'h'
OR
"mix airhorn `keyboard.ralt?0 & keyboard.h?0 | semantical.airhorn?0`" <-- Air Horn = Press 'Right Alt' & 'h'


Example: Assign 'Horn', 'Air Horn', 'Light Horn' & 'Beacon' to the same key 'h' but use 'shift', 'ctrl' & 'alt' to separate them.
"mix horn `modifier(no_modifier?0, keyboard.h?0) | semantical.horn?0`" <-- Horn = Press 'h' only
"mix airhorn `modifier(shift_only, keyboard.h?0) | semantical.airhorn?0`" <-- Air Horn = Press 'Left or Right Shift' & 'h'
"mix lighthorn `modifier(ctrl_only, keyboard.h?0) | semantical.lighthorn?0`" <-- Press 'Left or Right Ctrl' & 'h'
"mix beacon `modifier(alt_only, keyboard.h?0) | semantical.beacon?0`" <-- Beacon = Press 'Left or Right Alt' & 'h'


Example: Truck lift axle = 'u' - Trailer lift axle = 'shift + u'
"mix liftaxle `modifier(no_modifier?0, keyboard.u?0) | semantical.liftaxle?0`" <-- Truck axle = Press 'u' only
"mix liftaxlet `modifier(shift_only, keyboard.u?0) | semantical.liftaxlet?0`" <-- Trailer axle = Press 'Left or Right Shift' & 'u'
OR
"mix liftaxlet `keyboard.lshift?0 & keyboard.u?0 | semantical.liftaxlet?0`" <-- Trailer axle = Press 'Left Shift' & 'u'
OR
"mix liftaxlet `keyboard.rshift?0 & keyboard.u?0 | semantical.liftaxlet?0`" <-- Trailer axle = Press 'Right Shift' & 'u'
OR
"mix liftaxlet `keyboard.lctrl?0 & keyboard.u?0 | semantical.liftaxlet?0`" <-- Trailer axle = Press 'Left Ctrl' & 'u'
OR
"mix liftaxlet `keyboard.rctrl?0 & keyboard.u?0 | semantical.liftaxlet?0`" <-- Trailer axle = Press 'Right Ctrl' & 'u'
OR
"mix liftaxlet `keyboard.lalt?0 & keyboard.u?0 | semantical.liftaxlet?0`" <-- Trailer axle = Press 'Left Alt' & 'u'
OR
"mix liftaxlet `keyboard.ralt?0 & keyboard.u?0 | semantical.liftaxlet?0`" <-- Trailer axle = Press 'Right Alt' & 'u'


Example: Wipers switch through settings = 'p' - Wipers switch back over = 'shift + p'
"mix wipers `modifier(no_modifier?0, keyboard.p?0) | semantical.wipers?0`" <-- Press 'p' only
"mix wipersback `modifier(shift_only, keyboard.p?0) | semantical.wipersback?0`" <-- Press 'Left or Right Shift' & 'p'
OR
"mix wipersback `keyboard.lshift?0 & keyboard.p?0 | semantical.wipersback?0`" <-- Press 'Left Shift' & 'p'
OR
"mix wipersback `keyboard.rshift?0 & keyboard.p?0 | semantical.wipersback?0`" <-- Press 'Right Shift' & 'p'
OR
"mix wipersback `keyboard.lctrl?0 & keyboard.p?0 | semantical.wipersback?0`" <-- Press 'Left Ctrl' & 'p'
OR
"mix wipersback `keyboard.rctrl?0 & keyboard.p?0 | semantical.wipersback?0`" <-- Press 'Right Ctrl' & 'p'
OR
"mix wipersback `keyboard.lalt?0 & keyboard.p?0 | semantical.wipersback?0`" <-- Press 'Left Alt' & 'p'
OR
"mix wipersback `keyboard.ralt?0 & keyboard.p?0 | semantical.wipersback?0`" <-- Press 'Right Alt' & 'p'


Example: From game version 1.44 onwards:
Lower front & rear suspension - 's'
Raise front & rear suspension - 'Left or Right Shift + s'
Reset suspension - 'Left or Right Ctrl + s'
"mix frontsuspup `modifier(shift_only, keyboard.s?0) | semantical.frontsuspup?0`" <-- Press 'Left or Right Shift' & 's'
"mix frontsuspdwn `modifier(no_modifier?0, keyboard.s?0) |semantical.frontsuspdwn?0`" <-- Press 's' only
"mix rearsuspup `modifier(shift_only, keyboard.s?0) | semantical.rearsuspup?0`" <-- Press 'Left or Right Shift' & 's'
"mix rearsuspdwn `modifier(no_modifier?0, keyboard.s?0) | semantical.rearsuspdwn?0`" <-- Press 's' only
"mix suspreset `modifier(ctrl_only, keyboard.s?0) | semantical.suspreset?0`" <-- Press 'Left or Right Ctrl' & 's'
OR
Lower front suspension - 'Left Ctrl + s'
Raise front suspension - 'Left Shift + s'
Lower rear suspension - 'Right Ctrl + s'
Raise rear suspension - 'Right Shift + s'
Reset suspension - 'Left or Right Alt + s'
"mix frontsuspup `keyboard.lshift?0 & keyboard.s?0 | semantical.frontsuspup?0`" <-- Press 'Left Shift' & 's'
"mix frontsuspdwn `keyboard.lctrl?0 & keyboard.s?0 |semantical.frontsuspdwn?0`" <-- Press 'Left Ctrl' & 's'
"mix rearsuspup `keyboard.rshift?0 & keyboard.s?0 | semantical.rearsuspup?0`" <-- Press 'Right Shift' & 's'
"mix rearsuspdwn `keyboard.rctrl?0 & keyboard.s?0 | semantical.rearsuspdwn?0`" <-- Press 'Right Ctrl' & 's'
"mix suspreset `modifier(alt_only, keyboard.s?0) | semantical.suspreset?0`" <-- Press 'Left or Right Alt' & 's'


Note: Those key bindings will now show as 'complex' in the game menus.

Just use the above examples to help you assign your key requirements to your truck functions.



Go back to the first post for the full list of what's available: https://roextended.ro/forum/viewtopic.p ... 744#p24744
Last edited by JHTrucker on November 5th, 2022, 2:01 pm, edited 8 times in total.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
User avatar
JHTrucker
Expert
Posts: 1334
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 25/04/2022

Post by JHTrucker » May 10th, 2022, 5:51 pm

Use Analogue controller Thumbstick to change sequential gears Up/Down.

Which ever thumbstick is assigned to look left/right/up/down it will now look left/right & gear up/down.

Set look left/right deadzone to 0.5 to prevent look movement when shifting gears:
"mix looklranaraw `deadzone(-sel(c_jilooklr, -j_look_lr?0, j_look_lr?0), 0.5)`"

Remove look up/down movement:
"mix lookudanaraw ``"

With Look up/down set as "Inverted and Centered".
Look up will now increase gears:
"mix gearup `clamp(deadzone(sel(c_jilookud, -j_look_ud?0, j_look_ud?0), 0.5), -0.0, 1.0)`"

Look down will now decrease gears:
"mix geardown `clamp(deadzone(-sel(c_jilookud, -j_look_ud?0, j_look_ud?0), 0.5), -0.0, 1.0)`"

That's it.


Go back to the first post for the full list of what's available: viewtopic.php?p=24744#p24744
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
User avatar
JHTrucker
Expert
Posts: 1334
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 08/06/2022

Post by JHTrucker » June 20th, 2022, 5:55 pm

CAM 1 Instant look left, right & back 'out of the window' and re-centre with just 2 buttons. 1.38+
Makes driving much easier when pulling out of junctions etc.

This will allow you to toggle between game standard CAM 1 look movement and instant look movement with instant re-centre.

Assign 2 keys/buttons to one of these pair of left/right options in the keys menu depending on what game standard look movement you want:
'Look Left' & 'Look Right'.
OR
'Interior Look Up Left' & 'Interior Look Up Right'
OR
'Interior Look Left' & 'Interior Look Right'

Press 'CAM 1' to toggle between default look left/right slow movement or fixed left/right interior look & instant look left/right and instant re-centre.

When you toggle 'instant look' on:
Press and hold 'Look Left', 'Interior Look Up Left' or 'Interior Look Left' button for instant look Left.
Press and hold 'Look Right', 'Interior Look Up Right' or 'Interior Look Right' button for instant look Right.
Press and hold both 'Look Left' & 'Look Right' or 'Interior Look Up Left' & 'Interior Look Up Right' or 'Interior Look Left' & 'Interior Look Right' to look back over out of the drivers window.
When you stop pressing the buttons it'll instant re-centre the view.

The instant interior look options match the same position as the game standard interior look positions.

If you move the mouse it'll revert back to game standard look movement. Just press 'CAM 1' when you want instant look movement again.

Note: Line numbers are different between game versions, just match the "mix name".

config_lines[278]: "mix headtron `c_ht_on`"

When driving LHD trucks, use this line:
config_lines[279]: "mix headtryaw `(0.31 * lookleft?0 * ! lookright?0 * ! lookpos2?0 * ! lookpos3?0 * ! lookpos4?0 * ! lookpos5?0) + (0.22 * lookpos3?0 * ! lookleft?0 * ! lookright?0 * ! lookpos2?0 * ! lookpos4?0 * ! lookpos5?0) + (0.4 * lookpos5?0 * ! lookleft?0 * ! lookright?0 * ! lookpos2?0 * ! lookpos3?0 * ! lookpos4?0) + (-0.31 * lookright?0 * ! lookleft?0 * ! lookpos2?0 * ! lookpos3?0 * ! lookpos4?0 * ! lookpos5?0) + (-0.22 * lookpos2?0 * ! lookleft?0 * ! lookright?0 * ! lookpos3?0 * ! lookpos4?0 * ! lookpos5?0) + (-0.4 * lookpos4?0 * ! lookleft?0 * ! lookright?0 * ! lookpos2?0 * ! lookpos3?0 * ! lookpos5?0) + (lookleft?0 * lookright?0) + (lookpos3?0 * lookpos2?0) + (lookpos5?0 * lookpos4?0)`"
OR
When driving RHD trucks, use this line:
config_lines[279]: "mix headtryaw `(0.31 * lookleft?0 * ! lookright?0 * ! lookpos2?0 * ! lookpos3?0 * ! lookpos4?0 * ! lookpos5?0) + (0.22 * lookpos3?0 * ! lookleft?0 * ! lookright?0 * ! lookpos2?0 * ! lookpos4?0 * ! lookpos5?0) + (0.4 * lookpos5?0 * ! lookleft?0 * ! lookright?0 * ! lookpos2?0 * ! lookpos3?0 * ! lookpos4?0) + (-0.31 * lookright?0 * ! lookleft?0 * ! lookpos2?0 * ! lookpos3?0 * ! lookpos4?0 * ! lookpos5?0) + (-0.22 * lookpos2?0 * ! lookleft?0 * ! lookright?0 * ! lookpos3?0 * ! lookpos4?0 * ! lookpos5?0) + (-0.4 * lookpos4?0 * ! lookleft?0 * ! lookright?0 * ! lookpos2?0 * ! lookpos3?0 * ! lookpos5?0) - (lookleft?0 * lookright?0) - (lookpos3?0 * lookpos2?0) - (lookpos5?0 * lookpos4?0)`"

config_lines[507]: "mix headtren `cam1?0 | (cam5?0 | sign(abs(mouse.rel_position.x?0))) * c_ht_on`"

That's it.

Note: If you use the wrong "mix headtryaw..." line edit, you'll look back into the sleeper area rather than out of the window.


Go back to the first post for the full list of what's available: viewtopic.php?p=24744#p24744
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
baranismen
Posts: 18
Joined: September 13th, 2022, 11:23 am
Location: Izmir/Turkey

Re: Controls.sii file changes to enhance the trucking experience. First post Updated 14/04/2022

Post by baranismen » November 3rd, 2022, 9:29 am

JHTrucker wrote:
April 25th, 2022, 6:48 pm
How to combine your key functions with shift, ctrl or alt.
(For those of you that don't have enough spare keys for all the functions you require).

Note: If you use 'shift' & 'ctrl' for gear up/down then you can't use them for other functions.
"mix gearup `keyboard.lshift?0 | keyboard.rshift?0 | semantical.gearup?0`" <--- Game default
"mix geardown `keyboard.lctrl?0 | keyboard.rctrl?0 | semantical.geardown?0`" <--- Game default

Example: Assign 'Horn' & 'Air Horn' to the same key 'h' but use 'shift' to separate them.
"mix horn `modifier(! shift_only, keyboard.h?0) | semantical.horn?0`" <--- Horn = Press 'h' without pressing 'shift'
"mix airhorn `modifier(shift_only, keyboard.h?0) | semantical.airhorn?0`" <--- Air Horn = Press 'shift + h'.
You can replace 'shift_only' with 'ctrl_only' or 'alt_only' as required.

Example: Assign 'Horn', 'Air Horn', 'Light Horn' & 'Beacon' to the same key 'h' but use 'shift', 'ctrl' & 'alt' to separate them.
"mix horn `modifier(no_modifier?0, keyboard.h?0) | semantical.horn?0`" <--- Horn = Press 'h' without pressing either 'shift, ctrl or alt'
"mix airhorn `modifier(shift_only, keyboard.h?0) | semantical.airhorn?0`" <--- Air Horn = Press 'shift + h'.
"mix lighthorn `modifier(ctrl_only, keyboard.h?0) | semantical.lighthorn?0`" <--- Light Horn = Press 'ctrl + h'.
"mix beacon `modifier(alt_only, keyboard.h?0) | semantical.beacon?0`" <--- Beacon = Press 'alt + h'.

Example: Truck lift axle = 'u' - Trailer lift axle = 'shift + u'
"mix liftaxle `modifier(! shift_only, keyboard.u?0) | semantical.liftaxle?0`"
"mix liftaxlet `modifier(shift_only, keyboard.u?0) | semantical.liftaxlet?0`"

Example: Wipers switch through settings = 'p' - Wipers switch back over = 'shift + p'
"mix wipers `modifier(! shift_only, keyboard.p?0) | semantical.wipers?0`"
"mix wipersback `modifier(shift_only, keyboard.p?0) | semantical.wipersback?0`"

Example: From game version 1.44:
Lower front & rear suspension - 's'
Raise front & rear suspension - 'shift + s'
Reset suspension - 'ctrl + s'

"mix frontsuspup `modifier(shift_only, keyboard.s?0) | semantical.frontsuspup?0`"
"mix frontsuspdwn `modifier(no_modifier?0, keyboard.s?0) |semantical.frontsuspdwn?0`"
"mix rearsuspup `modifier(shift_only, keyboard.s?0) | semantical.rearsuspup?0`"
"mix rearsuspdwn `modifier(no_modifier?0, keyboard.s?0) | semantical.rearsuspdwn?0`"
"mix suspreset `modifier(ctrl_only, keyboard.s?0) | semantical.suspreset?0`"

Note: Those key bindings will now show as 'complex' in the game menus.

Just use the above examples to help you assign your key requirements to your truck functions.



Go back to the first post for the full list of what's available: https://roextended.ro/forum/viewtopic.p ... 744#p24744
Hi, is this still valid for 1.45 ? As I see some older posts say something like "mix parkingbrake 'keyboard.lctrl?0 & keyboard.space?0'", which is different than above. Which one is valid ?
User avatar
JHTrucker
Expert
Posts: 1334
Joined: February 7th, 2020, 3:19 pm
Location: UK

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

Post by JHTrucker » November 4th, 2022, 12:19 am

@baranismen - There's various different ways to do it...

keyboard.lctrl?0 & keyboard.space?0 = left control & space = input pressed.

modifier(ctrl_only, keyboard.space?0) = either control & space = input pressed.

(keyboard.lctrl?0 | keyboard.rctrl?0) & keyboard.space?0 = either control & space = input pressed.

keyboard.lctrl?0 * keyboard.space?0 = left control & space = input pressed.

I'll update my post to add the other combinations to make it clearer, thanks!
And as long as the mix name exists then the line edit will work on any game version.
Example: Suspension was added in 1.44 and therefore can't be used on prior versions.

If I've confused you, just tell me what it is your trying to do, what keys do you want to set to do what operation?
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
baranismen
Posts: 18
Joined: September 13th, 2022, 11:23 am
Location: Izmir/Turkey

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

Post by baranismen » November 4th, 2022, 8:23 am

JHTrucker wrote:
November 4th, 2022, 12:19 am
@baranismen - There's various different ways to do it...

keyboard.lctrl?0 & keyboard.space?0 = left control & space = input pressed.

modifier(ctrl_only, keyboard.space?0) = either control & space = input pressed.

(keyboard.lctrl?0 | keyboard.rctrl?0) & keyboard.space?0 = either control & space = input pressed.

keyboard.lctrl?0 * keyboard.space?0 = left control & space = input pressed.

I'll update my post to add the other combinations to make it clearer, thanks!
And as long as the mix name exists then the line edit will work on any game version.
Example: Suspension was added in 1.44 and therefore can't be used on prior versions.

If I've confused you, just tell me what it is your trying to do, what keys do you want to set to do what operation?
Hi and thanks for your answer.

I actually made a button box with arduino which sends keyboard presses via Python to the game, and no matter how I set the controls.sii file according to the combinations I've made, I could not entirely make it all work; say I made shift 1 to shift 5 for retarder levels, even if I add no_modifier to all other "1" keys in the file, it still changes the camera and also changes the retarder position. Here's the list I need to introduce, keys can be changed, can you help me with these?

Switches:
Retarder:
retOffKey: shift + 1
retPos1Key: shift + 2
retPos2Key: shift + 3
retPos3Key: shift + 4
retPos4Key: shift + 5
Lights:
lgtOffKey: l
lgtPrkKey: ctrl + l
lgtLowKey: shift + l
lgtHghKey: k
Blinkers:
blnLftKey: alt + q
blnRgtKey: alt + e
Wipers:
wipOffKey: p
wipSpd1Key: ctrl + p
wipSpd2Key: shift + p
wipSpd3Key: alt + p
Ignition:
elcOffKey: e
elcIgnKey: ctrl + e
engSrtKey: shift + e
Switchboard:
trdWhlKey: t
lgtBcnKey: o
lgtHzdKey: f
difLocKey: v
hndBrkKey: space


Buttons:
Switchboard:
engBrkKey: b
truAxlKey: u
trlAxlKey: y
Windows:
winLdnKey: ctrl + alt + w
winLupKey: ctrl + shift + w
winRdnKey: ctrl + alt + s
winRupKey: ctrl + shift + s
Suspension:
susFrtUpKey: ctrl + f5
susFrtDnKey: ctrl + f6
susBckUpKey: ctrl + f7
susBckDnKey: ctrl + f8
susResetKey: ctrl + f9
User avatar
JHTrucker
Expert
Posts: 1334
Joined: February 7th, 2020, 3:19 pm
Location: UK

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

Post by JHTrucker » November 4th, 2022, 7:28 pm

@baranismen - I've updated my 'combine' post with more examples and formatting.

But using your example, shift + 1 to shift + 5 for retarder would look like this:
Your line numbers might be different to these.

config_lines[191]: "mix cam1 `modifier(no_modifier, keyboard.key1?0) | semantical.cam1?0`"
config_lines[192]: "mix cam2 `modifier(no_modifier, keyboard.key2?0) | semantical.cam2?0`"
config_lines[193]: "mix cam3 `modifier(no_modifier, keyboard.key3?0) | semantical.cam3?0`"
config_lines[194]: "mix cam4 `modifier(no_modifier, keyboard.key4?0) | semantical.cam4?0`"
config_lines[195]: "mix cam5 `modifier(no_modifier, keyboard.key5?0) | semantical.cam5?0`"

config_lines[330]: "mix retarder0 `modifier(shift_only, keyboard.key1?0) | semantical.retarder0?0`"
config_lines[331]: "mix retarder1 `modifier(shift_only, keyboard.key2?0) | semantical.retarder1?0`"
config_lines[332]: "mix retarder2 `modifier(shift_only, keyboard.key3?0) | semantical.retarder2?0`"
config_lines[333]: "mix retarder3 `modifier(shift_only, keyboard.key4?0) | semantical.retarder3?0`"
config_lines[334]: "mix retarder4 `modifier(shift_only, keyboard.key5?0) | semantical.retarder4?0`"

Using the above I can press shift + 1,2,3,4 & 5 and there's no change to the camera.
The camera only changes when pressing 1,2,3,4 & 5
Note: keyboard.key1?0 and not keyboard.1?0 it seems you need .key when it's a number only.

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

config_lines[308]: "mix engine `semantical.engine?0`"
config_lines[309]: "mix engineelect `semantical.engineelect?0`"
config_lines[310]: "mix ignitionoff `modifier(no_modifier, keyboard.e?0) | semantical.ignitionoff?0`"
config_lines[311]: "mix ignitionon `modifier(ctrl_only, keyboard.e?0) | semantical.ignitionon?0`"
config_lines[312]: "mix ignitionstrt `modifier(shift_only, keyboard.e?0) | semantical.ignitionstrt?0`"

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

config_lines[314]: "mix frontsuspup `modifier(ctrl_only, keyboard.f5?0) | semantical.frontsuspup?0`"
config_lines[315]: "mix frontsuspdwn `modifier(ctrl_only, keyboard.f6?0) | semantical.frontsuspdwn?0`"
config_lines[316]: "mix rearsuspup `modifier(ctrl_only, keyboard.f7?0) | semantical.rearsuspup?0`"
config_lines[317]: "mix rearsuspdwn `modifier(ctrl_only, keyboard.f8?0) | semantical.rearsuspdwn?0`"
config_lines[318]: "mix suspreset `modifier(ctrl_only, keyboard.f9?0) | semantical.suspreset?0`"

config_lines[475]: "mix advpage0 `modifier(no_modifier, keyboard.f5?0) | semantical.advpage0?0`"
config_lines[476]: "mix advpage1 `modifier(no_modifier, keyboard.f6?0) | semantical.advpage1?0`"
config_lines[477]: "mix advpage2 `modifier(no_modifier, keyboard.f7?0) | semantical.advpage2?0`"
config_lines[478]: "mix advpage3 `modifier(no_modifier, keyboard.f8?0) | semantical.advpage3?0`"
config_lines[479]: "mix advpage4 `modifier(no_modifier, keyboard.f9?0) | semantical.advpage4?0`"

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

config_lines[339]: "mix rwinopen `keyboard.lctrl?0 & keyboard.lalt?0 & keyboard.s?0 | semantical.rwinopen?0`"
config_lines[340]: "mix rwinclose `keyboard.lctrl?0 & keyboard.lshift?0 & keyboard.s?0 | semantical.rwinclose?0`"
config_lines[341]: "mix lwinopen `keyboard.lctrl?0 & keyboard.lalt?0 & keyboard.w?0 | semantical.lwinopen?0`"
config_lines[342]: "mix lwinclose `keyboard.lctrl?0 & keyboard.lshift?0 & keyboard.w?0 | semantical.lwinclose?0`"

config_lines[298]: "mix dforward ``"
config_lines[299]: "mix dbackward ``"

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

config_lines[344]: "mix wipers `semantical.wipers?0`"
config_lines[345]: "mix wipersback `semantical.wipersback?0`"
config_lines[346]: "mix wipers0 `modifier(no_modifier, keyboard.p?0) | semantical.wipers0?0`"
config_lines[347]: "mix wipers1 `modifier(ctrl_only, keyboard.p?0) | semantical.wipers1?0`"
config_lines[348]: "mix wipers2 `modifier(shift_only, keyboard.p?0) | semantical.wipers2?0`"
config_lines[349]: "mix wipers3 `modifier(alt_only, keyboard.p?0) | semantical.wipers3?0`"

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

config_lines[355]: "mix light `semantical.light?0`"
config_lines[356]: "mix lightoff `modifier(no_modifier, keyboard.l?0) | semantical.lightoff?0`"
config_lines[357]: "mix lightpark `modifier(ctrl_only, keyboard.l?0) | semantical.lightpark?0`"
config_lines[358]: "mix lighton `modifier(shift_only, keyboard.l?0) | semantical.lighton?0`"
config_lines[359]: "mix hblight `keyboard.k?0 | semantical.hblight?0`"

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

config_lines[360]: "mix lblinker `modifier(alt_only, keyboard.q?0) | semantical.lblinker?0`"
config_lines[361]: "mix lblinkerh `semantical.lblinkerh?0`"
config_lines[362]: "mix rblinker `modifier(alt_only, keyboard.e?0) | semantical.rblinker?0`"
config_lines[363]: "mix rblinkerh `semantical.rblinkerh?0`"
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
baranismen
Posts: 18
Joined: September 13th, 2022, 11:23 am
Location: Izmir/Turkey

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

Post by baranismen » November 5th, 2022, 9:24 pm

JHTrucker wrote:
November 4th, 2022, 7:28 pm
@baranismen - I've updated my 'combine' post with more examples and formatting.

But using your example, shift + 1 to shift + 5 for retarder would look like this:
Your line numbers might be different to these.

config_lines[191]: "mix cam1 `modifier(no_modifier, keyboard.key1?0) | semantical.cam1?0`"
config_lines[192]: "mix cam2 `modifier(no_modifier, keyboard.key2?0) | semantical.cam2?0`"
config_lines[193]: "mix cam3 `modifier(no_modifier, keyboard.key3?0) | semantical.cam3?0`"
config_lines[194]: "mix cam4 `modifier(no_modifier, keyboard.key4?0) | semantical.cam4?0`"
config_lines[195]: "mix cam5 `modifier(no_modifier, keyboard.key5?0) | semantical.cam5?0`"

config_lines[330]: "mix retarder0 `modifier(shift_only, keyboard.key1?0) | semantical.retarder0?0`"
config_lines[331]: "mix retarder1 `modifier(shift_only, keyboard.key2?0) | semantical.retarder1?0`"
config_lines[332]: "mix retarder2 `modifier(shift_only, keyboard.key3?0) | semantical.retarder2?0`"
config_lines[333]: "mix retarder3 `modifier(shift_only, keyboard.key4?0) | semantical.retarder3?0`"
config_lines[334]: "mix retarder4 `modifier(shift_only, keyboard.key5?0) | semantical.retarder4?0`"

Using the above I can press shift + 1,2,3,4 & 5 and there's no change to the camera.
The camera only changes when pressing 1,2,3,4 & 5
Note: keyboard.key1?0 and not keyboard.1?0 it seems you need .key when it's a number only.

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

config_lines[308]: "mix engine `semantical.engine?0`"
config_lines[309]: "mix engineelect `semantical.engineelect?0`"
config_lines[310]: "mix ignitionoff `modifier(no_modifier, keyboard.e?0) | semantical.ignitionoff?0`"
config_lines[311]: "mix ignitionon `modifier(ctrl_only, keyboard.e?0) | semantical.ignitionon?0`"
config_lines[312]: "mix ignitionstrt `modifier(shift_only, keyboard.e?0) | semantical.ignitionstrt?0`"

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

config_lines[314]: "mix frontsuspup `modifier(ctrl_only, keyboard.f5?0) | semantical.frontsuspup?0`"
config_lines[315]: "mix frontsuspdwn `modifier(ctrl_only, keyboard.f6?0) | semantical.frontsuspdwn?0`"
config_lines[316]: "mix rearsuspup `modifier(ctrl_only, keyboard.f7?0) | semantical.rearsuspup?0`"
config_lines[317]: "mix rearsuspdwn `modifier(ctrl_only, keyboard.f8?0) | semantical.rearsuspdwn?0`"
config_lines[318]: "mix suspreset `modifier(ctrl_only, keyboard.f9?0) | semantical.suspreset?0`"

config_lines[475]: "mix advpage0 `modifier(no_modifier, keyboard.f5?0) | semantical.advpage0?0`"
config_lines[476]: "mix advpage1 `modifier(no_modifier, keyboard.f6?0) | semantical.advpage1?0`"
config_lines[477]: "mix advpage2 `modifier(no_modifier, keyboard.f7?0) | semantical.advpage2?0`"
config_lines[478]: "mix advpage3 `modifier(no_modifier, keyboard.f8?0) | semantical.advpage3?0`"
config_lines[479]: "mix advpage4 `modifier(no_modifier, keyboard.f9?0) | semantical.advpage4?0`"

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

config_lines[339]: "mix rwinopen `keyboard.lctrl?0 & keyboard.lalt?0 & keyboard.s?0 | semantical.rwinopen?0`"
config_lines[340]: "mix rwinclose `keyboard.lctrl?0 & keyboard.lshift?0 & keyboard.s?0 | semantical.rwinclose?0`"
config_lines[341]: "mix lwinopen `keyboard.lctrl?0 & keyboard.lalt?0 & keyboard.w?0 | semantical.lwinopen?0`"
config_lines[342]: "mix lwinclose `keyboard.lctrl?0 & keyboard.lshift?0 & keyboard.w?0 | semantical.lwinclose?0`"

config_lines[298]: "mix dforward ``"
config_lines[299]: "mix dbackward ``"

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

config_lines[344]: "mix wipers `semantical.wipers?0`"
config_lines[345]: "mix wipersback `semantical.wipersback?0`"
config_lines[346]: "mix wipers0 `modifier(no_modifier, keyboard.p?0) | semantical.wipers0?0`"
config_lines[347]: "mix wipers1 `modifier(ctrl_only, keyboard.p?0) | semantical.wipers1?0`"
config_lines[348]: "mix wipers2 `modifier(shift_only, keyboard.p?0) | semantical.wipers2?0`"
config_lines[349]: "mix wipers3 `modifier(alt_only, keyboard.p?0) | semantical.wipers3?0`"

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

config_lines[355]: "mix light `semantical.light?0`"
config_lines[356]: "mix lightoff `modifier(no_modifier, keyboard.l?0) | semantical.lightoff?0`"
config_lines[357]: "mix lightpark `modifier(ctrl_only, keyboard.l?0) | semantical.lightpark?0`"
config_lines[358]: "mix lighton `modifier(shift_only, keyboard.l?0) | semantical.lighton?0`"
config_lines[359]: "mix hblight `keyboard.k?0 | semantical.hblight?0`"

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

config_lines[360]: "mix lblinker `modifier(alt_only, keyboard.q?0) | semantical.lblinker?0`"
config_lines[361]: "mix lblinkerh `semantical.lblinkerh?0`"
config_lines[362]: "mix rblinker `modifier(alt_only, keyboard.e?0) | semantical.rblinker?0`"
config_lines[363]: "mix rblinkerh `semantical.rblinkerh?0`"
Thank you so much for your efforts! I wonder if the controls.sii file is case-sensitive, as some of my keypresses don't seem to work in-game for some reason. Even with using regular keys, i can't seem to get the actions done.

I think there's something spesific about the consecutive commands like retarder, wipers, and ignition, because those are the only one i can't seem to control even with regular keys.

Code: Select all

 config_lines[309]: "mix ignitionoff `keyboard.e?0 | semantical.ignitionoff?0`"
 config_lines[310]: "mix ignitionon `keyboard.z?0 | semantical.ignitionon?0`"
 config_lines[311]: "mix ignitionstrt `keyboard.x?0 | semantical.ignitionstrt?0`"

Code: Select all

 config_lines[329]: "mix retarder0 `modifier(shift_only, keyboard.key1?0) | semantical.retarder0?0`"
 config_lines[330]: "mix retarder1 `modifier(shift_only, keyboard.key2?0) | semantical.retarder1?0`"
 config_lines[331]: "mix retarder2 `modifier(shift_only, keyboard.key3?0) | semantical.retarder2?0`"
 config_lines[332]: "mix retarder3 `modifier(shift_only, keyboard.key4?0) | semantical.retarder3?0`"
 config_lines[333]: "mix retarder4 `modifier(shift_only, keyboard.key5?0) | semantical.retarder4?0`"

Code: Select all

 config_lines[345]: "mix wipers0 `modifier(no_modifier, keyboard.p?0) | semantical.wipers0?0`"
 config_lines[346]: "mix wipers1 `modifier(ctrl_only, keyboard.p?0) | semantical.wipers1?0`"
 config_lines[347]: "mix wipers2 `modifier(shift_only, keyboard.p?0) | semantical.wipers2?0`"
 config_lines[348]: "mix wipers3 `modifier(alt_only, keyboard.p?0) | semantical.wipers3?0`"
User avatar
JHTrucker
Expert
Posts: 1334
Joined: February 7th, 2020, 3:19 pm
Location: UK

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

Post by JHTrucker » November 6th, 2022, 2:24 pm

Baranismen - Those lines were taken direct out of my test controls.sii file after I'd tested they worked by pressing your chosen keys. They're not case sensitive.

You should test key pressing combos without your button box connected in case it's causing the problem.
If they work as expected then check your button box code.

Also check windows 'sticky keys', it might be trying to help you.

EDIT:
Without using modifiers you need this format:
! keyboard.lshift?0 & keyboard.a?0 <-- Press 'a' without pressing 'Left Shift'.
keyboard.lshift?0 & keyboard.a?0 <-- Press 'a' whilst also pressing 'Left Shift'.

All use 'left shift' / 'left alt' / 'left ctrl' where required.

Make sure there's no 'auto' settings ticked in the gameplay menu.
Make sure you remove default keys for wipers and engine start/stop otherwise they'll cause problems.
I use auto retarder and so never tested your settings.

config_lines[191]: "mix cam1 `! keyboard.lshift?0 & keyboard.key1?0 | semantical.cam1?0`"
config_lines[192]: "mix cam2 `! keyboard.lshift?0 & keyboard.key2?0 | semantical.cam2?0`"
config_lines[193]: "mix cam3 `! keyboard.lshift?0 & keyboard.key3?0 | semantical.cam3?0`"
config_lines[194]: "mix cam4 `! keyboard.lshift?0 & keyboard.key4?0 | semantical.cam4?0`"
config_lines[195]: "mix cam5 `! keyboard.lshift?0 & keyboard.key5?0 | semantical.cam5?0`"

config_lines[330]: "mix retarder0 `keyboard.lshift?0 & keyboard.key1?0 | semantical.retarder0?0`"
config_lines[331]: "mix retarder1 `keyboard.lshift?0 & keyboard.key2?0 | semantical.retarder1?0`"
config_lines[332]: "mix retarder2 `keyboard.lshift?0 & keyboard.key3?0 | semantical.retarder2?0`"
config_lines[333]: "mix retarder3 `keyboard.lshift?0 & keyboard.key4?0 | semantical.retarder3?0`"
config_lines[334]: "mix retarder4 `keyboard.lshift?0 & keyboard.key5?0 | semantical.retarder4?0`"

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

config_lines[308]: "mix engine `semantical.engine?0`" <-- must look like this
config_lines[309]: "mix engineelect `semantical.engineelect?0`" <-- must look like this
config_lines[310]: "mix ignitionoff `! keyboard.lshift?0 & ! keyboard.lctrl?0 & ! keyboard.lalt?0 & keyboard.e?0 | semantical.ignitionoff?0`"
config_lines[311]: "mix ignitionon `keyboard.lctrl?0 & keyboard.e?0 | semantical.ignitionon?0`"
config_lines[312]: "mix ignitionstrt `keyboard.lshift?0 & keyboard.e?0 | semantical.ignitionstrt?0`"

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

config_lines[314]: "mix frontsuspup `keyboard.lctrl?0 & keyboard.f5?0 | semantical.frontsuspup?0`"
config_lines[315]: "mix frontsuspdwn `keyboard.lctrl?0 & keyboard.f6?0 | semantical.frontsuspdwn?0`"
config_lines[316]: "mix rearsuspup `keyboard.lctrl?0 & keyboard.f7?0 | semantical.rearsuspup?0`"
config_lines[317]: "mix rearsuspdwn `keyboard.lctrl?0 & keyboard.f8?0 | semantical.rearsuspdwn?0`"
config_lines[318]: "mix suspreset `keyboard.lctrl?0 & keyboard.f9?0 | semantical.suspreset?0`"

config_lines[475]: "mix advpage0 `! keyboard.lctrl?0 & keyboard.f5?0 | semantical.advpage0?0`"
config_lines[476]: "mix advpage1 `! keyboard.lctrl?0 & keyboard.f6?0 | semantical.advpage1?0`"
config_lines[477]: "mix advpage2 `! keyboard.lctrl?0 & keyboard.f7?0 | semantical.advpage2?0`"
config_lines[478]: "mix advpage3 `! keyboard.lctrl?0 & keyboard.f8?0 | semantical.advpage3?0`"
config_lines[479]: "mix advpage4 `! keyboard.lctrl?0 & keyboard.f9?0 | semantical.advpage4?0`"

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

config_lines[339]: "mix rwinopen `keyboard.lctrl?0 & keyboard.lalt?0 & keyboard.s?0 | semantical.rwinopen?0`"
config_lines[340]: "mix rwinclose `keyboard.lctrl?0 & keyboard.lshift?0 & keyboard.s?0 | semantical.rwinclose?0`"
config_lines[341]: "mix lwinopen `keyboard.lctrl?0 & keyboard.lalt?0 & keyboard.w?0 | semantical.lwinopen?0`"
config_lines[342]: "mix lwinclose `keyboard.lctrl?0 & keyboard.lshift?0 & keyboard.w?0 | semantical.lwinclose?0`"

config_lines[298]: "mix dforward ``"
config_lines[299]: "mix dbackward ``"

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

config_lines[344]: "mix wipers `semantical.wipers?0`" <-- must look like this
config_lines[345]: "mix wipersback `semantical.wipersback?0`" <-- must look like this
config_lines[346]: "mix wipers0 `! keyboard.lshift?0 & ! keyboard.lctrl?0 & ! keyboard.lalt?0 & keyboard.p?0 | semantical.wipers0?0`"
config_lines[347]: "mix wipers1 `keyboard.lctrl?0 & keyboard.p?0 | semantical.wipers1?0`"
config_lines[348]: "mix wipers2 `keyboard.lshift?0 & keyboard.p?0 | semantical.wipers2?0`"
config_lines[349]: "mix wipers3 `keyboard.lalt?0 & keyboard.p?0 | semantical.wipers3?0`"

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

config_lines[355]: "mix light `semantical.light?0`" <-- must look like this
config_lines[356]: "mix lightoff `! keyboard.lshift?0 & ! keyboard.lctrl?0 & keyboard.l?0 | semantical.lightoff?0`"
config_lines[357]: "mix lightpark `keyboard.lctrl?0 & keyboard.l?0 | semantical.lightpark?0`"
config_lines[358]: "mix lighton `keyboard.lshift?0 & keyboard.l?0 | semantical.lighton?0`"
config_lines[359]: "mix hblight `keyboard.k?0 | semantical.hblight?0`"

config_lines[360]: "mix lblinker `! keyboard.lalt?0 & keyboard.q?0 | semantical.lblinker?0`"
config_lines[361]: "mix lblinkerh `semantical.lblinkerh?0`"
config_lines[362]: "mix rblinker `! keyboard.lalt?0 & keyboard.e?0 | semantical.rblinker?0`"
config_lines[363]: "mix rblinkerh `semantical.rblinkerh?0`"
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
Post Reply