TRACKIR Closed window block solutions 1.38/1.39. Updated 21/12/2020

Make your game even better
alonzam99
Posts: 96
Joined: April 17th, 2020, 2:47 pm

Re: TRACKIR Closed window block solutions 1.38. Updated 15/07/2020

Post by alonzam99 » July 23rd, 2020, 7:09 pm

JHTrucker wrote:
July 23rd, 2020, 7:02 pm
Correct. But if it doesn't work for you... forget it, it's not a good solution anyway.
But why is it not working ? No red line in the console..
Is there a way to get it to work ?
thanks
User avatar
JHTrucker
Posts: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: TRACKIR Closed window block solutions 1.38. Updated 15/07/2020

Post by JHTrucker » July 23rd, 2020, 7:25 pm

post your current controls.sii file and i'll have a look at it.
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
alonzam99
Posts: 96
Joined: April 17th, 2020, 2:47 pm

Re: TRACKIR Closed window block solutions 1.38. Updated 15/07/2020

Post by alonzam99 » July 23rd, 2020, 7:27 pm

Attached.
Edit : added a zipped file if you can't download the sii.
Attachments
controls far left only.zip
(5.7 KiB) Downloaded 67 times
controls.sii
(31.01 KiB) Downloaded 68 times
User avatar
JHTrucker
Posts: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: TRACKIR Closed window block solutions 1.38. Updated 15/07/2020

Post by JHTrucker » July 23rd, 2020, 7:37 pm

Well controls.sii, that looks correct, so i don't know why is won't work for you. But like i said, it's far too easy to unblock through a closed window. I turn my head to the closed window and only a slight turn more unblocks. So best to have the open button as well to prevent this.
So no more discussion on this.

Read this in case it suits you better viewtopic.php?p=25705#p25705
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
User avatar
JHTrucker
Posts: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: TRACKIR Closed window block solutions 1.38. Updated 15/07/2020

Post by JHTrucker » July 26th, 2020, 8:17 pm

Option 1 for ATS & ETS2 game version 1.38 & 1.39:

20/01/2021 - A new version of Option 1 is currently being tested/tweaked.
This version provides a seamless transition through the open window when CAM1 switches off and CAM5 is switched on.
For the few that have downloaded option 1 and enjoy using it? keep an eye on this thread for the next update.


UPDATED 26/07/2020 - For game version 1.38
UPDATED 16/09/2020 - New menu mod V2. Lines 66 & 71 added. Lines 251, 254 & 256 amended. You can now adjust max head rotation & movement towards window to suit each truck (via menu mod) as ATS and ETS2 trucks have very different cab widths / interior camera files.
UPDATED 29/09/2020 - New menu mod V3 now including tweaked interior camera files for all default trucks. lines 254 & 256 amended and line 76 added.
UPDATED 25/10/2020 - Added Manual "basic" window operation as an alternative to the automated setup. Scroll to the bottom of the post for required edits.
UPDATED 28/10/2020 - New menu mods V3.1 & V4 - Huge controls.sii file edits - Reapply all lines except the window control buttons, lines 128/306/307/308/309, that haven't changed. Check what changed - viewtopic.php?p=30392#p30392
UPDATED 04/11/2020 - Minor improvements to line 173 & 254 (Tir x movement slider).
UPDATED 19/11/2020 - For game version 1.39 - New menu mods V3.2 & V4.1 - Reapply all lines except the window control buttons, lines 128/306/307/308/309, that haven't changed. Check what changed - viewtopic.php?p=31488#p31488
UPDATED 25/11/2020 - New menu mods V4.2 & V3.3, Line 59 added and Line 187 amended. What's changed? Look here: viewtopic.php?p=31760#p31760
UPDATED 12/12/2020 - Line 128 for manual window controls amended. What's changed? Look here: viewtopic.php?p=32529#p32529
UPDATED 21/12/2020 - New menu mods V4.3 & V3.4. What's changed? Look here: viewtopic.php?p=32920#p32920

