Working with palleting mods
Posted: Mon Jul 30, 2018 5:58 pm
I'm using Deadlock's Crating Machine, and with that mod (and other paletting mods) you end up with these pallet items you have to return to the provider in some way. My approach before LTN has been to always unload a train and simultaneously load the appropriate number of empty pallet items onto the train. And, conversely, at the provider station, load a train while simultaneously unloading all the empty pallet items.
Now, if a stop is simultaneously asking for x number of filled pallets and advertising the availability of x number of empty pallets, and another stop is doing the reverse, LTN will schedule two trains to handle this. This isn't really what I want.
If I rethink things and instead say "An empty train on this network has every cargo train full of the appropriate number of empty pallets". That can work. Except that LTN won't do anything to enforce this. I have to carefully set up stop conditions to load up just the right number of empty pallets into the train, and in some cases there is a risk that the train might be slightly over or underfilled with empty pallets. For my non-LTN stations I handle this by having one of the train conditions for leaving a requester station being that it contains exactly the correct number of empty pallets, and that works. But there is no way to make LTN do this.
The problem is, how to handle this flexibly.
One idea is to have LTN record the contents of a train when it creates a schedule for a train at a depot and have a requirement that the train return to that state at the requester station before it leaves. This behavior could be triggered by turning on bit 31 of the 'this is a depot' signal.
It would be the player's responsibility to make sure that all trains participating in a network that had a particular idea of what 'empty train' meant all returned to depots that had this bit set.
The reason I'm considering LTN at all is that I was previously using a 'all stations that need the same product have the same name' strategy, and only enabling a station when it had a need for the product. But this would result in multiple trains making their way towards a station when it enabled only to have one train abort halfway through and return to the originating station. This was much less than desirable. It wasted a lot of fuel, clogged train networks unnecessarily, and required that I have refueling stations at far-flung mines.
Now, if a stop is simultaneously asking for x number of filled pallets and advertising the availability of x number of empty pallets, and another stop is doing the reverse, LTN will schedule two trains to handle this. This isn't really what I want.
If I rethink things and instead say "An empty train on this network has every cargo train full of the appropriate number of empty pallets". That can work. Except that LTN won't do anything to enforce this. I have to carefully set up stop conditions to load up just the right number of empty pallets into the train, and in some cases there is a risk that the train might be slightly over or underfilled with empty pallets. For my non-LTN stations I handle this by having one of the train conditions for leaving a requester station being that it contains exactly the correct number of empty pallets, and that works. But there is no way to make LTN do this.
The problem is, how to handle this flexibly.
One idea is to have LTN record the contents of a train when it creates a schedule for a train at a depot and have a requirement that the train return to that state at the requester station before it leaves. This behavior could be triggered by turning on bit 31 of the 'this is a depot' signal.
It would be the player's responsibility to make sure that all trains participating in a network that had a particular idea of what 'empty train' meant all returned to depots that had this bit set.
The reason I'm considering LTN at all is that I was previously using a 'all stations that need the same product have the same name' strategy, and only enabling a station when it had a need for the product. But this would result in multiple trains making their way towards a station when it enabled only to have one train abort halfway through and return to the originating station. This was much less than desirable. It wasted a lot of fuel, clogged train networks unnecessarily, and required that I have refueling stations at far-flung mines.