Transport Fever 2

Transport Fever 2

Dynamic Departures / Arrivals Displays
GordonDry 2022 年 2 月 13 日 下午 1:42
Feature request: show line destination instead of next stop
Either with using the original
eis_os_linedestinationpatcher_1 from CommonAPI
or the better replacement
lennardo97_linedesignators_1 from https://www.transportfever.net/filebase/index.php?entry/6248-verbesserte-linienbezeichnungen/
the display should show the next stop defined as terminus as seen here:
https://i.imgur.com/Ju1dICq.jpg
The shown stop is #6 "Handelsszentrum" and defined as a terminus. The next terminus is stop #1 "Hydrierwerk" and should be shown in the display.
< >
正在显示第 1 - 9 条,共 9 条留言
lollus  [开发者] 2022 年 2 月 13 日 下午 4:34 
I am testing line labels with the same system as in Lennardo's mod. For example, (IC 994)Genova-Milano-Zurigo will show "IC 994". I also use that mod and it is nice to follow the same system.
However, the destination is not so obvious. The game does not define the ends of a line and there are no ISO norms about it, either. If it is a circular line, it may well be the next station - or the farthest. If a line goes A B C B, the ends will be A and C because B is visited twice so it's no headline. If a line goes A B C D E B, the ends seen from A can be C or D, from B too, from C they can be D E or A, from D E or A, from E only A. And of course, the display must never show the current station. If nothing obvious comes up, the next stop is always an option.
最后由 lollus 编辑于; 2022 年 2 月 13 日 下午 5:04
GordonDry 2022 年 2 月 13 日 下午 7:19 
Several vehicle mods use the methods provided by CommonAPI to show the terminus station(s). Others only show the first station. I'm not sure what works and what not.
lollus  [开发者] 2022 年 2 月 14 日 上午 11:43 
I don't use common api, but I made the algo smarter and I have added the round brackets thing. Get the patch.
最后由 lollus 编辑于; 2022 年 2 月 14 日 上午 11:54
GordonDry 2022 年 2 月 14 日 下午 12:12 
Hmm. The round brackets thing.
Yesterday I just edited the code of https://www.transportfever.net/filebase/index.php?entry/6248-verbesserte-linienbezeichnungen/ to use square brackets, because the LineManager mod also uses round brackets to tell the script which profile to use.
And btw here is an actual scereenshot:
https://i.imgur.com/JVzZRWy.jpg
You can see the bus showing the terminus.

I will test the new version.
Perhaps I have to change it to use square brackets as well.
最后由 GordonDry 编辑于; 2022 年 2 月 14 日 下午 12:17
GordonDry 2022 年 2 月 14 日 下午 12:24 
btw the line number 20 which is shown on the sign of the bus is inside square brackets of the line name, the line name also got "(PR)" which tells the LineManager mod to use the according profile.
The terminus name "Hydrierwerk" is derived from this setting - same screenshot as OP - on stop #1.
GordonDry 2022 年 2 月 14 日 下午 12:46 
So, now it looks like this:
https://i.imgur.com/1CCYtF3.jpg
because the line is named
[20] Kemberg (PR)

As I'm not very good in RegEx what do I have to change?
And where?
Both files
res\scripts\lolloArrivalsDeparturesPredictor\scratch.lua
res\scripts\lolloArrivalsDeparturesPredictor\workerEngine.lua
or only one of them?
If square brackets are used the line number is shown in the display as well as it's shown on the vehicles.
GordonDry 2022 年 2 月 14 日 下午 1:06 
You should use and suggest CommonAPI to your users as this mod makes many other mods so much better. It's one of the 5 "must-have" mods even without knowing which are the other 4.
GordonDry 2022 年 2 月 14 日 下午 2:27 
I switched the logic, now https://www.transportfever.net/filebase/index.php?entry/6248-verbesserte-linienbezeichnungen/ is back to default again, using round brackets and LineManager uses square brackets now.
This way it's easier to have the displays be compatible.
Jimbo_1977 2023 年 8 月 26 日 上午 6:53 
引用自 GordonDry
You should use and suggest CommonAPI to your users as this mod makes many other mods so much better. It's one of the 5 "must-have" mods even without knowing which are the other 4.
Agreed!
< >
正在显示第 1 - 9 条,共 9 条留言
每页显示数: 1530 50