Smart Train Deliveries with Combinator Magick [0.13/0.14]

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

I'm not even sure what I'm looking at, but this is not the current version of the setup.

You have to go to the post that is linked at the very top of the first post. That's were you find the demo map and the mod pack of the current version.

You also have to use the latest version of Factorio.

In the demo save you can also see how things are supposed to look in a game. That will make it a lot easier to use the blueprints yourself.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

bodito
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Jun 21, 2015 4:34 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by bodito »

Is it possible to do this without the use of the mod Smart Trains using only the new train capabilities added in the core game?

I only ask b/c my computer can't handle Smart Trains (I used the 1.0.0 release for what it's worth).

Either way, really awesome work configuring all of this.

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

bodito wrote:Is it possible to do this without the use of the mod Smart Trains using only the new train capabilities added in the core game?
No, because we need to manage all trains on a single line and we need to send trains directly to a destination. This is not possible in the Vanilla game.
I only ask b/c my computer can't handle Smart Trains (I used the 1.0.0 release for what it's worth).
Your computer can hardly be the reason why Smart Trains is not working, because it only requires very little CPU.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

bodito
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Jun 21, 2015 4:34 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by bodito »

siggboy wrote:Your computer can hardly be the reason why Smart Trains is not working, because it only requires very little CPU.
It might have been the update to 13.17 from 13.9. I'm honestly not sure. However, after removing the mod and playing in 13.17, my FPS/UPS increased back to 'normal' (still bad, but normal for my computer).
The simple, most likely, culprit is that since I'm playing marathon mod I'm just getting to the point where I just have a large number of entities to handle simultaneously.

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

bodito wrote:The simple, most likely, culprit is that since I'm playing marathon mod I'm just getting to the point where I just have a large number of entities to handle simultaneously.
Yes, it has nothing to do with SmartTrains, and proably also not with any other mods that you're using. Most mods only use a fraction of each game tick to do their processing, and it doesn't have a noticeable impact on your UPS. There are exceptions to that, but they're rare.

You would have to build hundreds, if not thousands of Smart Train Stations, and change the config so they'll update every tick, and then you might see it slow your down your game. It's not something that is going to happen.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

doe
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sun Jul 17, 2016 4:26 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doe »

Ok i deleted the old version of this which never worked for obvious reasons lol. I went onto the demosave and seen yours works flawlessly, So i copied the blueprints for depot lanes provider and requester stations. placed them in my game, with 1 lane 1 provider and 1 requester station. starting slow to try get it started.

After setting up the schedule the way you explained, my train dont want to seem to leave the lane and go to the provider station and not i got a clue whats wrong, i read and re-read your explanation how to set it up.

Can't believe how much trouble i been having lol, spent a few hrs today trying to get it to work. I will get it to work in the end even if it kills me :D

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

doe wrote:After setting up the schedule the way you explained, my train dont want to seem to leave the lane and go to the provider station and not i got a clue whats wrong, i read and re-read your explanation how to set it up.
OK, here are a few things that you can check:
  • Is the provider and requester correctly connected to the red wire bus? You can check that by mousing over the combinators at the stations, at least some of them should receive the "D=1" signal that comes from the depot.
  • Is there a signal "D=1" on the red wire bus? If not, then you need to put it there with a combinator. This combinator is included in the depot, so it should be there (it doesn't matter where it is, but the value "D=1" needs to be on the wire at all times.
  • Is the control lamp on the lane lit? If the lane is selected by the depot, then it should be lit. It will only light up when a train is in the lane, because the depot will not select lanes without a train.
  • There might be bogus signals in the register at the provider or requester. You can try to reset those manually. You disconnect the outpost from the red wire bus, then you look for the combinators that are looped back to themselves. If you disconnect and reconnect the loop back wire, it will erase them.
    These are the registers I'm talking about with the self-connecting wires.
    Image
    Image
    Usually you should never manipulate these wires, only do it when the station is disconnected from the red bus, and if there are trains on the way to a provider you need to redirect them manually if you're doing this. Just be warned :).
You can post your save game here and I will download it and look at it.
Can't believe how much trouble i been having lol, spent a few hrs today trying to get it to work. I will get it to work in the end even if it kills me :D
No, it's normal, that you're having problems. The system is rather complicated. Unfortunately it's very difficult, if not impossible, to make it in a way that will be completely easy.

There are too many features in the current version to make it really straightforward.

When it all works, then it's really great what it can do and you will have fun. But until then you'll have to fight a little with the combinators :). It's also important that you are very careful when you're handling the stations, so you won't disconnect a wire by accident or remove a combinator or something like that.

