ve2dmn wrote: Tue Mar 10, 2026 12:48 pm
The trains are doing mixed-cargo on Fulgora. They have 1 stations that is a generic 'loading' station:
What exactly do you mean with "mixed-cargo"? Do you mean you load multiple material into the same train at the same time, or do you mean the same train loads and carries some item for one trip, becomes empty, and handles a different item for the next trip?
I'm asking because it's not clear if you posted some schedule screenshots or all schedule screenshots, so your train behavior isn't fully clear. You have that green cargo wildcard in the loading station name, so it seems you tried to construct loading station names. But for a generic train setup there cannot be a wildcarded loading station - it's just something like "loading" for every station no matter the material.
The 1st variant is next to impossible to implement directly with interrupts, because there is no reliable mechanic to dynamically send a train to some station you determine with circuits. I didn't yet see one working example for that, although some incredibly complex circuit contraptions claim they're working fine.
The 2nd variant is the common case. However it's mandatory trains become completely empty if they're heading to some loading station, otherwise it's possible they're being loaded with 2 and more different items and it's not predictable which different items, and the ratio between them. So if this is running for a longer time, your trains can carry a small collection of random leftovers and the majority of the cargo slots will contain the recently loaded item.
I implemented trash removal on my latest map that seems similar to what you try to do. It looks kind of similar to yours but not completely.
The main schedule:
It's intended for ore transport, so the loading station is named (mining drill) instead of a generic "loading".

- 03-10-2026, 16-46-52.png (54.58 KiB) Viewed 244 times
Delivery interrupt:
The interrupt will trigger if there are more than just leftovers in the train, and the train will be unloaded until it is either empty or its cargo is below 40 and a short timeout elapsed. This is to make trains leave with a small leftover if cargo unloading wasn't balanced across wagons.

- 03-10-2026, 16-48-51.png (59.11 KiB) Viewed 244 times
Interrupt to flush a train with leftovers:
This interrupt will trigger only if the train carries not more than the leftover amount. The flush station will just remove every item from the train, so it becomes empty.

- 03-10-2026, 16-51-25.png (51.45 KiB) Viewed 244 times
Refuel interrupt:
Not important for this discussion, just added for the complete picture.

- 03-10-2026, 16-53-27.png (75.45 KiB) Viewed 244 times
Depot interrupt:
This is probably the most interesting one, because it handles the "destination full or no path" situation. It makes trains leave the unloading station to free it for the next train and make the train wait at some depot station for empty trains. It just triggers for empty trains.

- 03-10-2026, 16-54-13.png (54.86 KiB) Viewed 244 times
About unknown items, with no corresponding unloading station: If there are less then 40 unknown items in the train, my setup will direct the train to the flush station and unload. This will properly handle the situation you sometimes encounter on Nauvis: a single stone is being loaded along with ore, and due to this stone the train system starts malfunctioning.
If there are more than 40 unknown items in the train, it breaks. This situation is not handled. I don't handle it, because it's not possible to detect if a train has lots of some unknown item or if just all valid destinations are full. Trains with large amounts of unknown items just stay at their loading stations with "no path". This is not perfect, but it's ok since if you have a station that's loading large amounts of items for which no unloading station exists, that station has no purpose at the moment. I have to build that unloading station, and as soon as I build it train operation for this item will proceed properly.
You can partly handle it by adding a 2nd kind of depot - a depot for full trains. You would duplicate the current depot interrupt and add it after the current depot (order is important). Remove the "Empty cargo inventory" condition and replace the depot names with the additional depot stations for the full trains. I didn't do this, because I want full trains just wait at their loading stations if all unloading stations are full. Not at a separate depot.