Friday Facts #389 - Train control improvements

Regular reports on Factorio development.
KeksPlaysFactorio
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Dec 15, 2023 4:44 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by KeksPlaysFactorio »

I have a very small request, what about also adjusting/changing color of cargo wagons and fluid wagons?? I would love to see this.
MrBuisson
Inserter
Inserter
Posts: 28
Joined: Sat Feb 04, 2017 9:08 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by MrBuisson »

I did have the issue with train stop being considered free the moment the train starts. For large arrays of stops this was causing deadlocks.
The solution I implemented was : a train signal in just front of the train station with a logical connection to it. The train is only allowed to leave if signal is green - and the moment it leave the signal goes red for all parallels train stops. This worked like a kind of mutex and trains were only able to leave if they could actually leave.

On the train side of things, I’d love a way to find the train(s) arriving to a certain station. I have 100s of ore train and sometime one is stopped somewhere, causing the station to never receive inputs anymore. May sound stupid but with many many trains deadlocks are hard to debug…

Also, it’s problematic when a train re-calculate its path finding just to allow an other train to take its place. You get two trains on the way to stations with one place free - and one train then stop in the middle. That’s a great way to deadlock !!

Enough with the complaining. I love quite a lot the improvement on trains, especially the trains groups. Many time I had to change slightly eg my green signal train group one by one (50+ trains) to add or remove entry/exit stops. I’ve finally found a way to do very dense trains parking but on the way I had to redo the schedule more often than I wanted 😅
Codemaster
Inserter
Inserter
Posts: 21
Joined: Fri Feb 19, 2016 7:52 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Codemaster »

About the auto coloring based on destination.
I would like to see the option to alternatively give the train group a color, because with auto coloring based on destination all trains going to or being in the depot would have the depot train station color, which makes them not distinguishable. It would be nice to see at a glance how many lets say trains from the iron ore group are at the depot.

Edit: Or allow stations to define that their color should not be used, so the trains do not change color when going to depot or refueling.
kitt159
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri Oct 11, 2019 6:34 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by kitt159 »

Color-changing trains are weird. Have you ever seen a train change color during travel? I think if the destination was signalled by a colored light somewhere on the train it would do the job and look more natural.
Escadin
Fast Inserter
Fast Inserter
Posts: 181
Joined: Thu Mar 17, 2016 3:15 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Escadin »

Good stuff, but aren't you going a bit overboard with the QoL?

Part of the reason why the circuitry system was so overlooked and underutilized is because the game doesn't leave many interesting usecases outside of gimmicks. Circuits are not part of the discovery and automation gameplay loop. You can over-engineer parts of the game that it itself then still handles more efficient in many cases. It's not really worth thinking about for many people and while you made them less effort to setup there is still little gain. There simply is barely anything in the game you cannot do without circuits.

While these train changes are welcome they fill in exactly one of the 2 things I've been using circuits for that actually added some noteworthy efficiency and new functionality. So unless there is something in the content I might just stop using them :/
"--? How are commands compounded in a compounded compound command commanding compound composts." -defines.lua
Saftorange
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Dec 15, 2023 5:11 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Saftorange »

There is some very specific case where this is a crucial thing to have, but it is on a planet we didn't reveal yet, so more on that later :)
Now I really want a planet thats just a giant gas giant with no ground so that you have to place hovering platforms to build your factory on, like Elysia from Metroid Prime Corruption. Constellations of platforms would be linked by suspension rails and gaseous resources are collected by speeding trains, the faster the better. As the factory consists of hovering platforms they can shift positions wich causes trainstop positions/drop off points to change.
Somehow the quote from above popped that into my mind lol.

I also wanted to ask about coloring trains but when I scolled down the answer was already there :)