I can assure you that is DOES work in a real game, I have 30 outposts now and a really complicated base and it all works. I still need to publish an update to the depot that fixes a certain problem (which you won't run into at the moment, so don't worry.)

There are some mods that are more or less mandatory if you use this, except for Smart Trains of course:

FARL - so you can make railroads easily with wire connections
The Fat Controller - so you can remote control the trains from anywhere
YARM - really good for controlling resource levels, and it also allows you to view your outposts, which is good to check on things

I also use a drone mod, which is called "Drones"; it's a super fun mod in any case, and really useful to go fix a remote outpost when things are going wrong.

All these mods are on the mod portal and you should only use the latest versions. SmartTrains is on the mod portal as well, so keep it updated.

I think I should make a simplified version, similar to the first version that I published here. It does not have requester stations, so there are things that are not possible. But it would be easier for others to set up.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

Here is the provider/requester combo I built earlier as promised. No changes since the beta version. Remember this one has no protection against a full storage.
Its easy to implement storage check for the requester with a combinator or two, but I really have not had the time for it.

Code: Select all

H4sIAAAAAAAA/91dS3PjuBH+Ky4fcthIWwRI8VEb5TCVuW9mj1splSxxbFYk0aGoyTgu//eQEjVSN0kQ3SBI7u5lZscmwX6gv27ga2CbPuzSzXr3sFq+x4c8
yZP4uHx/P6z38fLxeHo65us8SQ9z+Th7TY9J+ffl+/elP3tbzoXz8TGrfvUpeZ7Hu3iTZ8lm/pruYvj7wqkemG3Sw6H4teLfi3F+fxSP/1q+Z/G2GPM8/Nsq
2S6F636U/11fvkufk2NevHjzEh/z+bp4/Fs8f83Sb8k2zuBIc+n+vCgH839eNI/2nMXxAYzng9EKkTf/nn9NdnmczZPDMc7y1kEW5SDbJLuMsfTKAfMs3a2e
4pf1tyTNlu+bJNuckny1T7fxKv26Sl/j7KzTpTu7/iyL19vVy/qwXZXPFx92XObZKdbTVnj++Mv3lrZLDtu40PjsIs0mXe8e2boUDF3O7i3pGBhSkgd3weAL
ulnFlMwKFClIVtYSVk5HWA8IG9jzaBGRnaqMWiA4Gbi0Qx59AQaP6C7tTMfKAVSk7N2lr9adgrDFjAXSehadOiS7VQQ/jo6A1zEnoWoJpbGIiGJBjx8QEqUB
JAqfPjrEREEHxavIk7A0REVpIYT4E5IWwqKwiYv0rFlCXJQGuCg8ul9DYBR0ZBQTyuEljGDS79+vvQlJK4bza3oRISA2Ss/Ar+n1k4TxWgZ0v55QESMR9tGQ
WUvaCVUxyK/lwp5f08sYCcFE0gPmhJJrCaO/S6uOSZqm59YS1jmuQcIX0AeH0cv1yGaeUGIvYbrn9p/uBdMR1oXRw6XlACS3ohcxLowebsD3aXoN48JME60O
65h5QiWMCyHR7R8SJ1TBuDCvdS0iIr2EcGGq5Tlkt5pQTu1CRPRooZKW1ZI17cEJ7Bmk1IxNAQTHjEpxOmb24ITy+i8UJ5RP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tSTYJ0bdajkaBgeP2kzPQUwYfzW5/MHihZww+nmOWuYcdmK/ByTS1Jx2BfQQtgWWf
7wdD6aiEWklkDwx/Eq+U8q0BmmM9tE5ocC+ZpXcf9qTX3QF222goczK+FTP+LCdEBlV3x6MUwiRBQzWu1mDWZMxNHEfsGtNganbMTJ1T0dDD9g9F80J8zsM4
NwQg5pNyDz3UOBpIoptJdZTv21b+n+GwbRlpHEGPTKQmH5oxIvy64awQIr5ANsTlfJSBjiGTYY1U1q5ORDacqWbO/Q9dR3FXjqYhFgMYwsp9Db9STqENXQUz
IqydM6Pt+fA9GsxSt87xJZksHMhk2wKoy/GL53qdRaSzg3FIgtoO7wzV9LCC1alDT9eIUNbOEh7yRg0N1UG9RygGafM+0expwyHFef9oqqLrE6lH+mtkbv2c
6M/ozGkISl2SNsp4Tdv7bNNRXAVD6s9Rscy6j/D3+Sf4+/qH9SlcncFb1ojcPfIS8UViY/ESa+eOKUIEbpSAFMZaVwYJO0VDxfCnIzZH2jca1DthKO6smTta
PF9vPHfWPykvUvT9dJ3rjrV7C3Hp0zxLn9L55qXAtriIckWs3J3/KpsJIuF9r2r5+I+Vn/+lh3gef39dFwBV3/crH/1gjVsfVvNGvmCARpqRjqZWViGollNN
XGXZp3NbnIaO/7Q3W6lLuEi/LQQvqvSWKYRDWOjXaRQfda12zYrupSv1Ab/KtLMjeTwz3YW4S1NbL9g4/+Z5ATvZnAVWtPOfWcUftxqh+ucv1+X4h788XK84
fiidJn2oBn38+CWL81N2eFj9Eh+2/we+cQZfk8AAAA==
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:I found a condition that the depot can get stuck in phase 2 for a while. It will select a resource for delivery for which there is no longer any demand. Then no trains will be sent until there is demand again for that resource. I think this happens when a train is unloading at a requester, and during that time this resource gets picked for the next delivery. Then when the depot actually starts looking for a requester, the demand has dropped below the threshold and it will get stuck, unless there's another requester for the same goods (which is kind of rare).

