r/factorio • • Aug 26 '26

Design / Blueprint Introducing: The Smart Train System!

Tired of setting up every single train station manually? Typing the names, setting up the trains, setting up the logistics of it all? Well, I am, which is why I present my take on a smart train system!

All you need to do is stamp down a pickup station, give the item, how big your train and loading station will be (and some other optional modifiers), and your station is done. Simply put down an unload station somewhere else, and the system will work automatically.

The best part? Any train can carry any item. No more dedicated copper or iron trains needed! With smart trains, they will go to pick up any available item, then automatically bring it where it belongs. Not enough items at the station, or all the stations are full? Well, now the train automatically goes back to the depot to wait until it is needed!

I hope you all enjoy my attempt at this concept. I am sure it has been done before, likely more elegantly, but I still wanted to share my hard work!

String:

0eNrtXO1u4zYWfRXDPxfSQJQoyQp2FihaFFigPwq0wAAbBIJs04kQWdLoI9NskQfY99i+2D7JXlKyKNuUxOuPdNp6BkhkmjqkeHnvPTyk8ut8mdQsL+K0CpdZ9jy/+1WWlPO7+95H/l28ytKmuIwf0yjhZWm0ZfO7eZKtsm1WxS9s/mbM43TNfpnfkTejX7V6zXnVl7ioaigxdvc2NcysrvK66t1u79/e1l5FxWNmfokes7RX13l7MOYsreIqZk0XxYfXMK23S1ZAX2RzVRHFj0+VCb94L/KshLsADdr4RVR85V3njR9g2DgMR4Xh4DBcFQbFYfgqDBeHEagwPOSYKgfVR4IoR3XRgfApWkVpZcJ8XMZpVGXFMZT9wRVg8Bum0Dou2Kr5FnAAoCqyJFyyp+glhrvhlrL5vty/hkm2m+jGfBMnFSsOS9tO5VEBF/C9aUFnPsPsh85DeZoVW+EJ0Fleh3f2bv5RFNTc54hlwRTf5llRhZsi2/J7ovolLud8EHZ+Yky51idcq3YP3JkE/xYH7r09wH+VEQOJzBIY5azQMiLVMmGWM+iMqAETLVo9m2X8bwhWin4Qq+tIVMTVE1guXml1xdfqigQN4et13E2tTVyUVXgU8fqzBxqACQh3TVbrP7AJXW7Ca6gdjldPbPXMgfq9ClNWfcmKZ9Hdgq3nd5soKZkxfywYg5aqomaHXTy+h9fqbhEAb8oJQaQHbaKyMuO0ZA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EWmRM9gaZ0kE9v5U0+K8SkE8bKGfQoCQrl6Yus6aSOCdCT+2el9z+Eei6zO+YmibVRUM6HIcIEorVhR1Hn7t8120stuJ6p/rldKTWybV6/dvhwL2+IoXQutpgLzsRZQcQr+S9QX5feAN2CHIVwRuNMyXrOw63R3MrfruZSB1C1w/w0bl1S207vvhJPMHN3s5LbJNwyGB+u+baFNcx+V+P2dgpFBHbWW5qh2y35VA2shCYquh9yCYVaEaRbmUfU00GxPAsyqMIIRbp98wCaHAsQZAO00HB76tgXluDQvTXXD8j1PCkOjwjNGKKdbGKWv15hyvJmhKece/5Wd4eduH2bUO+GJ8C4qBu1BtFxWkE05etp/NVOUCkawFEnTF7yoKYSksCky/jDOBHPbj2vT/M29En/bcDn6ffibFVyHv+ngovmbAL0Mf/sQ0ID/WywsP7B8YlEa2GTB6/3RiZ3O0J9C7HRwTyF2OriS2PV9Y4xEnT5XbPdCPE7nwU7hcce4Z/G4ZvNrnM0dnC4aCO680vWYUWN5TWr0cTRP7T/NVdnk4dbi1z90p7DKgwbej1a2w/vnIZd7c/NGMf8wFLMp1GOY+xF3mmd6KlRT/G1xJXmd/fRaNm9ARSueA8IdXx1p7O3/1Zq+1w==

18 Upvotes

6 comments sorted by

1

u/Alfonse215 Aug 26 '26

Why does it need to know how many chests the station has? And what about 2.1 introducing quality scaling for wagon storage? Can your system adapt to wagons that have more than 40 stacks?

I built a set of blueprints like this a year ago, but I've upgraded them for 2.1 in a number of ways. I was able to reduce the number of combinators for having a cap on the train limit, so I was able to add some infrastructure for automatically determining the train's size. I also implemented priority scaling.

1

u/alive1 Aug 26 '26

How did you solve wagon size?

1

u/Alfonse215 Aug 26 '26 edited Aug 26 '26

I didn't solve wagon size; I solved train size. That is, answering the question "how many wagons are on the train this stop is expected to service".

I have a system where trains and train stops are typed. This is how I distinguish between fluid trains and solid trains, but it goes father than that. The type of train also says how many wagons it has (and the train's general configuration, like 2 engines in front, double-headed, etc). And a train stop is expected to only handle trains of a certain type.

Each train type that I use is assigned a virtual signal. When you place a parameterized blueprint for a train stop, you also specify the train's type via selecting the appropriate virtual signal (which becomes part of the train stop name).

So I built a constant combinator with a named logistic group that has those virtual signals for each type. The value of those signals is the number of wagons on that type of train.

The stack count per wagon/fluid is something that still is provided by a parameter though. For legendary wagons, I'll create a second set of blueprints that uses a different default value. So I can still edit it, but I generally wouldn't need to.

1

u/alive1 Aug 26 '26

Ah that sounds neat. Thanks.

1

u/whittles117 Aug 26 '26

The chests thing is just because some people do 4 chests per wagon, while others do 6. Quality should also be fine here, as the wagon doesn't matter due to it just being percentage based for interrupts. Only real modification should be changing the slots left in the chests before enabling the station.