The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Nazalassa on June 13, 2025, 10:46:38 AM

Title: New freight list sort mode: "by line"
Post by: Nazalassa on June 13, 2025, 10:46:38 AM
In large or complex networks, seeing how much goods want to take each line from a given station may help identifying problems faster. As such, I have written a patch which adds a sixth freight sort mode, "by line", that:

The main advantage over "via (amount)" is that there may be much less entries in the freight list, and we directly get the line's load at the station.

Here is the result at a (rather overcrowded) station:
bci-sort-by-line.png
Title: Re: New freight list sort mode: "by line"
Post by: danivenk on June 13, 2025, 11:08:27 AM
Good work! I have been wanting to make something similar.

There is only one problem with that sorting mode tho.
You differentiate between 2 lines that go between the same two halts by combining them with "or" between the linenames.
However what if the line names are really long? Or you have many more lines that go the same 2 halts.
I have on some of my maps halts that are connected with at least 5 or 6 lines. In it's current form I can see that become quite cluttered.

So maybe a better way is to add a list of lines / lineless convoys when sort by line is selected and it shows only the passengers that would go via that line. Or maybe even have the line selector always there so you can within a line filtered list sort by via etc.
Title: Re: New freight list sort mode: "by line"
Post by: Flemmbrav on June 14, 2025, 02:42:52 PM
Awesome! This will be very helpful!
Title: Re: New freight list sort mode: "by line"
Post by: prissi on June 14, 2025, 10:27:35 PM
Lineless convois should be listed too. Not everybody uses lines for local stuff.

Furthermore, in case of more lines, the patch could only show the line with least stops to it (since that is the one the goods would prefer) and show then "and more" which makes the capacity issue clearer.
Title: Re: New freight list sort mode: "by line"
Post by: prissi on June 15, 2025, 07:15:27 AM
OK, I have incorporated a more simplified version. It will still show all lines but only the first of a lineless convoy (and xxx convois more if more)

Sorting by the next line would make this much more computation intensive.