So it will recover eventually, but it's not good. I'll make a fix, but it could be difficult. I'm not entirely sure yet, as it's kind of a limitation of the current protocol.

Probably I'll need some kind of "retry" hack, which will restart phase 1 if no match can be made in phase 2.
I think I have seen this happen, but it is very rare so no big issue.
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

doxsroxs wrote:I think I have seen this happen, but it is very rare so no big issue.
I already have a solid fix. It happened quite often on my map.

I took the opportunity to also clean up the depot circuit a little more.

I made sure that upgrading is easy, because the combinators with the resource setting are at the same place as before. So you will be able to simply preserve those.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:...such as shipping intermediates or oil barrels.
I got to ask, whats the problem with oil barrels?

I have a station request full barrels, empty barrels then go to a provider station for empties.
The only issue I could think about was ensuring you do not flood the system with to many new barrels or it can clog up.
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:
doxsroxs wrote:Have you done any throughput experiments? I know I can get high with multiple stations. Im sure it can be extreme, but question is, am I worrying for nothing? :p
In 0.12 I made a distributed base, where all the products are shipped with trains (so no belting of plates directly into consumers, and no feeding of chips into rocket factory etc.).

In that base I did have trains with 4 wagons and 2 locomotives, and no mods that enhanced the Vanilla entities. The only mod that changed gameplay (except SmartTrains) was Nucular, for energy generation.

The final version of the map produced a little more than 1 rocket every 3 minutes. At that point I did have 20 trains on the map, total. I did have no buffers of anything, only the minimum amount that you need at trains stations.

The depot had 7 lanes, but that was complete overkill, probably 2 or 3 lanes would have been enough.

