Friday Facts #389 - Train control improvements

Regular reports on Factorio development.
apriori
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Feb 18, 2016 8:13 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by apriori »

Utoek wrote: Mon Dec 18, 2023 12:14 am
I think conditions (maybe "pre-conditions") better matches my user model, but I wonder what Sony, or Apple, or Freightliner would call this feature if they shipped it. Departure checks? Launch logic? (I'm not a marketing artist)
• Interrupting activities/trips
• Side activities/trips
• Conditional activities/trips
• Schedule breaks
Any code or mods posted by me are WTFPL, unless otherwise copyrights are specified.
ironfist95
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Dec 18, 2023 9:41 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by ironfist95 »

I'd love a way of having trains listen to the circuit output of a train signal, where a clear signal is red for specific trains. thus creating a section of track which trains must meet a condition to use.
Cerberus
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sat Sep 17, 2022 8:12 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Cerberus »

It is too much for me to read the entire topic, so maybe it has been said already, but I wanted to say something to everyone requesting a feature to make interupts station-specific, for example to make sure the train only goes to the refuel train station when it is near, and not when it is at the other side of a big base.
The 2.0 will already be able to do that based on the information we have. The developers said that interrupts accept circuit logic. So all you have to do is add a circuit condition to the interrupt, for example "R = 1" (refuel) or "F = 1" (fuel). And then add a constant combinator to all train stations close to the refuel station, emitting the 1 signal for your chosen virtual channel (so R or F in this example).
It is even easier than adding the same interrupt to every "close to refuel station" train stop. You can even disable the combinator temporarily if needed for some reason, or make that R/F signal conditional on its own.
The only disadvantage if this was 1.1 would be that you have to wait for a bot to place the constant combinator before you can configure it but the developers said in a previous FF you can configure ghosts now too (luckily!).
So this is easy to do and superior to make interrupts station-specific in the GUI.
Especially also because train stations can sometimes have the same name, but they might not all be in close proximity to a refuel station. The circuit logic fixes that too.
Svip
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Apr 29, 2018 6:19 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Svip »

Indeed, a keep point to interrupts is this:
Whenever the train wants to leave the current station, it checks all the interrupts one by one, evaluating the interrupt conditions. If the conditions are fulfilled, the interrupt is activated and the targets are pasted into the current schedule as temporary stops.
They are only evaluated at train stations. An interrupt cannot occur while in transit. I failed to noticed that, and honestly thought an interrupt could occur at any time. But if it's at train stations, then it's trivial to set up a signal to prevent certain stations from being considered.
deegeeooh
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Aug 15, 2020 11:52 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by deegeeooh »

Great and clever changes, this solves so many problems in an elegant way, love it!
Mur
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Mon Feb 11, 2013 3:52 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Mur »

I would love to see trains have more of LTN functionality https://mods.factorio.com/mod/LogisticTrainNetwork where we could request and count stuff easier than the current system. This is partly there but I think it can be improved more.
republikanen
Inserter
Inserter
Posts: 22
Joined: Sat May 25, 2019 11:34 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by republikanen »

Reservation upgrade
...
I would be interested to know if other people encountered this problem in 1.1 as well.
YES I have observed it at least once. I had station limit set to 2 but still I saw a third train trying to enter a dropoff station while the empty train was trying to leave. I was really puzzled by what was going on. When I say this explanation of yours, it was very obvious that this was the problem I had encountered.

Thanks!
Tnarg
Long Handed Inserter
Long Handed Inserter
Posts: 68
Joined: Tue Apr 19, 2016 8:23 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Tnarg »

I hope the Combinators 2.0 has options for train capacity and chest capacity for item. The same as it has rocket capacity of the input item. Would make train automation easier.
User avatar
Dial-up
Inserter
Inserter
Posts: 28
Joined: Sun Nov 12, 2023 2:02 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Dial-up »

um, there is a question, what I see is an excellent solution for p2p stations - the most common solution for trains, p2mp/p2mp/mp2mp - also not a problem even now, provided that we need to serve 1 resource. but I still don’t see how to make a multi-station for receiving/sending multiple items.
judging by the screenshots, the developers are not going to do this, but still, it would be nice to have something like that. in this case, of course, it is necessary to send what the train wants to the logical network
leoch
Fast Inserter
Fast Inserter
Posts: 136
Joined: Fri Dec 16, 2016 9:37 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by leoch »

Really nice improvements there!

Only two other train "mods" I can think of that you missed:
User avatar
Locane
Fast Inserter
Fast Inserter
Posts: 126
Joined: Fri Jan 04, 2019 8:46 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Locane »

Oh my God "train color based on destination" is such a huge time saver for me. I am so excited to not have to fiddle with every single train I want to add as much! Love these improvements in this post!
Zarnoo
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Mar 31, 2016 6:01 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Zarnoo »

How does this work with LTN ? I have to say, I also love trains and LTN is a game changing mod which I'm no sure I could live without. It doesn't quite do all the things you've shown here, but in some ways it also does more.
Z
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Qon »

Zarnoo wrote: Thu Dec 21, 2023 10:58 am How does this work with LTN ? I have to say, I also love trains and LTN is a game changing mod which I'm no sure I could live without. It doesn't quite do all the things you've shown here, but in some ways it also does more.
Z
Who are you asking, and why here? Ltn isn't written by wube. No mod works at all with v2 right now, so that's the answer to your question.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
fusionfan
Inserter
Inserter
Posts: 25
Joined: Sat Jul 27, 2019 2:40 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by fusionfan »

LTN huh? :)
baerking
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Dec 21, 2023 11:22 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by baerking »