Btw, are interrups dependent or independent of their position in the shedule? (It seems like they are all listed at the bottom and don't go inbetween)
Sad_Brother
Fast Inserter
Fast Inserter
Posts: 209
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Sad_Brother »

1. We would need "Station NAME ready" condition in schedule. So the Train would have hope to unload the cargo before loading it.
2. Would Train color updated when train rerouted to another Station?
EDIT:
3. How about... "Route to station with [iron] < -10000 in signals" ?
Last edited by Sad_Brother on Fri Dec 15, 2023 5:53 pm, edited 1 time in total.
Rebmes
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Sat Sep 15, 2018 7:51 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Rebmes »

Very impressive.
frayien
Inserter
Inserter
Posts: 25
Joined: Sun Apr 15, 2018 10:34 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by frayien »

Truly insane !
argbla
Inserter
Inserter
Posts: 29
Joined: Wed Aug 30, 2017 6:31 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by argbla »

I didn't know if I wanted to be sucked back in to the ever growing factory, but this above everything else has sold me.
To clarify, this is a core engine feature which will be available for everyone with the 2.0 base game update.
You are too kind. But how could you not get the expansion to better enjoy these superior trains?

I hate to undercut my praise with criticism, but I'll call it constructive. It's no doubt a nice feature functionally, but trains magically getting a new paint job roughly every stop is a bit jarring. If there were some automated mechanical painting animation to explain it, or instead of the paint, it changed the color of some lights on the sides of the train, it would fit better. If nothing else maybe a transitional fading instead of instantaneous pop, so that it can be imagined the trains have some chameleon-like skin.

Regardless, I am already sold on the expansion. Make it any better and you'll be required by law to tell players "please enjoy responsibly".
BeBoxer
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Dec 15, 2023 5:52 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by BeBoxer »

svalorzen wrote: Fri Dec 15, 2023 1:25 pm Very cool! Something not mentioned that I think would really be an additional improvement on top of interrupts would be the ability to temporarily disable interrupts, or fully disable interrupts and only check them at specific points in a schedule.

For example, if you know that the refueling station is in a certain location, you may not want the train to check the fuel during some parts of its schedule which are particularly far away from it, since it would need to travel a lot to get there, and to get back again, wasting time and occupying the tracks more than necessary.

As another idea, you could have specific "interrupts" not be general for the entire schedule but instead only set to be checked at specific points in the schedule, to create a way to make trains conditionally go to some stations with minimal changes to the interrupt system. In other words, when you reach a certain point in the schedule, there's an "interrupt stop" which checks some conditions and decides whether to take it. Once that point is passed, the interrupt stop(s) is no longer available until the train does a complete round of stops and gets back at that point.
Doing that would make the interrupt UI more complicated. I would propose as a more elegant solution that they add a circuit condition for distance to a station. So then your refueling interrupt could be optional on say "'Refueling Stop' distance < 1000" or whatever. Adding a new type of circuit condition is probably pretty easy compared to having interrupts be inserted into specific points in the schedule. There are probably other uses for a distance condition I'm not thinking of as well. It would be interesting to see what people came up with.

On that note, I assume that the fuel level condition will be available on regular schedule stops as well. It would be nice to be able to tell the train to stay at the refueling stop till it was full instead of just leaving on inactivity. That would handle the case of having to wait for fuel to be delivered to the stop for example.
iestynne
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Oct 27, 2023 10:10 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by iestynne »

Tertius wrote: Fri Dec 15, 2023 4:46 pm I am currently (game version 1.1) using depots for this. It's like an extended waiting area in the outskirts of the city, with the destination in the city itself, where there is only minimal space for waiting areas.
Your solution makes sense and seems like the best approach for the current schedules that require explicitly (and usually uniquely) named stations. But how do you extend this to the scenario described in the FFF post, where stations are not explicitly named, and trains are shared between many different resources? The problem then is knowing which depots are paired with which loading/unloading stations...

So let's take the example given in the FFF: your train picks up an unknown resource from a generic loading station, then an interrupt triggers to tell the train that it is in fact carrying iron ore and should thus head to an iron ore depot (before then proceeding to an iron smelting station). Path-finding can ensure that the train heads to the nearest available iron ore depot... but it can't know anything about the associated iron smelting station. So if you have two iron smelting stations (with one nearby depot for each) where one smelting station is ore-starved and another is backed up, some trains will end up going to the wrong depot and then making a long trek over to the ore-starved smelting station. Do you see a clean way around this?
Freddy404
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Nov 10, 2023 3:54 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Freddy404 »

svalorzen wrote: Fri Dec 15, 2023 1:25 pm Very cool! Something not mentioned that I think would really be an additional improvement on top of interrupts would be the ability to temporarily disable interrupts, or fully disable interrupts and only check them at specific points in a schedule.

For example, if you know that the refueling station is in a certain location, you may not want the train to check the fuel during some parts of its schedule which are particularly far away from it, since it would need to travel a lot to get there, and to get back again, wasting time and occupying the tracks more than necessary.

As another idea, you could have specific "interrupts" not be general for the entire schedule but instead only set to be checked at specific points in the schedule, to create a way to make trains conditionally go to some stations with minimal changes to the interrupt system. In other words, when you reach a certain point in the schedule, there's an "interrupt stop" which checks some conditions and decides whether to take it. Once that point is passed, the interrupt stop(s) is no longer available until the train does a complete round of stops and gets back at that point.
Another way to solve this and similar problems (and with much less additional UI) was if interrupt conditions could check what station (name) the last stop was. Although they didn't say that there are no more special interrupt conditions then mentioned, so maybe that's already in and just didn't make the post?

Unrelated Question: Can we have an empty main schedule and only interrupts?
pfr
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Dec 15, 2023 7:26 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by pfr »

Reservation upgrade

All the more advanced interrupt schedule systems heavily depends on the train stop reservation limit. This is what prevents all the trains in your system trying to go to one stop.
But there was one little problem with the system, which could even cause traffic jams/deadlocks, and which was made much more important with the generic schedules.

The problem is that once the train decides to leave the station, it instantly clears the reservation of the train limit, while still physically blocking the stop. This lets another train start its journey toward the stop, while there might not be enough space to wait without blocking the mainline.

So we fixed it, so the train will only give up its reservation once it leaves the block with the train stop. I would be interested to know if other people encountered this problem in 1.1 as well.
I am very happy to hear this. On a previous playthrough I tried jumping through various hoops using circuits/special stations right after the actual stations/ buffers/etc. to work around this, but did not end up finding a way to completely resolve the issue, only ever pushed the issue to a different part of the system. The complexity did not end up being worth it so Instead I made all my train schedules have the train route to a "depot" after every stop and spread depots all over the map and made sure to always have more depots than trains.

With this reservation change it will simplify my scheduling quiet a bit and also result in a lot less unnecessary train trips.

Thank you!
User avatar
CureSafaia
Inserter
Inserter
Posts: 22
Joined: Mon Jun 06, 2016 4:36 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by CureSafaia »

I wish we could have early access to base 2.0 features, I am having a hard time wanting to play the game now the more I know about what's to come.
This game is awesome
hunter498
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Dec 15, 2023 7:51 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by hunter498 »

malecord wrote: Fri Dec 15, 2023 12:10 pm OMG, love this. All I ever wanted to do with trains in vanilla.

I also like the hint to interrupt and new planets. It allows me to fantasize of a world with environmental hazards and train schedules that have to adapt to weather conditions. Something I'd really like to see.
I personally think its going to be time based items like perhaps radioactive materials that decay if your train takes too long. if most of it is decayed you can go trash it in the middle of a inturupt. and this would make you build the processing plant for this material either on site or close by to get the highest yeild. I would like this idea a lot but i could see people disliking it
Ettesiun
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Dec 15, 2023 7:41 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Ettesiun »

My best prediction for the next planet : planet with huge tide, where water is blocking path and creating island. This is the reason for the interrupt in interrupt.

It means that periodically part of the factory are under the water ( without being destroyed ? Special building ? ) or you are constrained to high terrain. And some part of the factory are cut from the rest.

This means that you have to manage non continuous chain, with enough stock to be able to manage operation.
User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 232
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by picklock »

roy7 wrote: Fri Dec 15, 2023 1:08 pm Someone on Reddit suggested a condition that would test against remaining fuel Mj. This way you don't need to test for low specific fuel type(s). If fuel Mj is low, go refuel. If you change fuel type in the refueling station later on, the train doesn't even need to know.
I am also in favour of having such an option to choose from. Alternatively, you could just talk about fuel in general without specifying the fuel.
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
Glacture
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Mar 23, 2019 1:10 pm
Contact:

Re: Friday Facts #389 - Train control improvements

Post by Glacture »

Oh man, I've wanted improvements like this for so long. The last play through I played, I actually rage quit because I couldn't get train schedules to do what I wanted (without mods) and these improvements solve all the issues that caused me to rage quit.

I wish we didn't have to wait for 2.0 for these. I've been itching to play Factorio again, but after seeing so many quality of life improvements in these Friday Facts, I'm not sure I want to start another vanilla 1.1 game. As you've said in a few of these Friday Facts - "it is one of the features we couldn't play without at this point."

Thank you for such great features. I love having weekly Friday Facts to read again, and eagerly await the opportunity to play with these new features.
TheBrain0110
Inserter
Inserter
Posts: 37
Joined: Fri Dec 22, 2017 4:43 am
Contact:

Re: Friday Facts #389 - Train control improvements

Post by TheBrain0110 »

iestynne wrote: Fri Dec 15, 2023 6:06 pm
Tertius wrote: Fri Dec 15, 2023 4:46 pm I am currently (game version 1.1) using depots for this. It's like an extended waiting area in the outskirts of the city, with the destination in the city itself, where there is only minimal space for waiting areas.
Your solution makes sense and seems like the best approach for the current schedules that require explicitly (and usually uniquely) named stations. But how do you extend this to the scenario described in the FFF post, where stations are not explicitly named, and trains are shared between many different resources? The problem then is knowing which depots are paired with which loading/unloading stations...

So let's take the example given in the FFF: your train picks up an unknown resource from a generic loading station, then an interrupt triggers to tell the train that it is in fact carrying iron ore and should thus head to an iron ore depot (before then proceeding to an iron smelting station). Path-finding can ensure that the train heads to the nearest available iron ore depot... but it can't know anything about the associated iron smelting station. So if you have two iron smelting stations (with one nearby depot for each) where one smelting station is ore-starved and another is backed up, some trains will end up going to the wrong depot and then making a long trek over to the ore-starved smelting station. Do you see a clean way around this?
The best method that immediately comes to mind is having enough supply trains to fill the depots, and using appropriate train limits on it. So even if all the trains go to the closer depot first, it'll then just be full and there's enough extra trains still incoming to overflow to the other one.

Which is another way of saying the answer is the same as it *always* is in Factorio: Overproduce! ;)

The trick to avoiding the trains having to reroute in the middle of the trip and backtracking a long way, is to set up the limits and conditions such that they're waiting at the supply stations until a spot opens up for them to go to. Then it should reserve the destination spot and you won't have scheduling conflicts that cause rerouting. Basically keep all the smelter depots full all the time. So again, massively overproduce.
Post Reply

Return to “News”