![Smile :)](./images/smilies/icon_e_smile.gif)
https://mods.factorio.com/mod/smart-waypoints
Moderator: ickputzdirwech
This has already been suggested many times, most recently in the following thread:
You run into problems there with stations that are unreachable. A double headed train can only turn around at a station. If mid travel it decides to skip the station and go somewhere else that requires the train to turn around then it is stuck.Tekky wrote: Thu Jan 10, 2019 1:05 pm I agree that train entry/skipping conditions would be an important feature.
However, OpenTTD style conditional jump orders may be better, since they allow you to jump to any order in the train's schedule, thereby allowing you to skip several orders at once, instead of only one order per entry/skip condition.
I agree that there certainly are situations for when the condition for entering a station should be determined by a train condition and not by a station condition. One such example would be a refueling station.Bugger wrote: Thu Jan 10, 2019 12:07 pm Next anticipation: "the decision should be made at the station and not in the train". I read this several times in the older threads and I think it just doesn't make sense. I can develop further on this in the next posts if someone asks, but I believe the argument is invalid.
From there it would be only one small step further to a fully programmable schedule. In the "Skip condition" the first entry could be the number of entries to skip showing for example for Iron Field 2: "+2: _Sink Iron Ore". And then allow multiple skip conditions. Maybe call it "conditional Destination".Rumsfield wrote: Wed Nov 13, 2019 4:19 am I started to build my first attempt at a rail cell based megabase, and I've come to the conclusion that adding this kind of skip condition per-station in the train schedule would make automating trains a whole lot easier.
The case I have is shown below, where I have a cell for dropping off iron ore (_Sink Iron Ore), a cell for stacking trains (_Stack3) and an external iron deposit for filling up on iron ore (Iron Field 2). I'd like for an arbitrary number of trains to be programmed with the same schedule, and wait in the stack (_Stack3) until any station named _Sink Iron Ore becomes enabled and available. Now, if multiple trains are waiting for an available _Sink Iron Ore, they will all depart the stack and race for the opening. When the station becomes occupied, and there are no other open _Sink Iron Ore stations, they will continue to the Iron Field 2 station to fill up on ore when the train is already full. I'd like for the train to know that it is already full, and have that as a condition to skip the Iron Field 2 station and return back to the stack instead to wait for the next available _Sink Iron Ore station.
Here is what the current train schedule looks like. And below that, I made a mock-up of what the skip conditions could look like, directly under the station name and slightly indented less.
In this mock-up, the train would check the skip condition before pathing to the Iron Field 2 station. If its cargo was already full, it would skip the station and try to find another _Sink Iron Ore, or just return to the stack and wait there.
This is a feature that I believe would not alter train mechanics if players chose not to use it, but would greatly improve the automate-ability of train schedules.
It's a GRAPHICAL user interface. So instead of printing "+2" for the goto it could draw an arrow. Just needs some fancy graph drawing stuff to make overlapping gotos look good. But the tech tree already has that, sort of. I'm not convinced labels would be good. Just adds more information in there to confuse the user. But either way, as long as the functionality is there I don't really care how it looks.ssilk wrote: Sat Nov 16, 2019 5:29 am I feel like I need to say something about this suggestion:
I think this is a good suggestion, and I would like to have it in the game, but I don’t think it will be implemented.(*)
And I think as developer I would try to implement it in a way that is free of literals. This means: “skip next 2 conditions”, the literal is 2. This is like “goto” in programming. Look Google what this means. Instead I would implement it independently from train stations, by adding something like a “Labels” and “conditions” to the train schedules.
Which means it would looke more like this:
Train station 1:
— leave condition
Condition:
— some condition that can include variables from the previous or the next station or conditions in the train.
— target label name if true ( or false)
Trains station 2:
— leave condition
Label:
— label name (autosuggested name by default)
Train station 3:
....
So the change to the current train scheduler is, that it cannot only add stations to the schedule, but also conditions and labels. And the conditions can refer to three entities: the train, the previous station and the next station. The conditions are then not different to those of the schedule (and, or). And they are executed directly before leaving a station (like in the OP).
(*) Reasons:
- there are already some mods that enable dynamic train schedules, and they are completely different to each other.
- I think it adds a lot complexity to the trains, that is not needed in most cases, especially for beginners
- Even if implemented there will be many, that would like to have more features. Or less (e.g. I want just a simple way to add a refuel station if needed).
Thank you for pointing to me that first topic. I did search it, but used another key words.ssilk wrote: Thu May 14, 2020 5:02 am I was near to merging this into
viewtopic.php?f=6&t=64362 Dynamic train schedule
But then I saw you made 2 suggestions. Cannnot discussed well, see viewtopic.php?f=6&t=3394
and
viewtopic.php?f=6&t=47316
I think you can merge those, because on the page 2, there is a suggestion about low fuel condition
+1 to that. I like that mockup a lot. And I believe adding skip condition would remove a lot of train limitationsRumsfield wrote: Wed Nov 13, 2019 4:19 am In this mock-up, the train would check the skip condition before pathing to the Iron Field 2 station. If its cargo was already full, it would skip the station and try to find another _Sink Iron Ore, or just return to the stack and wait there.
This is a feature that I believe would not alter train mechanics if players chose not to use it, but would greatly improve the automate-ability of train schedules.