Full TIR control inside and outside (gcam isn't used or required), but difficult to setup if you don't use logitech profiler software and instead you'll have to source you own solution to automate the window open/close process that i've detailed below or New 25/10/2020: Manual "basic" window operation as an alternative to the automated setup. Or use option 7 or VR/Tobii Eye/TIR option.

Option 1 features:
TIR always on inside and outside cab.
No fiddling with window buttons to set the best volume level, just open to 30%, 70% or 100% & fully closed with a push of a button (Automated controls only).
Here is a pic to illustrate what happens.
no block option 1.png
As you can see, when the window is closed or only 30% open your head doesn't stop turning suddenly because you are looking at the drivers window, instead of the SCS unrealistic block (g_cam_window_block for mouse/controller users only), you just keep turning your head... inside the cab.
Only when the window is >70% open does your head turn through the open window.

Two menu mods to choose from, v3.x or v4.x, both use the same required controls.sii file edits.
V4.x Supported trucks: SCS Trucks only:
ATS - Freightliner Cascadia 2019, International Lonestar, Kenworth T680 & W900, Mack Anthem, Peterbilt 389 & 579, Volvo VNL & Westernstar 49x.
ETS2 - Daf XF & XF Euro 6, Iveco Hiway & Stralis, Man TGX & TGX Euro 6, Mercedes Actros 2009 & 2014, Renault Magnum 2009, Premium & T, Scania R 2009, R 2016, Streamline & S 2016, Volvo FH16 2009 & 2012.
All others / mods are unsupported - You must therefore set the v4.x menu options correctly (v3.x unsupported & Head control "Dynamic") to use them with the v4.x mod.

V4.x - 3 modes of control - Auto "Dymanic" / Manual "Direct" / Unsupported (v3.x).
Auto "Dymanic" - This mode is for supported SCS trucks or mod trucks. You turn your head and it moves out through the open window.
Manual "Direct" - This mode is for supported SCS trucks only. Your head will only move out through an open window if you also lean sideways towards the open window at the same time as turning your head. You're in control of all head movement, keep it real.
Unsupported - This mode is for mod trucks that v4.x doesn't support and will then work the same as v3.x and its features only.
Important: Ensure you pick the correct mode in the V4.x menu to suit the truck you are currently driving.
High quality interiors always visible while your head is inside the truck cab.
Outside sounds don't increase through a closed window when looking over your shoulder.

V3.x If you always drive mod trucks or like using unrealistic cameras, devcam / cam 2 / etc then use this mod.
Low quality interiors when looking over your shoulder through a closed drivers window.

V3.x & V4.x - Refueling: Pull up at a fuel station as normal, switch off engine. Use your steering wheel to select which side to stand outside the truck, drivers side or passenger side, depending on which side the fuel pump is. Then press and hold the refuel button and you'll be stood outside between the fuel pump and your truck whilst the fuel tank fills up. Once you let go of the refuel button you'll be back in the cab and fuel filling stops. Note: Steering wheel selects left or right only, it doesn't matter how far you turn it, "slightly" in either direction is enough to select.
Refuel button is "number pad multiply" - Use this menu to choose your own refuel button. Pressing your activate key will still refuel in the standard "inside the cab" way, if for some crazy reason, you don't want to use this new method.

Window controls - Automated or Manual:

#1 - Manual "basic" window operation if automatic method is too difficult to setup.
You press open driver window button and your head is unblocked, it can now pass through the opening window.
You press open driver window button again and your head is blocked, back to only turning head inside the cab.
You press close driver window button and your head is blocked, back to only turning head inside the cab.

To open driver window to 50% only and therefore still be blocked, do this:
Quick press open driver window button.
When window is ~50% open, quick press open driver window button again. This will stop the window motion and will block your head. So you can open the window as far as you like as long as you then press open drivers window button again to stop the motion and you'll still be blocked.

To open driver window fully, do this:
Quick press open driver window button and leave it to open.
Your head isn't blocked whilst the window is opening, so just wait for it to finish.

Note: Pressing close driver window button will always block your head no matter how open the window is.

#2 - Manual "basic" window operation if automatic method is too difficult to setup.
You press open driver window button and your head is unblocked, it can now pass through the open window as normal.
You press close driver window button and your head is blocked, back to only turning head inside the cab.

That means you could open the window only 10% and be able to turn your head through it. So here is the correct way to use this option properly.
Example:
To open driver window to 50% only and therefore still be blocked, do this:
Quick press open driver window button.
When window is ~50% open, quick press close driver window button. This will stop the window motion and will block your head.

To open driver window to a point you think is ok to stick your head out, do this:
Quick press open driver window button.
When window is open enough, quick press open driver window button again. This will stop the window motion and will unblock your head.

To open driver window fully, do this:
Quick press open driver window button.
Your head isn't blocked whilst the window is opening, so just wait for it to finish.

Note: Pressing close driver window button will always block your head no matter how open the window is.

Automated window controls:
The logitech profiler software V5.10.127 that i use for my G27 wheel is used to record key strokes & timing and you assign 2 wheel buttons for open both windows & close both windows. The attached mod contains my ETS2 & ATS Logitech profiles for your info.
Read through the post first to see if you understand what i've written before trying this option or not.

Q&A Section is available at the bottom of this post.

You need to use the attached menu mod to make changes whilst in game.
Use either v3.x menu mod or one of the v4.x menu mods and set to load last.
Using the v4.x Menu mod, choose the one with the FOV that best matches your usual driving FOV (F4 in game).
I use FOV 60 in game and "TIR Option 1 Window Block Menu 1.39v4.x FOV-60.scs"
Note: This is a modded Tobii Eye menu so ignore the balloon tips.
The Menu mod is in English only and consists of:-


Head Tracking - Enable / Disable - Mouse only when disabled.
This allows you to turn off head tracking whilst in game, if required only.

Window blocking for LHD Truck (Untick) or for RHD Truck (Tick).
Set this to suit your current truck, so window block works correctly.

V4.x - SCS trucks (untick) : V3.x - Unsupported / mod trucks (Tick). ***Amended 19-11-2020***
Unsupported - This mode is for mod trucks that v4.x doesn't support and will then work the same as v3.x and its features only.
Important: Ensure you pick the correct mode in the V4.x menu to suit the truck you are currently driving.

Head movement control. ***New 28-10-2020***
V4.x & V3.x Auto (Dynamic) - V4.x Manual (Direct).
Auto "Dymanic" - This mode is for supported SCS trucks or mod trucks. You turn your head and it moves out through the open window.
Manual "Direct" - This mode is for supported SCS trucks only. Your head will only move out through an open window if you also lean sideways towards the open window at the same time as turning your head. You're in control of all head movement, keep it real.

Adjust head max rotation towards window if required - Default 140 degrees. ***New 16-09-2020***
With the windows open your head will fully rotate outside as normal regardless of this setting.

Manual / Auto lean forward when looking over your shoulder - Default 50. ***Amended 28-10-2020***
This gives you a better 'look back' view through a closed window - 0=Disable lean : Adjust as required: Varies per truck type.
Auto lean is disabled when the window is >70% open and your head passes through the open window as normal.
In v4 manual "Direct" mode this slider controls how far you can lean forward - Default 75%.

Adjust to keep your head inside the cabs closed window as required. ***New 16-09-2020***
Defaults: ATS: W900 = 35% - Others = 50% - ETS2: All = 75% : Lower=Closer to you - Higher=Closer to side window - Too high and you'll be through the window.

Window 'extra lean out' distance - Default 1.0. ***New 28-10-2020***
Gives a better view if that huge side exhaust is in the way.

How far you can move towards passenger side (TIR x) - Default 10% ***Amended 28-10-2020***
Move sideways slider increases up to 100% but only to the passenger side.
As long as LHD/RHD above is set correctly then you won't slide out of the door.
0% = No manual sideways movement & Small auto movement when turning to passenger side
or set to 1% to disable auto whilst keeping manual off.

Trigger 'Zoom View' when leaning forward (TIR z) - Default 9.0 ***Amended 19-11-2020***
As standard, when you lean forward you get closer to the dash.
This adds to that feature by allowing you to lean further forward and thereby trigger the in game zoom.
Set the slider to 0.0 to disable. The lower the value the sooner zoom will be triggered.
Feels right to lean forward to read up coming signs. One less button to press!
The zoom feature in game doesn't work with multimon_config.sii files with fixed FOV values, it therefore means this function will also not work with that setup.

Zoom Zone - Default 0.55 ***New 25-11-2020***
This allows you to set the area to the left & right that "triggering zoom view" is active to prevent unwanted head zoom at higher head angles.
5.00 = Up to 180 degrees left/right (head zoom always on).
2.5 = Up to 90 degrees left/right.
1.25 = Up to 45 degrees left/right (prevent head zoom when looking around at junctions etc).
0.55 = Up to 20 degrees left/right - Default - (good for head zooming to just read upcoming signs in front of you).

Refuel - You can choose your own refuel button. ***New 19-11-2020***
Use steering wheel to select left or right side. Then press and hold refuel button.

Reset Head Tracking - Re-centers your in game head.
Existing game function shown here for completeness.

Previous downloads = 73.
***New 21-12-2020***
TIR Option 1 Window Block Menu 1.39v4.3 & v3.4.zip
(270.1 KiB) Downloaded 11 times
Press SHIFT + NUMLOCK to access menu mod to make changes as required.
Press ESCAPE to go back to driving screen.

These are the option 1 file edits that are required along with either v3.x or v4.x menu mod:
Note: If you have used one of my other "head blocking options" you should reset the modified lines in your controls.sii file with the game default ones, associated with that option, that i display at the bottom of each "head blocking post" before editing your file with these changes.

Make a backup copy of controls.sii for safe keeping, just in case.
Edit with notepad/wordpad etc your controls.sii file.
NOTE: line numbers correct for game version 1.38 & 1.39:

Set these values as my option 1 defaults:
config_lines[52]: "constant c_ht_on 1.000000"
config_lines[54]: "constant c_et_head 1.000000"
config_lines[55]: "constant c_et_pos 0.000000"
config_lines[56]: "constant c_et_yawsc 1.000000" ***New 28-10-2020***
config_lines[59]: "constant c_etwm_yawsc 0.550000" ***New 25-11-2020***
config_lines[65]: "constant c_et_hv_res 0.100000" ***Amended 28-10-2020***
config_lines[66]: "constant c_et_gv_ext 0.391111"
config_lines[71]: "constant c_et_gv_end 0.500000"
config_lines[72]: "constant c_et_hv_sc 0.900000" ***Amended 19-11-2020***
config_lines[76]: "constant c_et_hv_end 0.500000" ***Amended 28-10-2020***
config_lines[77]: "constant c_et_hv_ac 0.000000" ***New 28-10-2020***
config_lines[78]: "constant c_et_hv_mode 1.000000" ***New 28-10-2020***

Replace this line:
config_lines[130]: "mix eyepause ``"
With this line: ***New 19-11-2020***
config_lines[130]: "mix eyepause `keyboard.nummultiply?0`"

Replace this line:
config_lines[173]: "mix cam1 `keyboard.key1?0 | semantical.cam1?0`"
With this line: ***Amended 19-11-2020***
config_lines[173]: "mix cam1 `keyboard.key1?0 + ((sign(-sign(trackir.device.position.yaw?0 - 0.56) + 1) + sign(sign(trackir.device.position.yaw?0 - 0.61) + 1)) * ! c_et_pos * c_ht_on + (sign(sign(trackir.device.position.yaw?0 + 0.56) + 1) + sign(-sign(trackir.device.position.yaw?0 + 0.61) + 1)) * c_et_pos * c_ht_on + (sign(-sign(trackir.device.position.yaw?0 - 0.56) + 1) * ! c_et_pos + sign(sign(trackir.device.position.yaw?0 + 0.56) + 1) * c_et_pos) * ! c_ht_on + keyboard.esc?0 + (modifier(shift_only, keyboard.numlock?0))) * ! c_et_hv_ac * ! eyepause + (c_et_hv_ac * ! eyepause)`"

Replace this line:
config_lines[177]: "mix cam5 `keyboard.key5?0 | semantical.cam5?0`"
With this line: ***Amended 19-11-2020***
config_lines[177]: "mix cam5 `(((sign(sign(trackir.device.position.yaw?0 - 0.57) + 1) * ! c_et_pos * ! c_ht_on) + (sign(-sign(trackir.device.position.yaw?0 + 0.57) + 1) * c_et_pos * ! c_ht_on)) * c_et_hv_mode + ((sign(sign(trackir.device.position.yaw?0 - 0.57) + 1) * ! c_et_pos * ! c_ht_on * abs(sign(deadzone(clamp(trackir.device.position.x?0, -1.0, 0.0), 0.2)))) + (sign(-sign(trackir.device.position.yaw?0 + 0.57) + 1) * c_et_pos * ! c_ht_on * abs(sign(deadzone(clamp(trackir.device.position.x?0, -0.0, 1.0), 0.2))))) * ! c_et_hv_mode) * ! c_et_hv_ac * ! eyepause + eyepause`"

Replace this line: (I used wheel button joy.b22?0 to zoom before changing to this way)
config_lines[187]: "mix camzoom `joy.b22?0 | semantical.camzoom?0`"
With this line: ***New 25-11-2020***
config_lines[187]: "mix camzoom `sign(clamp(deadzone(-trackir.device.position.z?0 , c_et_hv_sc * 0.95), -0.0, 1.0)) * ! cam5 * trackiron * sign(c_et_hv_sc) * ! sign(abs(deadzone(trackiryaw, (c_etwm_yawsc / 5))))`"

Replace this line:
config_lines[250]: "mix headtron `c_ht_on & (trackiron | hmdon | eyeposon)`"
With this line: ***Amended 28-10-2020***
config_lines[250]: "mix headtron `(trackiron * c_et_head * c_et_hv_mode * ! c_et_hv_ac) + (trackiron * c_et_head * c_et_hv_mode * c_et_hv_ac) + (trackiron * c_et_head * ! c_et_hv_mode * ! c_et_hv_ac)`"

Replace this line:
config_lines[251]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"
With this line: ***Amended 19-11-2020***
config_lines[251]: "mix headtryaw `((((clamp(trackiryaw, -(c_et_gv_ext * 2), (c_et_gv_ext * 2)) * ! cam5) + (clamp(trackiryaw, -0.9, 0.9) * cam5 * ! eyepause)) * ! c_et_hv_ac) + (((clamp(trackiryaw, -(c_et_gv_ext * 2), (c_et_gv_ext * 2)) * c_ht_on) + (clamp(trackiryaw, -0.9, 0.9) * ! c_ht_on)) * c_et_hv_ac * c_et_hv_mode * ! eyepause) + (trackiryaw + (sign(0.5 - c_et_pos))) * eyepause) * c_et_head`"

Replace this line:
config_lines[254]: "mix headtrx `clamp(sel(trackiron, trackirx, 0) + sel(eyeposon, eyeposx, 0), -0.1, 0.1) + sel(hmdon, hmdx, 0)`"
With this line: ***Amended 19-11-2020***
config_lines[254]: "mix headtrx `(((-(((sign(steering - (steering * 2) + abs(steering))) * 4.2 - 1.4) * -! c_et_pos) + (((sign(steering - (steering * 2) - abs(steering))) * 4.2 + 1.4) * c_et_pos)) * eyepause) + ((((clamp(trackirx, -clamp(c_et_hv_res, -0.0, 0.1) + (clamp(abs(headtryaw * 0.3), -0.0, clamp(c_et_hv_res, -0.0, 0.1)) * c_ht_on), c_et_hv_res) * ! c_et_pos) + (clamp(trackirx, -c_et_hv_res, clamp(c_et_hv_res, -0.0, 0.1) - (clamp(abs(headtryaw * 0.3), -0.0, clamp(c_et_hv_res, -0.0, 0.1)) * c_ht_on)) * c_et_pos)) * ! cam5) + ((clamp(deadzone(headtryaw, c_et_gv_end * 0.6), -0.0, 0.5) * c_ht_on * ! c_et_pos) + (clamp(deadzone(headtryaw, c_et_gv_end * 0.6), -0.5, 0.0) * c_ht_on * c_et_pos)) * c_et_hv_mode + (((-clamp(deadzone(headtryaw, 0.2), -0.25, 0.0) * ! c_et_pos * ! sign(c_et_hv_res) * sign(c_et_hv_end)) + (-clamp(deadzone(headtryaw, 0.2), -0.0, 0.25) * c_et_pos * ! sign(c_et_hv_res) * sign(c_et_hv_end)) + (deadzone(clamp(-headtryaw * 1.75, -0.91, 0.0), 0.65) * ! c_ht_on * ! c_et_pos * (1 + c_et_yawsc * 0.2)) + (deadzone(clamp(-headtryaw * 1.75, -0.0, 0.91), 0.65) * ! c_ht_on * c_et_pos* (1 + c_et_yawsc * 0.2))) * ! c_et_hv_ac * c_et_hv_mode) + (((clamp(deadzone(headtryaw, c_et_gv_end * 0.6), -0.0, 0.5) * ! c_et_pos) + (clamp(deadzone(headtryaw, c_et_gv_end * 0.6), -0.5, 0.0) * c_et_pos) + ((deadzone(clamp(-headtryaw * 1.75, -1.0, 0.0), 0.65) * ! c_ht_on * ! c_et_pos * abs(sign(deadzone(clamp(trackirx, -1.0, 0.0), 0.2))) * (1.2 + c_et_yawsc * 0.2)) + (deadzone(clamp(-headtryaw * 1.75, -0.0, 1.0), 0.65) * ! c_ht_on * c_et_pos * abs(sign(deadzone(clamp(trackirx, -0.0, 1.0), 0.2))) * (1.2 + c_et_yawsc * 0.2)))) * ! c_et_hv_ac * ! c_et_hv_mode) + ((((c_et_yawsc * 0.1) * sign(deadzone(clamp(-headtryaw, -1.0, 0.0), 0.5) * ! c_ht_on * ! c_et_pos)) + ((c_et_yawsc * 0.1) * sign(deadzone(clamp(-headtryaw, -0.0, 1.0), 0.5) * ! c_ht_on * c_et_pos))) * c_et_hv_ac * c_et_hv_mode)) * ! eyepause) * c_et_head`"

Replace this line:
config_lines[255]: "mix headtry `clamp(sel(trackiron, trackiry, 0) + sel(eyeposon, eyeposy, 0), -0.05, 0.05) + sel(hmdon, hmdy, 0)`"
With this line: ***Amended 19-11-2020***
config_lines[255]: "mix headtry `(-0.8 * eyepause) + ((clamp(sel(trackiron, trackiry, 0), -0.05, 0.05)) * ! eyepause)`"

Replace this line:
config_lines[256]: "mix headtrz `clamp(sel(trackiron, trackirz, 0) + sel(eyeposon, eyeposz, 0), -0.2, 0.05) + sel(hmdon, hmdz, 0)`"
With this line: ***Amended 19-11-2020***
config_lines[256]: "mix headtrz `(((-0.2 - (clamp(trackirz, -1.0, 0.5) * 12.5)) * eyepause) + ((((clamp(trackirz, -0.275, 0.0) * ! cam5) * ! abs(sign(headtryaw)) + (clamp(trackirz, -0.275 + (abs(headtryaw * 0.6)), 0.0) * ! c_ht_on * ! cam5) * ! c_et_pos * sign(-(headtryaw - (headtryaw * 2) + -abs(headtryaw)) * 0.5) + (clamp(trackirz, -0.275 + (abs(headtryaw * 0.6)), 0.0) * ! c_ht_on * ! cam5) * c_et_pos * sign((headtryaw - (headtryaw * 2) + abs(headtryaw)) * 0.5) + (clamp((trackirz - deadzone(abs(headtryaw), 0.5) * (c_et_hv_end * (2.5 - (c_et_gv_ext * 2)) - trackirz)), (-0.275 * (1 + abs(headtryaw * (c_et_hv_end * 0.5)))), 0.0) * ! c_et_pos * c_ht_on * sign(-(headtryaw - (headtryaw * 2) + -abs(headtryaw)) * 0.5)) + (clamp((trackirz - deadzone(abs(headtryaw), 0.5) * (c_et_hv_end * (2.5 - (c_et_gv_ext * 2)) - trackirz)), (-0.275 * (1 + abs(headtryaw * (c_et_hv_end * 0.5)))), 0.0) * c_et_pos * c_ht_on * sign((headtryaw - (headtryaw * 2) + abs(headtryaw)) * 0.5)) + (clamp(trackirz - abs(headtryaw * 0.5), -0.275, 0.0) * ! c_et_pos * ! sign(c_et_hv_res) * sign(c_et_hv_end) * sign((headtryaw - (headtryaw * 2) + abs(headtryaw)) * 0.5)) + (clamp(trackirz, -0.275, 0.0) * ! c_et_pos * sign(c_et_hv_res) * sign(c_et_hv_end) * sign((headtryaw - (headtryaw * 2) + abs(headtryaw)) * 0.5)) + (clamp(trackirz, -0.275, 0.0) * ! c_et_pos * ! sign(c_et_hv_res) * ! sign(c_et_hv_end) * sign((headtryaw - (headtryaw * 2) + abs(headtryaw)) * 0.5)) + (clamp(trackirz, -0.275, 0.0) * ! c_et_pos * sign(c_et_hv_res) * ! sign(c_et_hv_end) * sign((headtryaw - (headtryaw * 2) + abs(headtryaw)) * 0.5)) + (clamp(trackirz - abs(headtryaw * 0.5), -0.275, 0.0) * c_et_pos * ! sign(c_et_hv_res) * sign(c_et_hv_end) * sign(-(headtryaw - (headtryaw * 2) + -abs(headtryaw)) * 0.5)) + (clamp(trackirz, -0.275, 0.0) * c_et_pos * sign(c_et_hv_res) * sign(c_et_hv_end) * sign(-(headtryaw - (headtryaw * 2) + -abs(headtryaw)) * 0.5)) + (clamp(trackirz, -0.275, 0.0) * c_et_pos * ! sign(c_et_hv_res) * ! sign(c_et_hv_end) * sign(-(headtryaw - (headtryaw * 2) + -abs(headtryaw)) * 0.5)) + (clamp(trackirz, -0.275, 0.0) * c_et_pos * sign(c_et_hv_res) * ! sign(c_et_hv_end) * sign(-(headtryaw - (headtryaw * 2) + -abs(headtryaw)) * 0.5))) * ! cam5 * c_et_hv_mode) + (-0.1 * cam5 * ! c_et_hv_ac * c_et_hv_mode) + (clamp(trackirz, -(c_et_hv_end * 0.35), 0.0) * c_ht_on * ! cam5 + (clamp(trackirz, -(c_et_hv_end * 0.35) + (abs(headtryaw * 0.6)), 0.0) * ! c_ht_on * ! cam5) * ! c_et_pos * abs(sign(deadzone(clamp(trackirx, -1.0, 0.0), 0.2))) + (clamp(trackirz, -(c_et_hv_end * 0.35), 0.0) * ! c_ht_on * ! cam5) * ! c_et_pos * ! abs(sign(deadzone(clamp(trackirx, -1.0, 0.0), 0.2))) + (clamp(trackirz, -(c_et_hv_end * 0.35) + (abs(headtryaw * 0.6)), 0.0) * ! c_ht_on * ! cam5) * c_et_pos * abs(sign(deadzone(clamp(trackirx, -0.0, 1.0), 0.2))) + (clamp(trackirz, -(c_et_hv_end * 0.35), 0.0) * ! c_ht_on * ! cam5) * c_et_pos * ! abs(sign(deadzone(clamp(trackirx, -0.0, 1.0), 0.2))) + (-0.1 * cam5)) * ! c_et_hv_ac * ! c_et_hv_mode) * ! eyepause) * c_et_head`"

Replace this line:
config_lines[257]: "mix headtrwmon `c_ht_on & (trackiron | hmdon | eyeposon)`"
With this line:
config_lines[257]: "mix headtrwmon `c_et_head & trackiron`"

Add | eyepause into existing line: ***Amended 19-11-2020***
Note: keyboard.enter?0 is game default - You may have already changed this to something else, if so, it's ok to keep it.
config_lines[278]: "mix activate `keyboard.enter?0 | eyepause | semantical.activate?0`"

Now pick window controls - Automated or Manual:

Replace this line:
config_lines[128]: "mix headtren ``"
With this line: For #1 - Manual "basic" window operation ***Amended 12-12-2020***
config_lines[128]: "mix headtren `(abs(sign(trackir.device.position.yaw?0 + 2)) * lwinopen?0 * ! c_et_pos) + (abs(sign(trackir.device.position.yaw?0 + 2)) * lwinclose?0 * ! c_et_pos * ! c_ht_on) + (abs(sign(trackir.device.position.yaw?0 + 2)) * rwinopen?0 * c_et_pos) + (abs(sign(trackir.device.position.yaw?0 + 2)) * rwinclose?0 * c_et_pos * ! c_ht_on)`"

OR

With this line: For #2 - Manual "basic" window operation ***Amended 12-12-2020***
config_lines[128]: "mix headtren `(abs(sign(trackir.device.position.yaw?0 + 2)) * lwinopen?0 * ! c_et_pos * c_ht_on) + (abs(sign(trackir.device.position.yaw?0 + 2)) * lwinclose?0 * ! c_et_pos * ! c_ht_on) + (abs(sign(trackir.device.position.yaw?0 + 2)) * rwinopen?0 * c_et_pos * c_ht_on) + (abs(sign(trackir.device.position.yaw?0 + 2)) * rwinclose?0 * c_et_pos * ! c_ht_on)`"

OR

The following lines 128/306/307/308/309 are for the automated window controls only.
I use these keys to operate the windows, you'll need to substitute yours in lines 128/306/307/308/309 or keep mine while testing this setup:
Open windows = keyboard.darrow?0 - down arrow
Close windows = keyboard.uarrow?0 - up arrow
Set open state = keyboard.larrow?0 - left arrow - (unblocks your head)
Set closed state = keyboard.rarrow?0 - right arrow - (blocks your head)

Replace this line:
config_lines[128]: "mix headtren ``"
With this line:
config_lines[128]: "mix headtren `keyboard.larrow?0 & c_ht_on & ! keyboard.uarrow?0 | keyboard.rarrow?0 & ! c_ht_on & ! keyboard.darrow?0`"

Note: logic for example, line 306 right window open will only operate if down arrow is pressed and up arrow isn't being pressed at the same time. You should therefore, in game, give each window button press 3 seconds before pressing again because of the automation.
config_lines[306]: "mix rwinopen `keyboard.darrow?0 & ! keyboard.uarrow?0 | semantical.rwinopen?0`"
config_lines[307]: "mix rwinclose `keyboard.uarrow?0 & ! keyboard.darrow?0 | semantical.rwinclose?0`"
config_lines[308]: "mix lwinopen `keyboard.darrow?0 & ! keyboard.uarrow?0 | semantical.lwinopen?0`"
config_lines[309]: "mix lwinclose `keyboard.uarrow?0 & ! keyboard.darrow?0 | semantical.lwinclose?0`"

If you use #1 or #2 Manual window control and want to have both windows open and close together using only the left open/close buttons, then do this:
Replace this line:
config_lines[306]: "mix rwinopen `semantical.rwinopen?0`"
With this line:
config_lines[306]: "mix rwinopen `(abs(sign(trackir.device.position.yaw?0 + 2)) * lwinopen?0)`"

Replace this line:
config_lines[307]: "mix rwinclose `semantical.rwinclose?0`"
With this line:
config_lines[307]: "mix rwinclose `(abs(sign(trackir.device.position.yaw?0 + 2)) * lwinclose?0)`"

Then just assign buttons in game for open/close left window only, otherwise assign both windows buttons in game as normal.

Close and save.

NOTE: Don't change any key bindings in the game menu's that state "COMPLEX".
The above edits are the reason those are "complex".


If you're using #1 or #2 manual window controls then that's it, otherwise read on for the rest of the automated control solution.

Here is my way to add the required automation process
Use logitech profiler software that i use for my G27 wheel (you'll need similar key recording software, sorry i can't help with that bit).
Record key strokes/timing and assign 2 wheel buttons for open both windows & close both windows.

Export the profile and edit with notepad to change timing values to be exactly what is required.
Import the updated profile.

Use the below work flow for what should happen:-

LWMB = Left Wheel Middle Button - open windows.
RWMB = Right Wheel Middle Button - close windows.

Note only LWMB or RWMB are pressed in game. The rest are recorded key strokes played back when LWMB or RWMB are pressed.

Quick press LWMB and the following happens:
Down arrow is pressed for 3 seconds to get ~70% window open.
Press Left arrow key to change variable state to opened.
The window is now open enough to put your head out.

Another Quick press LWMB and the following happens:
Down arrow is pressed for 3 seconds to get 100% window open.
Press Left arrow key - variable state kept at opened.
The window is now fully open to put your head out.

Quick press RWMB and the following happens:
Press Right arrow key to change to closed variable state to stop head being trapped!
Up arrow is pressed for 3 seconds to get ~30% window open from 100% open.
The window is now 30% open and you can't put your head out.

Another Quick press RWMB and the following happens:
Press Right arrow key - variable state kept at closed.
Up arrow is pressed for 3 seconds to get 100% window closed.
The window is now closed and you can't put your head out.

Quick list of window options:
LWMB -> 70% open -> RWMB -> closed.
LWMB -> 70% open -> LWMB -> fully open -> RWMB -> 30% open -> RWMB -> closed.

So you can have the windows closed and not be able to put your head out of the window.
Or you can have the windows open 30% to hear the outside world whilst not being able to put your head out of the window.
Or you can have the windows 70% open to hear the outside world and can put your head out of the window.
Or you can have the windows fully open to hear the outside world and still put your head out of the window.
I drive with windows at 30% open and then LWMB to 100% open to look out as required and then RWMB to go back to 30% open. Simple.

The keys you need to record for the above.
Window open command:
"down"(hold for 3 sec)"left"(quick press)

Window close command:
"right"(quick press)"up"(hold for 3 sec)

Based on my G27 logitech profile pause values, here is what you should try to emulate (lower=faster):
This is what the exported logitech profile looks like, just the recorded part of the xml file:-

-<Command Name="Open Window" Id="4">
<Event Type="Key" Up="false" Keyname="DOWN"/>
<Event Type="Pause" Time="3000"/>
<Event Type="Key" Up="true" Keyname="DOWN"/>
<Event Type="Pause" Time="66"/>
<Event Type="Key" Up="false" Keyname="LEFT"/>
<Event Type="Pause" Time="66"/>
<Event Type="Key" Up="true" Keyname="LEFT"/>
</Command>
-<Command Name="Close window" Id="5">
<Event Type="Key" Up="false" Keyname="RIGHT"/>
<Event Type="Pause" Time="66"/>
<Event Type="Key" Up="true" Keyname="RIGHT"/>
<Event Type="Pause" Time="66"/>
<Event Type="Key" Up="false" Keyname="UP"/>
<Event Type="Pause" Time="3000"/>
<Event Type="Key" Up="true" Keyname="UP"/>
</Command>

If you use Logitech profiler software V5.10.127 with a G27 wheel, you can:-
1 - export your current ATS or ETS2 profile for backup and then import attached profile and change your device setting in the profile to match how you like the specific game settings set.
Then add the "open window" & "close window" commands to the controller buttons.
Click from the right list of buttons and select command as shown in this pic:
logitech.png
2 - If you have no profiles setup and instead just use global settings for all games, then you can import the attached profile and change it's device setting in the profile to match your global settings.
The game will use this profile. Then add the "open window" & "close window" commands to the controller buttons as stated above. Delete the profile and the game will be back to using your global settings.

3 - Record both open and close windows commands as detailed above and then export your profile to edit the timings.
Here is what my profile looks like using notepad/wordpad to view it. The highlighted part is the recorded commands with the timings now edited to suit (in blue).

<?xml version="1.0" encoding="utf-8"?>
<GameProfile xmlns="http://www.logitech.com/schemas/2009/ga ... "><Profile GUID="{E42F9C9E-FEB2-48E1-8ED8-72BF41FDAA89}" Publisher="Custom User Profile" Author="John" Revision="85:12/07/2020" Installed="false"><Name>ATS</Name><Signature Key="" Value="" Shortcut="" /><Target IconIndex="0"><Name>amtrucks.exe</Name></Target><Macros><Command Id="1" Name="Mouse Left Button"><Event Type="Mouse" DeltaX="0" DeltaY="0" Mask="1" /></Command><Command Id="2" Name="Mouse Middle Button"><Event Type="Mouse" DeltaX="0" DeltaY="0" Mask="4" /></Command><Command Id="3" Name="Mouse Right Button"><Event Type="Mouse" DeltaX="0" DeltaY="0" Mask="2" /></Command><Command Id="4" Name="Open Window"><Event Type="Key" Keyname="DOWN" Up="false" /><Event Type="Pause" Time="3000" /><Event Type="Key" Keyname="DOWN" Up="true" /><Event Type="Pause" Time="66" /><Event Type="Key" Keyname="LEFT" Up="false" /><Event Type="Pause" Time="66" /><Event Type="Key" Keyname="LEFT" Up="true" /></Command><Command Id="5" Name="Close window"><Event Type="Key" Keyname="RIGHT" Up="false" /><Event Type="Pause" Time="66" /><Event Type="Key" Keyname="RIGHT" Up="true" /><Event Type="Pause" Time="66" /><Event Type="Key" Keyname="UP" Up="false" /><Event Type="Pause" Time="3000" /><Event Type="Key" Keyname="UP" Up="true" /></Command></Macros><Assignments DeviceModel="57"><Mapping><Source Type="Axis" ID="0" /><Destination Type="Axis" ID="1" /></Mapping><Mapping><Source Type="Axis" ID="2" /><Destination Type="Axis" ID="4" /></Mapping><Mapping><Source Type="Axis" ID="3" /><Destination Type="Axis" ID="8" /></Mapping></Assignments><Assignments DeviceModel="45"><Mapping><Source Type="Axis" ID="0" /><Destination Type="Axis" ID="1" /></Mapping><Mapping><Source Type="Axis" ID="1" /><Destination Type="Axis" ID="2" /></Mapping><Mapping><Source Type="Axis" ID="2" /><Destination Type="Axis" ID="4" /></Mapping></Assignments><Assignments DeviceModel="43"><Mapping><Source Type="Axis" ID="0" /><Destination Type="Axis" ID="1" /></Mapping><Mapping><Source Type="Axis" ID="2" /><Destination Type="Axis" ID="4" /></Mapping><Mapping><Source Type="Axis" ID="3" /><Destination Type="Axis" ID="8" /></Mapping></Assignments><DeviceSpecialOptions><SpecialOptions DeviceModel="57"><ForceOptions Enable="true" OverallAttenuation="100" SpringAttenuation="100" DamperAttenuation="100" DefaultSpringEnabled="true" DefaultSpringAttenuation="100" /><WheelOptions Enable="true" CombinePedals="false" OperatingRange="900" /><GameOptions Enable="true" AllowGameSettings="true" /></SpecialOptions></DeviceSpecialOptions></Profile></GameProfile>

===============================================================================================

Q & A Section:
Q - V4 Menu - The camera view keeps jumping back to camera 1 whenever i select another view, devcam, camera 2 etc.
A - V4 uses head tracking to change between camera 1 and camera 5. Disable/pause your headtracking device before using unrealistic cameras. Or use V3 menu mod.

Q - I can't select camera 5.
A - Camera 5 has been extensively modified and is therefore no longer user selectable. Headtracking users shouldn't need the original view anyway.

Q - V4 Menu - The side of the truck is missing when looking out of the window.
A - You have v3 unsupported "ticked" when the truck you are driving is v4 supported. Untick to fix.

Q - V4 Menu - The inside of the truck changes to low quality when looking over my shoulder.
A - Only V4 supported trucks have high quality interiors at all angles.

Q - V4 Menu - Headtracking stopped working.
A - You have v3 unsupported "ticked" and head movement control set to "Direct". Set to "Dynamic" or use v4 supported truck for manual "Direct" mode.

Q - V4 Menu - When turning your head outside the camera view has a slight jump.
A - Use the V4 Menu mod with the FOV that best matches your usual driving FOV (F4 in game). I use FOV 60 in game and TIR Option 1 Window Block Menu 1.38v4 FOV-60.scs - Note: There will always be a very slight jump as the view is switching between camera 1 & 5 - Matching FOV's reduces this.

Q - Which V4 menu mod do i use?
A - Use the V4 Menu mod with the FOV that best matches your usual driving FOV (F4 in game). I use FOV 60 in game and TIR Option 1 Window Block Menu 1.38v4 FOV-60.scs

Q - My head isn't blocked by the closed window and the movement is strange.
A - Ensure you have the correct LHD/RHD menu setting to suit your current truck - Window block LHD (untick) or RHD (tick).

Q - Refueling view is under the seat inside the truck or too far away from truck.
A - Ensure you have the correct LHD/RHD menu setting to suit your current truck - Window block LHD (untick) or RHD (tick).

Q - My game crashes to desktop every time i access the TrackIR menu mod.
A - Only game versions 1.38 & 1.39 are confirmed to work with the current menu mods.

Q - Everytime i start the game my head is blocked but the window is open.
A - At game start your head is always blocked as the controls.sii file gets no feedback from the game to set it correctly. Just press open window to get back in sync.

Q - The keys menu has "COMPLEX" shown on buttons that i assigned a button to, now this option 1 doesn't work properly.
A - The controls.sii file edits detailed above are the reason they are "COMPLEX". Assign all buttons you need in game and then add all the required option 1 line edits.

Unresolved problem:
If you are looking out of the window just before accessing game menus / activate service / activate garage manager / activate job select etc then when you come back to driving you'll be sat in a low quality interior.
To fix - Look towards drivers window and back again or press "1" & Don't access menus with your head out of the window!

Why can't i fix this?
Cam1=High quality interior but missing exterior and used for inside the truck only.
Cam5=Low quality interior but high quality exterior and is only used when your head moves out through the open window.
When you look out of the window you are using cam5 - The game always goes back to your last camera view when returning to driving view but your real head will now be looking straight ahead at the screen so you didn't move back into the cab to trigger the change back to cam1. Hence the work around above.
But, really, this isn't a problem you'll encounter too often.

===============================================================================================

Game controls.sii file defaults 1.38 & 1.39 - 25/11/2020: - Reset to these lines if required.
Or If you mess up the file, just delete it, the game will generate a new one that you can then add your keys to again.
config_lines[52]: "constant c_ht_on 1.000000"
config_lines[54]: "constant c_et_head 1.000000"
config_lines[55]: "constant c_et_pos 0.000000"
config_lines[59]: "constant c_etwm_yawsc 1.000000"
config_lines[65]: "constant c_et_hv_res 1.000000"
config_lines[66]: "constant c_et_gv_ext 0.071389"
config_lines[71]: "constant c_et_gv_end 1.000000"
config_lines[72]: "constant c_et_hv_sc 0.750000"
config_lines[76]: "constant c_et_hv_end 1.000000"
config_lines[128]: "mix headtren ``"
config_lines[130]: "mix eyepause ``"
config_lines[173]: "mix cam1 `keyboard.key1?0 | semantical.cam1?0`"
config_lines[177]: "mix cam5 `keyboard.key5?0 | semantical.cam5?0`"
config_lines[187]: "mix camzoom `semantical.camzoom?0`"
config_lines[250]: "mix headtron `c_ht_on & (trackiron | hmdon | eyeposon)`"
config_lines[251]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"
config_lines[254]: "mix headtrx `clamp(sel(trackiron, trackirx, 0) + sel(eyeposon, eyeposx, 0), -0.1, 0.1) + sel(hmdon, hmdx, 0)`"
config_lines[255]: "mix headtry `clamp(sel(trackiron, trackiry, 0) + sel(eyeposon, eyeposy, 0), -0.05, 0.05) + sel(hmdon, hmdy, 0)`"
config_lines[256]: "mix headtrz `clamp(sel(trackiron, trackirz, 0) + sel(eyeposon, eyeposz, 0), -0.2, 0.05) + sel(hmdon, hmdz, 0)`"
config_lines[257]: "mix headtrwmon `c_ht_on & (trackiron | hmdon | eyeposon)`"
config_lines[278]: "mix activate `keyboard.enter?0 | semantical.activate?0`"
Last edited by JHTrucker on January 20th, 2021, 6:49 pm, edited 122 times in total.
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
alonzam99
Posts: 96
Joined: April 17th, 2020, 2:47 pm

Re: TRACKIR Closed window block solutions 1.38. Updated 26/07/2020

Post by alonzam99 » July 27th, 2020, 9:29 pm

For who don't have logitech wheel and want to automate the process can use this software : https://www.autohotkey.com/

But you can only open the window to 30%, 70%, 100%.
So I think it's better to use option 7.
User avatar
JHTrucker
Posts: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: TRACKIR Closed window block solutions 1.38. Updated 26/07/2020

Post by JHTrucker » July 30th, 2020, 5:10 pm

@alonzam99 - I assume you offered that info to everyone without even testing this option 1 yourself?
Only having 4 window states is a limitation, but you really don't need more.

Option 7:
100 window opening states.
Head unrealistically stops turning at the drivers window because of scs's poor g_cam implementation.
TIR inside - Auto rotate view outside.
TIR outside "on demand" feature.

Option 1:
4 window opening states.
Head is free to turn just like real life when sat inside a vehicle with the windows closed.
TIR "always on" so full control inside and outside.

If scs had made their g_cam work like my option 1 (no blocking) then mouse/controller/head tracking users would all be able to use it and none of my options would have had to be developed.
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
alonzam99
Posts: 96
Joined: April 17th, 2020, 2:47 pm

Re: TRACKIR Closed window block solutions 1.38. Updated 26/07/2020

Post by alonzam99 » July 30th, 2020, 7:03 pm

JHTrucker wrote:
July 30th, 2020, 5:10 pm
@alonzam99 - I assume you offered that info to everyone without even testing this option 1 yourself?
Only having 4 window states is a limitation, but you really don't need more.

Option 7:
100 window opening states.
Head unrealistically stops turning at the drivers window because of scs's poor g_cam implementation.
TIR inside - Auto rotate view outside.
TIR outside "on demand" feature.

Option 1:
4 window opening states.
Head is free to turn just like real life when sat inside a vehicle with the windows closed.
TIR "always on" so full control inside and outside.

If scs had made their g_cam work like my option 1 (no blocking) then mouse/controller/head tracking users would all be able to use it and none of my options would have had to be developed.
As I know this software works with video games, and I think I tested this software in the past in other games and it worked.
If I will have time I will test it in the future, but I don't like the idea that you are limited to 4 opening states, so I think I will stay with option 7 for now.
User avatar
JHTrucker
Posts: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: TRACKIR Closed window block solutions 1.38. Updated 26/07/2020

Post by JHTrucker » July 31st, 2020, 1:30 am

@alonzam99 - There's no need to test if you're happy with option 7. But you make assumptions without trying, that's all. Just enjoy the driving now, like i am.
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
User avatar
JHTrucker
Posts: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: TRACKIR Closed window block solutions 1.38. Updated 26/07/2020

Post by JHTrucker » August 26th, 2020, 3:26 pm

Option 1 and option 7 can now be used with this:
WIP - Walk around your truck & trailer using head tracking only. For game version 1.38
viewtopic.php?p=27506#p27506
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
Post Reply