How to get a longer yellow time for ALL traffic lights

Ask questions about the ETS2 mods here. If useful they will be added to the Q&A / Development updates.
Forum rules
Please do not post any crashes, malfunctions or other issues with the mod in this forum. If you have any issues with the mod, please post them here. This forum is only for questions/feedback towards the team, not for solving crashes.
Post Reply
TruckingDutchman010
Posts: 240
Joined: 27 Dec 2020 21:37
Donation rank:

17 Jan 2023 12:02

Hi,

I need some help with this traffic light problem. Many traffic lights in ProMods still have a yellow time of only 2.0 seconds when going from green to red. This is way to short to anticipate on when approaching a green light that suddenly goes to red. With only 2 seconds yellow time in between you don't have enough time to react and then come to a complete stop in time in order to not pass through the red light. Until now I used the 'Pardubak Longer Yellow' mod from the Steam workshop to solve this problem, which gave all traffic lights on the map a 4.0 seconds yellow time, which is much more realistic.

But since this mod seems to have disappeared from the Steam workshop, I think it won't be updated anymore. Also, in the latest version of this mod, which I still have activated, some traffic lights in the UK are facing in the opposite (wrong) direction by this mod, for if I deactivate the mod, they are facing in the right way.

So, for these reasons, I actually want to get rid of this mod (Pardubak Longer Yellow). But then I have traffic lights again with only 2 seconds yellow time.

Is there any way I can get these traffic light times fixed myself? I know it has to do with the color sequences in the semaphore files, but there are so many of them and it's completely unclear to me which traffic lights are controlled by which piece of code and even how many there are at all. I actually also wonder why ProMods allows such short yellow times to exist throughout the map in the first place, since this is far from reality.

I hope someone can help me out with this.

User avatar
MandelSoft
Lead Developer
Posts: 3835
Joined: 08 Aug 2013 10:48
Location: Delft [NL]

17 Jan 2023 13:31

The traffic lights sequences are controlled by semaphore_profiles. These can be found in /def/world/semaphore_profile.sii. We have several of these in our DEF package, so that's where you can find them.

Each profile entry has one or more interval[] entries,
with four numbers, which respectively determine the green, yellow, red and red-yellow phase duration in seconds. Furthermore, there are also cycle[] entries, determining the cycle timing offsets of each traffic light.

To make the yellow phase two seconds longer, you can do either one of two things:
1. Make the green time two seconds shorter to keep the cycle offsets the same with the longer yellow time
2. Determine the number of phases the sequence has. Add two extra seconds to all red times for each phase except for the first (so if you have two phases, you add 1x2 seconds, and if you have 4 phases, add 3x2 seconds). Then go to the cycles and add 1x2 seconds to the lowest non-zero value, 2x2 to the second-lowest, etc.

I hope this helps you on your way.
Your daily dose of wisdom!
╔═══╗────╔═╗╔═╗────╔╗
║╔═╗║────║║╚╝║║────║║
║╚═╝╠═╦══╣╔╗╔╗╠══╦═╝╠══╗
║╔══╣╔╣╔╗║║║║║║╔╗║╔╗║══╣
║║──║║║╚╝║║║║║║╚╝║╚╝╠══║
╚╝──╚╝╚══╩╝╚╝╚╩══╩══╩══╝
Don't ask us for a release date; we don't know either.

TruckingDutchman010
Posts: 240
Joined: 27 Dec 2020 21:37
Donation rank:

17 Jan 2023 19:59

Thank you MandelSoft for your clear answer. However, I think you meant the MAP package, not the DEF package, for I found the semaphore files in the MAP package.
I adjusted every yellow time to 4.0 in all the semaphore profile files (except of profiles that are not regular traffic lights). And for many intersections it works! But there are also still a lot of intersections that still show a 2.0 yellow time, for example in the Netherlands, where I have my headquarters. But also in other countries. It seems that the semaphore files in the ProMods package don't cover all intersections on the map. I however made sure I've no other mods activated that contain semaphore files. How can I adjust the remaining traffic lights?

User avatar
MandelSoft
Lead Developer
Posts: 3835
Joined: 08 Aug 2013 10:48
Location: Delft [NL]

19 Jan 2023 20:56

The remainder can be found in the base game's files. There are a lot of profiles from the base game we don't have to override.
Your daily dose of wisdom!
╔═══╗────╔═╗╔═╗────╔╗
║╔═╗║────║║╚╝║║────║║
║╚═╝╠═╦══╣╔╗╔╗╠══╦═╝╠══╗
║╔══╣╔╣╔╗║║║║║║╔╗║╔╗║══╣
║║──║║║╚╝║║║║║║╚╝║╚╝╠══║
╚╝──╚╝╚══╩╝╚╝╚╩══╩══╩══╝
Don't ask us for a release date; we don't know either.

TruckingDutchman010
Posts: 240
Joined: 27 Dec 2020 21:37
Donation rank:

17 May 2023 20:49

Now that ETS2 version 1.47 and ProMods 2.65 have been released, I had to change the yellow times in the semaphore profiles again to get the yellow times I'm used to.

The first time, with ProMods 2.64, I used a file called 'semaphore_profile.sii' from an old longer-yellow-time-mod and I inserted that file into the folder with the other semaphore files within the map archive of ProMods. That old mod wasn't up to date anymore, but in combination with the other profiles of ProMods itself, also the remaining traffic lights got affected in the way I wanted to.

So this time, I did the same thing. But this time, the inserting of the extra file 'semaphore_profile.sii' gives some negative side effect. It still enlengthens the yellow time of the remaining traffic lights which the ProMods-files don't affect, but in some German cities, especially the new rebuilt SCS cities, it also causes this problem on some intersections with a 2x2 layout, for example this one in Nuremberg:

Image

Code: Select all

Traffic light problem Germany ;[14/05/2023 00:09:40] (sec+0000+0001);1896.65;58.3888;6434.32;-1.29015;0.0480237
So, there is something in that file that has to be removed. I think it is not much, for I only encountered this problem in Germany so far, at a certain type of intersection. But how do I find out which entry / entries I have to remove from the file? The link below shows the file:

https://pastebin.com/bTa5LkrK

Another method might be to no longer use this file, but then I should edit the semaphore_profile.sii file from the base game. But where do I find that file? I've searched the base game files within the steamapps folder, but all of the .scs archives I find in there cannot be opened by using WinRAR or 7-zip, as those apps say the archives have been damaged. I don't know if I'm searching in the right place, so may be someone could tell me where to look?



Post Reply

Return to “Questions & Feedback ETS2”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests