Dynamic train schedule

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

adam_bise
Filter Inserter
Filter Inserter
Posts: 360
Joined: Fri Jun 08, 2018 10:42 pm
Contact:

Re: Dynamic train schedule

Post by adam_bise »

I like the idea of skip conditions. But would they be needed if all decisions could be made via circuits? This, instead of some by circuit and some by the trains schedule itself.

Schedule:

1) Station > Circuit <signal> Select station by ID perhaps?
Wait Condition > Circuit <signal> <operator> <signal>

Could there be a requirement to add a 2nd stop in the schedule here?

Imagine circuit controlled memory of train ID's and their lengths. All trains could have the above schedule.. Correct?

Still, not everyone wants a circuit controlled train. Skip conditions would simplify a lot of setups I think.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: WHEN / IF conditions on train schedule

Post by ptx0 »

Koub wrote:
Tue Dec 01, 2020 7:51 am
ptx0 wrote:
Mon Nov 30, 2020 5:20 pm
Proposal is to have a WHEN and IF condition option in the button alongside "OR" and "AND", these will be evaluated by the train BEFORE it decides to path.
This is pretty much OP's request, said in a more straightforward and concise way :
[...]
I fail to see in what they are different.
you just described how they're different, and then merged it into another thread where it won't get any attention. thanks Koub, you've nailed it.

Pat4yczek
Inserter
Inserter
Posts: 46
Joined: Thu Aug 03, 2017 1:40 pm
Contact:

Re: Dynamic train schedule

Post by Pat4yczek »

In 1.1 eperimantal you have limit of trains on station
there is option to control this by electric cirquit

Great stuff I could say

Now trains can use shedules withouth skipping station

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Dynamic train schedule

Post by ptx0 »

Pat4yczek wrote:
Thu Dec 03, 2020 4:50 pm
In 1.1 eperimantal you have limit of trains on station
there is option to control this by electric cirquit

Great stuff I could say

Now trains can use shedules withouth skipping station
not at all what's being discussed here!

Pat4yczek
Inserter
Inserter
Posts: 46
Joined: Thu Aug 03, 2017 1:40 pm
Contact:

Re: Dynamic train schedule

Post by Pat4yczek »

If u want make dynamic trains in vanilla is possible to have dedicatet shedules for each product

PRODUCT LOAD
FULL CARGO
PRODUCT UNLOAD
UNLOAD
EMPTY CARGO

this concept is for unloading stations with multi products
so PRODUCT UNLOAD with no conditions is only to tell train that need pass this with no stop
the only circuIt you need is to set train limit on PRODUCT LOAD,
train limit on PRODUCT UNLOAD, then send train count from then to UNLOAD to set train limit

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Dynamic train schedule

Post by ptx0 »

Pat4yczek wrote:
Thu Dec 03, 2020 5:18 pm
[...]
no, this doesn't help.

Stealthmate
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jul 05, 2021 4:14 am
Contact:

Re: Dynamic train schedule

Post by Stealthmate »