I would love it if there were station groups. A station can be in multiple groups at the same time and in a schedule one can either specify a group or a station as a destination. Ideally the grouping can be controlled via circuit network. This means, one could request mutliple resources with the same station. And disable a group if one has enough iron plates for example.

Since trains are now in groups, it feels like the natural expansion for stations as well.
Cerberus
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sat Sep 17, 2022 8:12 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Cerberus »

IForgotMyName wrote: Fri Dec 15, 2023 12:57 pm Incredibly useful improvements! Trains at least are already smart, but it is still tiring to configure the railway system even if it is small
However, new improvements can confuse a beginner. Not because features are complex, but because most of them are not clear how you can use them. For example, "Interrupt in Interrupt", in your words, makes sense only on a specific planet, but some players are unlikely to even play with the Expansion
I assume the tutorial, or even better, the tips & tricks hints that pop up during the game when you can do new special stuff, will cover all that, and explain what interrupts do with examples. Just like how rail signals and train signals got explained to the player, even letting the player use a virtual map to test signals.
Feather
Burner Inserter
Burner Inserter
Posts: 17
Joined: Thu Aug 31, 2023 4:24 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Feather »

I might just be dumb, but do interrupts interrupt whatever the train is currently doing, or is it queued after? (and can you toggle it)
Having a train go to pick up ore just for it to do a 180 half way through would be slightly annoying
User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 216
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by picklock »

As far as I understand it, the check whether the conditions for an interrupt are fulfilled only takes place when leaving a train station. If the conditions for an interrupt are then fulfilled, this is followed up.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
kwyntes
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Feb 06, 2023 9:46 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by kwyntes »

Right so I just implemented a mod that should solve the issue of circuit-dynamic routing through a very minimal change. Not saying that this should be implemented in the base game, but I do think I might be on the right track for how something like this could be done properly.

I'm not sure how intuitive this is, but it's exactly that last missing piece the circuit network was still missing for controlling trains (mostly), and it feels kind of wrong to have to use a mod for this IMHO.
User avatar
Khazul
Inserter
Inserter
Posts: 25
Joined: Fri Sep 03, 2021 4:47 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Khazul »

I made a mod to do some of this ages ago to stop trains clogging up stations when the destination is full - basically auto-redirect to a depot on destination full or fuel low and never play without it now.
The problem was that they couldn't move if the destination was full, so other trains couldn't get into the station and everything starts to grind to a halt.
I tried LTN for a while before making the mod, but it seemed to add way too many of its own problems and extra circuit and filter burdens.

It is most welcome to see this kind of thing in the core game as trains have long been overdue for another round of improvements.

May be worth a look at what people commonly do with circuits around dynamic limits, at least the simple common use case for such and see if some of that can be streamlined into the core game at well.
Post Reply

Return to “News”