I'm pretty sure I could have scaled it to 1 rocket per minute. Maybe I'll even resurrect that map one day and try if it's possible, just to see how many trains are necessary.

In my current game I only have 2-wagon trains, so it might become a problem to scale that. I will see. It's also a constrained game because I build everything on artificial islands.

I will send you a save of that game so you can have a look. At the moment I'm not producing any rockets yet, didn't even have my first launch. When the rockets are flying I'll send you a save and you can play around with it, and see how I make things work (or fail :).
That would be really cool, Im sure I could steal a few things from your designs :)
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

siggboy wrote:
doxsroxs wrote:I think I have seen this happen, but it is very rare so no big issue.
I already have a solid fix. It happened quite often on my map.

I took the opportunity to also clean up the depot circuit a little more.

I made sure that upgrading is easy, because the combinators with the resource setting are at the same place as before. So you will be able to simply preserve those.
Awesome, soon you will have this working better than ever! :)
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

muglebust
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Aug 02, 2016 2:49 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by muglebust »

Great contraption :)

Now how do I get it to support special trains? I would like to transport fluids in rail tanker wagons without barrel hassle. However, I dislike the idea of adding an extra fluid wagon to all my trains.

Initial idea would be a separate depot and a separate train line, the two train lines would be identical, except they would have different depot stations, all other stations would be on both lines in the same order.

Each depot logic network would have different objects eligible for transport, with no overlap; station logic would have to ensure proper fluid off loading, including volume count for the logistic train logic to function. But that should be easy enough, I would just have to share the available loading space between pumps and inserters for stations servicing both types.

Do you see any flaws in my plan? Or any other way to achieve the same? I would essentially have both depot signals sharing the same main bus, but all trains would return to their correct depot if they return to the first station of their line, and all stations would have a single unique number.

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

muglebust wrote:Great contraption :)

Now how do I get it to support special trains? I would like to transport fluids in rail tanker wagons without barrel hassle. However, I dislike the idea of adding an extra fluid wagon to all my trains.

Initial idea would be a separate depot and a separate train line, the two train lines would be identical, except they would have different depot stations, all other stations would be on both lines in the same order.

Each depot logic network would have different objects eligible for transport, with no overlap; station logic would have to ensure proper fluid off loading, including volume count for the logistic train logic to function. But that should be easy enough, I would just have to share the available loading space between pumps and inserters for stations servicing both types.

Do you see any flaws in my plan? Or any other way to achieve the same? I would essentially have both depot signals sharing the same main bus, but all trains would return to their correct depot if they return to the first station of their line, and all stations would have a single unique number.
I might not be the most qualified to answer, but my thought is that each station can be connected to only one depot. Else you would probably run into conflicting signals.
However, it should be easy to run one system off a green wire and the other depot off the red wire. With the green system handling only fluids and the red system hanling all normal cargo.
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

muglebust wrote:Now how do I get it to support special trains? I would like to transport fluids in rail tanker wagons without barrel hassle. However, I dislike the idea of adding an extra fluid wagon to all my trains.
I you use barrels, it can be integrated into this system without making any changes or using any special trains.

The normal train route is: Depot -> Provider -> Requester -> Depot

In the case of barreled oil, this changes slightly:

Depot -> Provider (for empty barrels) -> Requester (oil outpost, requests empty barrels) -> Full barrel unload -> Depot

The stations marked in yellow will be at the refineries. The "full barrel unload" can be a conventional requester station that does request other things, the train will simply dump the full barrels there and then return to the depot. The "provider for empty barrels" is a normal provider station, it could also provide other things in a multi-provider setup.

The outposts that unload the empty barrels from the train also need to load full barrels into the train. The leave condition should then be when the train is out of empty barrels (or inactivity), which works fine if the unloading and loading happens at the same speed.

At the "full barrel unload" you simply unload everything, the full barrels and also any empty barrels that still might be in the train.

Robots at your refineries can then sort the barrels as needed.

I'm using this above setup and I did not have to install any additional stations at my refineries than the two I had anyway (a provider for end-products and a requester for coal to make plastic).

