Transport Fever 2

Transport Fever 2

LineManager
Can you force the depot used to clone a vehicle?
Or is this straight hardcoded vanilla behaviour and you can't do anything?

I got a depot within 2 minutes of stop 1 of a line, but a depot about 12 minutes away is chosen.
It's near the path of that line, though, in the neighbor town.
< >
Zobrazuje se 14 z 4 komentářů
CARTOK  [vývojář] 27. úno. 2023 v 8.52 
The depot finding function is a bit dumb, this mostly has to do with me not having had time to wrap my head around the pathfinding functionality. The depot used will be the same as the first vehicle created for the line. If that depot stops existing, then an existing vehicle will temporarily be sent to a depot and that depot is then used. The process is repeated when a vehicle is sold - before selling, the vehicle is temporarily sent to a depot and the identified depot is then used for creating further vehicles later on.

I am basically just bastardizing the (easily) available functionality within the API. However, the proper way to do is by pathfinding and identifying the best depot that way on each occassion. That is however a completely new level of complication that I'm very unlikely to achieve without assistance.

I hope this helps.
Can't you not just do the first, simpler approach of measuring distance by line of sight from stop 1 of a line to any depot by the coordinates?
Later, if then available, that approach could be the fallback method if the pathfinding method fails (or "sending a vehicle to a depot" would be needed).

I know that the line of sight could be very wrong, depending the topography and how the roads are laid, but ...
I tested again. I built a road depot that is nearer to the source station - but not to the line - and used it to buy the first vehicle of a line.
The cloned vehicles are all bought by another depot, which is nearer to the line, but further away from the source station.
Naposledy upravil GordonDry; 5. bře. 2023 v 3.53
CARTOK  [vývojář] 4. bře. 2023 v 22.41 
I don't think there's a simple solution to this. The starting point is to use the same depot as the user manually set up, but depots/roads/rail/access etc. can change and this must be accounted for. This is checked at various points (when a vehicle is sold, this has yielded the best result), and this can sometimes (but usually temporarily) lead to less than optimal results. In the grand scheme of things, this should even out before long and not make a huge difference unless cutting the economics really tight.

However, for optimal outcome path finding is a must - always locating the closest/best depot. I don't have the skills nor experience for this, unfortunately, but am open for any support that can be availed.
< >
Zobrazuje se 14 z 4 komentářů
Na stránku: 1530 50