TL;DR No dynamic train schedule = only one efficient way to design train routes = no fun :(

I'm sorry for necroing this, but I've been lurking around for a few years now and this topic has always bothered me. I don't mean any offense, but considering that this looks like a pretty widely wanted feature, I'm slightly flustered as to why there hasn't been any real feedback on it. Anyway, I'd like to chime in with my own opinion of why this is in fact key and necessary functionality.

AFAIK the general "response" to someone asking for dynamic train schedules is "disable the station". I'm sorry, but this is like me asking "How to bake cookies?" and you telling me to bake cakes instead. The two approaches solve completely different problems and to be frank, getting an answer like that can be quite annoying.

First, about station-controlled schedules (the current system). In the most general case, this works if you have exactly 1 train, loading from supply stations that accept ONLY that train, servicing N demand stations, with the whole route covering exactly 1 item. Think 1 train (let's call it Loco X) loading from a station that supplies ONLY iron ONLY to Loco X, delivering ONLY iron, to stations that accept ONLY iron. If all of your routes are structured like this, disabling any single station does not impact other routes.

This works if you have exactly 1 train (or multiple trains that follow the exact same route). The moment you have different trains loading from the same supply station, delivering to different stations, we run into a problem - now we cannot disable the supply station, because one train may need to load, but another may not. For example, if you have Iron Mine 1 supplying Circuit Factory 1 and Weapon Factory 1 via different trains, you cannot disable Iron Mine 1, because the train going to Circuit Factory might be empty, while the one going to Weapon Factory 1 might be full. Now you say, "Why don't you use 1 train then?". That is indeed a solution, although I'm inclined to believe it might lead to fuel waste and/or latency. Except if you replace "Iron Mine 1" by "Refuel Station 1", the whole thing breaks down again, because you cannot disable the station for a single train and now you have to either
  1. Put a dedicated refuel station on each route (or randomly refuel your trains at stations that have nothing to do with fuel), which is ridiculously inefficient and overcomplicated or
  2. Make all trains wait a few seconds at Refuel Station 1, which is both inefficient and wasteful.
I'm sure a lot of people have banged their heads in the wall because of this, but the fun is yet to come. Now imagine you are NOT building a 1.21 jigascience per second factory with a gazillion stations and whatnot, but instead you're a casual relatively-new player that wants to just reach the end of the f*****g research tree. You planned a factory that will produce maybe 1-2 science per second, you calculated all the ratios and congratulations, you realize that you need to bus like 10+ different raw resources to create your science. So far so good. But you also notice that while you need 200+ iron/s, you only need around 40 coal/s and stone/s. So, the logical thing to do is to have a dedicated station for iron and merge the coal and stone into a single station to save space. Congratulations, now you've graduated from "I have no idea what I'm doing" to "I want to bake cookies!", except the game doesn't allow you to bake cookies and everyone tells you to bake cakes instead. Now, if you have exactly 1 train going Stone Mine - Coal Mine - Science Factory, you can afford to disable the Science Factory station when not needed. But that means your train will now loop between Stone Mine and Coal Mine, every so often throwing an InsufficientFuelException, while you're desperately trying to figure out how the hell you're gonna manage the Sulphur, Batteries and Lubricant station, which accepts 3 trains because you decided to produce each of those in a different factory so that you don't depend on a single source in case of shortage. The answer? It's impossible, since you cannot disable the supply stations (because they also supply the Circuit Factory and the Weapon Factory), you cannot disable the demand stations (because they accept input from other trains as well) which means you're basically stuck having to refuel your trains every 5 minutes, or implement one of the above "solutions" which requires you to distribute fuel across the whole map.

Again, if the said player were to redesign their whole base so that each item gets its dedicated station, with a dedicated train, they could in theory solve their problem as I outlined above. But the question is - why should they? Factorio is supposed to be a sandbox game, where you decide your own playstyle, yet at its current state the train system either forces you to use a certain pattern, or basically give up all hopes of efficiency.

As for a solution, I believe OP and other people have already proposed multiple times the simplest way - add a "skip-if" or "visit-if" condition to all trains, similar to the "depart-if" condition that already exists, except this one will get evaluated before departure. I've seen people talk about "newbie-friendliness", however I cannot imagine someone having no trouble with the "Leave station if conditions", yet suddenly having no idea what "Skip Station If" means. In fact, compared to understanding (or rather hoping to understand) how fluids work, trains are the easiest thing in the world to grasp. I'm sure there are details to be worked out around this, and I'm sure there will be edge cases that need to be considered - I'm a dev myself and can understand that. However, I think at the very least, this issue deserves a little bit more consideration and/or transparency.

Don't get me wrong, I have around 1000 hours on Factorio precisely because I think the devs had a marvelous idea executed in a very fun and clean fashion. But also because of that, I feel like this issue creates a limitation that, when realized, kills a lot of the fun in the game. From what I've researched, I couldn't find a mod that solves this - if there exists one, then please do let me know. Still, I think it's well-worth considering adding this kind of feature the base game. You can put the very basic implementation - simple and/or conditions - in the game and then let the modding community implement any advanced things.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Dynamic train schedule

Post by ssilk »

Huh, a lot of frustration here. :)

Well, I can’t resolve frustration with words, but at least I want to let you know, that frustration is a kind of stress and stress blocks those parts in your brain, that could help you to find a solution to your problem. Because what I can say is: there will be no soon solution and even if there is a Factorio II then nobody knows, if this issue will be addressed. 🤷‍♂️

What me helped was to see that all as part of the game - to work around those restrictions - and I recommend to see it similar, because anything else results in frustration like this. And it is much more satisfying than you might think to find a solution. Even if you currently exactly KNOW, there is no solution, I say: there is at least one to your current problem. Of course it would be cooler to have this feature, you would need not to think so much. 8-)

Problems in real live (engineering problems and other) are sometimes much more complex, than this one. So there is no need to cry. It’s much better to be happy, because you find an error in your planning and now you get extra hours for playing to solve this problem. :D

So in those situations, instead of playing I lean back and think about the problem by doing something completely different. Maybe one week or longer.

Hope this helps to get around the frustration. ;)

Maybe some tip: What I really think is blocking your sight is that each station should have one train. That’s not working very well. Much easier to say I have one or more trains for each item/resource. That’s from my experience generally working much simpler, for example because it doesn’t matter if you have items left when loading. There are then much more restrictions if you have stations, that can load different items. But if you just follow the idea of “I’ve an iron ore train and now I have some stations that have iron ore and some that need iron ore” you see immediately that this is a quite simpler task.

You asked for a Mod: Well, I’m not 100% sure if that is what you want or already have looked for, but the LTN mod is a perfect solution to handle stations with multiple items. But it is not easy to handle, it gets much more complex, before it gets simpler, but then it’s pure fun. https://mods.factorio.com/mod/LogisticTrainNetwork
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2541
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Dynamic train schedule

Post by FuryoftheStars »

Too bad they never implemented this in the base game. :(
Stealthmate wrote:
Mon Jul 05, 2021 5:23 am
From what I've researched, I couldn't find a mod that solves this - if there exists one, then please do let me know.
FWIW, being a few months later, back before I took a break from this game, there was a mod (that's still around) called Smarter Trains. It uses a GUI with scripting code to dynamically insert and remove train stops from the actual train's schedule, including a refueling stop. IMO, it was easier to understand and use than the LTN mod, but may not be as powerful as a result, either.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

Post Reply

Return to “Ideas and Suggestions”