There will be no barrel hassle, the only thing you have to do is to inject a number of empty barrels into the system. Since the outposts request empty barrels while the oil is still flowing, but the provider/refinery can only provide barrels that it has already emptied, there will be a natural cycle of barrels, without the player having to worry about anything. The only thing you have to do is to provide enough empty barrels according to your oil throughput (could be done automatically, but probably overkill).

The most difficult thing is to set up the train conditions correctly, and make a little wiring at the oil outpost. The system itself does not need to be tweaked at all, it fits all in there.

--

If you use a rail tanker, then you need a second depot, which is separate from the first. It's possible to use a "light" version of the setup, but only for transporting the oil (in a tanker), and run that in parallel to the main installation.

The oil network can then use special trains, which can be different from the main network.
Last edited by siggboy on Thu Aug 25, 2016 2:31 am, edited 1 time in total.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

doxsroxs wrote:I might not be the most qualified to answer, but my thought is that each station can be connected to only one depot. Else you would probably run into conflicting signals.
However, it should be easy to run one system off a green wire and the other depot off the red wire. With the green system handling only fluids and the red system hanling all normal cargo.
Yes, it's not possible to run two depots on a single red wire bus.

You can use the green wire as suggested, or you can use a special version of the depot on the red wire that is not conflicting.

I've made one for 0.12 (also for handling oil), it's a lot smaller than the main version and it does not conflict.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

doxsroxs
Fast Inserter
Fast Inserter
Posts: 160
Joined: Mon Aug 01, 2016 4:19 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by doxsroxs »

Aha, I do the barrel stuff different.

My refinery requests full oil barrels in a normal requester station.
When emptied they are loded to normal provider station for empty barrels.
At the outposts for oil I have the opposite setup, requester for empty barrels and provider for full barrels.
All stations are standard and no special configurations.

New barrels are sideloaded onto the belt prior to the provider station for empty barrels at the refinery.
That way old barrels are always prioritized and new barrels are only injected in the system as needed, thus avoiding a clogged system.

I might also add that we debated using the oil tanker for the awesome looks, but decided against it for now due to the slow load/unload cycles when compared to barrels and complications with running multiple depots/train control systems. Though to be honest, throughput was probably the main issue :p
Send train to station ID using combinator signal is a long overdue feature!
viewtopic.php?f=6&t=74663

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by siggboy »

doxsroxs wrote:At the outposts for oil I have the opposite setup, requester for empty barrels and provider for full barrels.
It's the downside of that approach. You need two stations at each oil outpost.

The system that I've described is a little less straightforward to setup. It's necessary to manually set the correct destination station at the oil outposts, if that number changes or you forget to set it then you cause chaos (I'm saying that because it happened to me earlier :).
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

muglebust
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Aug 02, 2016 2:49 pm
Contact:

Re: Smart dynamic train deliveries with combinator Magick [0.13]

Post by muglebust »

siggboy wrote:Depot -> Provider (for empty barrels) -> Requester (oil outpost, requests empty barrels) -> Full barrel unload -> Depot
Thanks for the idea, but thats not really practical for my intentions, I want to have other fluids on rails other than crude, the basic setup could be to simply have dual stations, and ship it as any other normal cargo, where the empties are just transported around as any other cargo. One of my inteded fluid destinations are remote outpost with flame thrower defences, they could have nice compact stations, even more compact if they were designed to be used for double header trains only.

Have you published the oil depot BP for 0.12?

What about having one depot responsible for the entire logic, but having more lanes in it, where some are reserved for the other traintype, the lanes would actually be named differently, so they form a station by themselves.

I would have to help the depot logic along a bit, so instructions for certain items were always transmitted to the correct depot lanes, a few more tweaks could modify the outbound depot signal, telling the requester to return the train to station #2 rather than station #1, so i would no longer need to have two trainlines.

It could be prone to problems if the depot selected some cargo for transport, with no vacant trains of that type. I think I will start by testing a bit more on the demo map :)

Post Reply

Return to “Combinator Creations”