News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Priority for schedule entries

Started by Nazalassa, October 28, 2025, 05:56:22 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Nazalassa

Here is a patch that allows players to add priorities to schedule entries. When a convoi loads freight, it first looks for freight going to stops with higher priority. Stops with the same priority are treated in the order they appear in the schedule, as previously (next stop first).

For example: given the following line:
1) Stop A (100%)
2) Stop B
3) Stop C
4) Stop B



vehicles at stop A will load freight to stop B first, then to stop C.

If the priority of stop C is raised:
1) Stop A (100%)
2) Stop B
3) Stop C (priority: 120)
4) Stop B



vehicles at stop A will load freight to stop C first, then to stop B.

Note I am not sure of the position for the "Priority" input in the schedule GUI component.
Making paksets since October 2023  |  pak48.bitlit | pak32.box | MLM for pak64 | Empire F7 cars

Life is like a multi-tasking OS: you know you'll eventually get back to everything, but you don't know when.

prissi

My personal comment would be that this works for goods, but is highly unrealistic for passengers. But as I am not playing simutrans any more, I have little say in this, I think. Maybe it should be allowed or forbidden as a setting.

On the implementation, there is an ordered vector template, which would handle the insertion according to priorities.