Transport Fever 2

Transport Fever 2

Smart station naming
7 Comments
SteelRodent 10 Nov, 2023 @ 11:52am 
As much as I like what this mod tries to do, the way it deals with bus & truck stops makes it literally pointless for me. Any bus stop remotely near a train station gets named the same as the train station - even with the scanning range turned all the way down, and then I have to rename them anyway or it's impossible to tell them apart.

The other problem, and I consider this a bug, if a truck stop is placed close to a bus stop, the truck stop takes over the ID and name of that bus stop, and that breaks all the bus routes with the "passenger vehicles cannot use cargo stations" because the bus routes suddenly try to use the truck stop instead of their own stop, so I have to edit all the bus routes that use that stop so they work again. It's the same if you put a bus stop near a truck stop - it breaks the truck routes.
Vimes 8 May, 2023 @ 12:48am 
Thanks for creating and sharing this. Most useful.
blackwizard1812 23 Apr, 2023 @ 3:00pm 
thx, it is working as expected
Konrad  [author] 22 Apr, 2023 @ 7:50pm 
OK, just published version 1.1. I have slightly rebalanced the search distances (they are generally a bit smaller now), and added a few more checks in the code.

If you have savegames from a previous version, you may want to revisit the mod settings.
Konrad  [author] 22 Apr, 2023 @ 6:55pm 
@blackwizard1812 thanks a lot for the feedback (and @sapidio too ;-) )

1. Thats weird, because I'm checking the entity right before posting the event. But yes, I'll add a few more checks.

2. That's probably an effect of finding stations. The reason for introducing this was to be able to place stops or stations close to railway stations, and name them correctly (e.g. "Paris Main Station" -> "Main Station"). Did you "start" around a train station which was named after the town?

Anyway, this should only happen for stations, as road stops are excluded from "propagating" their name.

Can you try reducing (or disabling) the station search radius and see if that helps? The default might be too large, so maybe reduce to "S". If that's still too much, I could add an "XS" option.
If all else fails, you can try to add a
debugPrint(reference)
before line 115 and check the console to see which construction it's snapping to.
blackwizard1812 22 Apr, 2023 @ 11:37am 
thx, working great
2 things:
- using track splitter mod triggered a crash unexpectedly related to this mod, in that case `local station = game.interface.getEntity(param.entityId)` was actually nil, then would need just a bit of defensive programming by adding a nil check on `station`.
- is it possible to differentiate (road) stations from bus/truck stop that are snapped to road: because all the new stops I lay down in a city since I enabled the mod have the same name (name of the city)
baerlina 20 Apr, 2023 @ 5:42am 
Vor ein paar Wochen dachte ich noch "wäre toll wenn die Bahnhöfe und Lkw/Bus Stationen die Jeweiligen Namen automatisch übernehmen könnten". Und zack da kommt deine Mod daher.
Klasse funktioniert einwandfrei.
Danke Dir. :steamthumbsup:

A few weeks ago I still thought "it would be great if the train stations and truck/bus stations could take over the respective names automatically". And zack there comes your mod.
class works fine.
Thank you. :steamhumbsup: