Train Entry-Condition

Post your ideas and suggestions how to improve the game.
Post Reply
Advert
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Feb 27, 2015 4:01 pm
Contact:

Train Entry-Condition

Post by Advert » Sat Jun 03, 2017 7:20 pm

Just like Exit-conditions that are in the game, Pre-conditions would be nice, too.

They'd work just like exit ones, except the train checks them before it makes a route to the next station.

This could be something like:

Fuel < 100
- The train won't stop at this station unless it's fuel is below 100.
Iron > 1000
- The train will only stop at this station if it has more than 1000 iron.

Thank you!

Advert

Tym
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Fri Feb 10, 2017 4:55 pm
Contact:

Re: Train Entry-Condition

Post by Tym » Sun Jun 04, 2017 3:51 pm

please allow me to ride along on your suggestion, and possibly extend it.

In the fuel tab of the train properties, enable a conditional for "seek fuel", maybe settable as to percentage remaining.

in train stops, enable a condition for "I am a fuel stop". This condition could be modify-able by circuit condition if the train stop's fuel source becomes depleted.

JohnyDL
Filter Inserter
Filter Inserter
Posts: 512
Joined: Fri May 16, 2014 3:44 pm
Contact:

Re: Train Entry-Condition

Post by JohnyDL » Sun Jun 04, 2017 6:27 pm

for the whole train getting fuel thing you might want to try the logistics train mod, there's a depot station in there and a train returns there to refuel after each run the same way a bot returns to a roboport.

The train entry conditions for certain things like cargo full it should do the test for leaving before it heads there, if it satisfies a leaving condition it could skip that station.

Tekky
Filter Inserter
Filter Inserter
Posts: 938
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Train Entry-Condition

Post by Tekky » Sun Jun 04, 2017 10:53 pm

Advert wrote:Just like Exit-conditions that are in the game, Pre-conditions would be nice, too.

They'd work just like exit ones, except the train checks them before it makes a route to the next station.
And what will it do when the entry-condition is false? Will it skip that station and jump to the next station in the train's orders? If yes, then I would be very much in favor of your suggestion.

I don't like being only able to deactivate a station for all trains, instead of only certain trains. Therefore, I like your suggestion.

User avatar
Lav
Filter Inserter
Filter Inserter
Posts: 384
Joined: Mon Mar 27, 2017 10:12 am
Contact:

Re: Train Entry-Condition

Post by Lav » Mon Jun 05, 2017 4:48 am

I would much rather see trains becoming more smart and being able to decide where to go next. That would solve the same problem, but would open many more interesting possibilities.

Tekky
Filter Inserter
Filter Inserter
Posts: 938
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Train Entry-Condition

Post by Tekky » Mon Jun 05, 2017 8:48 am

Lav wrote:I would much rather see trains becoming more smart and being able to decide where to go next. That would solve the same problem, but would open many more interesting possibilities.
Yes, I agree with that. OpenTTD (Transport Tycoon Deluxe) has conditional order jumping. I would love to see something like that in Factorio.
Last edited by Tekky on Mon Jan 29, 2018 1:08 am, edited 1 time in total.

Advert
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Feb 27, 2015 4:01 pm
Contact:

Re: Train Entry-Condition

Post by Advert » Mon Jun 05, 2017 11:37 am

Tym wrote:please allow me to ride along on your suggestion, and possibly extend it.

In the fuel tab of the train properties, enable a conditional for "seek fuel", maybe settable as to percentage remaining.

in train stops, enable a condition for "I am a fuel stop". This condition could be modify-able by circuit condition if the train stop's fuel source becomes depleted.
Thanks for the feedback -- I would like to avoid adding special cases, though.

You could achieve this as described above, checking if fuel is low before deciding to go to that station.

An interesting note, you said percentage remaining -- how about checking for travel time remaining? Could also display estimated travel time to the various stations, along with a historical graph of how long trains take to get from A-B. Maybe a bit much for now, but it'd be cool. Graphtorio :)
Tekky wrote:
Advert wrote:Just like Exit-conditions that are in the game, Pre-conditions would be nice, too.

They'd work just like exit ones, except the train checks them before it makes a route to the next station.
And what will it do when the entry-condition is false? Will it skip that station and jump to the next station in the train's orders? If yes, then I would be very much in favor of your suggestion.

I don't like being only able to deactivate a station for all trains, instead of only certain trains. Therefore, I like your suggestion.
I'd assume the same as the current system works: When a station is not found (i.e, disabled from circuit -- I do this to stations frequently: Train stop [Detect Train -> T, Enable/Disable: T = 0] -> Pole), it skips it and goes to the next one. It would be nice to have some additional things going here, but I don't want to write a 10 page design document for free :)
Lav wrote:I would much rather see trains becoming more smart and being able to decide where to go next. That would solve the same problem, but would open many more interesting possibilities.
Tekky wrote:Yes, I agree with that. OpenTTD (Transport Tycoon Deluxe) has conditional order jumping. I would love to see something like that in Factorio.
Me too, this is just getting the discussion started. A lot of convenience could be added as well, for example train series (all trains of the same series would share configuration), lines (A list for trains to follow, you could update this by placing a station and setting it up to a line, instead of placing a station, then finding the trains and changing their configuration).


Thanks for getting the discussion going, I'm very interested to see where this leads us!

Advert

mp0011
Fast Inserter
Fast Inserter
Posts: 216
Joined: Mon Mar 20, 2017 1:17 am
Contact:

Re: Train Entry-Condition

Post by mp0011 » Mon Jun 05, 2017 12:20 pm

Maybe something like this:

Train station lists (schedule) works like a playlist.
Replace Manual/Automatic slider with play/pause = automatic/manual;
Add next/prev buttons = go to next/previous station on the list (in manual mode, or manually skip station in automatic)

Each station can send "departure" signal with value.
departure = 0 => no signal, just wait for signal.
departure = 1 => go to next station (current+1) on the list.
departure = 2 => skip next and go directly to the current+2 on the list.
departure = -1 => back to previous station (current-1).

Then, in this example scenario, current station can detect coal with "read train fuel", and based on this, send train to coal station with "departure=1", or directly to the OreStation, with "departure=2" signal. All You need, is to add "coal station" entry between stations in the schedule.

You may also make "decider station", which can detect trains cargo, and decide whether send it to "current+2" dropIron station, or "current+1" dropCopper station, or "current+3" - sorting station...

leoch
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri Dec 16, 2016 9:37 pm
Contact:

Re: Train Entry-Condition

Post by leoch » Mon Jun 05, 2017 2:18 pm

If schedules have a "jump"/"goto" condition, better to use absolute numbers (like code lines) than relative numbers (like suggested above). But just skipping a line is probably enough.

I like the idea. It would make refuelling-on-demand easy, and maybe a few other things, but isn't super important (like trains going backwards).

mp0011
Fast Inserter
Fast Inserter
Posts: 216
Joined: Mon Mar 20, 2017 1:17 am
Contact:

Re: Train Entry-Condition

Post by mp0011 » Mon Jun 05, 2017 2:47 pm

Yes, if programs are train-based, it should be absolute.
In station-based, relative are better and simpler.

Relative jumps does not need to carry about all previous stations count.
If It is absolute, station need to know own position in the "program", or all programs must be the same.

In relative approach, all schedule may be as now, each train may have own, different with variable length.
Just few entries around programmed station needs to be in strict order. ALso, same routine may be used few times in one schedule.

Example:
1) getOre station
2) checkFuel station => logic here, sends departure=1 or 2, directing train to getFuel station, or directly to ore melting station.
3) GetFuel station => optional, conditional stop
4) Drop Ore station
5) checkFuel station => the same station as above, same logic as above, train goes to get more fuel, or to load ore (playlists loops if ends).
3) GetFuel station => optional, conditional stop

There, only positions 2/3 and 5/6 are "within program", rest is just regular schedule, any length.

Atlas
Inserter
Inserter
Posts: 43
Joined: Sun Jan 28, 2018 8:09 pm
Contact:

Additional condition slot for trains

Post by Atlas » Sun Jan 28, 2018 9:18 pm

Abstract:
Another condition for trains, based on which the train decides whether it goes to the next station or skips it.

I'll start with an example. I have a train that supplies three factories with iron. It may happen, that the train unloads everything in the first factory and will then travel to the other two unnecessarily. With another condition slot it could be able skip the two stations and return to refill itself with iron immediately. The train would be only able to read it's own contents and not the circuit network. The train should also read cargo and fuel slots independently.
This could save a lot of time and ease congestion on railroads by avoiding unnecessary travels. It would also be useful for making of refueling stations.
Here's an example of such schedule: Station Name (go to condition) - wait (waiting condition)
Ironworks () - wait (full)
Factory A (Cargo: *>0) - wait (60 seconds)
Factory B (Cargo: *>0) - wait (60 seconds)
Factory C (Cargo: *>0) - wait (60 seconds)
Refuel (Fuel: Coal<50 AND SolidFuel<25 AND NukaFuel<1) - wait (10 seconds)
Explanation: There's no condition for Ironworks, so the train will always go there. Then the train checks it's contents and if it's not empty will go to Factory A, where it will wait for 60 seconds. Same goes for Factory B and C. If it IS empty, it will skip these stations. Then it checks it's fuel slots and if the conditions are true, it will go to refuel station. If not, it will continue directly back to Ironworks.

Tekky
Filter Inserter
Filter Inserter
Posts: 938
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Additional condition slot for trains

Post by Tekky » Mon Jan 29, 2018 1:00 am

I like the idea.

However, it has already been suggested half a year ago in the following thread:

viewtopic.php?f=6&t=49214 Train Entry-Condition

EDIT: The above link now points to the current thread, because the threads have now been merged.
Last edited by Tekky on Mon Jan 29, 2018 7:18 pm, edited 1 time in total.

Koub
Global Moderator
Global Moderator
Posts: 4298
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Train Entry-Condition

Post by Koub » Mon Jan 29, 2018 5:29 am

[Koub] Merged into older topic with same suggestion.
Koub - Please consider English is not my native language.

cybernoise
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Dec 20, 2017 3:21 am
Contact:

Re: Train Entry-Condition

Post by cybernoise » Mon Jan 29, 2018 1:36 pm

Advert wrote:Just like Exit-conditions that are in the game, Pre-conditions would be nice, too.

They'd work just like exit ones, except the train checks them before it makes a route to the next station.
yes absolutely want this. the only way to do this right now is to lay down a red/green cable network thru your whole play (which i kinda like but its a lot to do)
and use combinators to check conditions on others stations , if fullfilled you could send them... depends on what u need and its very limited option.
The function, for trains, is missing which enables the possibility to precheck a condition and if false, skip to the next station in the order.

esp for supply trains it would be so awesome, i like having my base and subbases fully automated with bots and trains. Like solar farm supply trains.
So instead of wasting time, railspace and materials, the train would check if the stations needs resupply, if not then relax in the main base.

Sworn
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Apr 03, 2016 8:10 pm
Contact:

Re: Train Entry-Condition

Post by Sworn » Thu Feb 22, 2018 1:58 pm

I was going to make a suggestion about that, and found this topic.
Flexible train schedule
Flexible train schedule or an options for a train to skip stations. Similar for the Wait condition but for entry the station stead of leaving.
What ?
The "Entry" station condition would be very very very very..... helpful, you see mods that do "smart trains" like Logistic Train Network, The Fat Controller, fuel station and others what is the main reason for those mods?
Flexible trains schedule
  • Go to Station A
    Go to Station B
    Go to Station C
Today you only have this fixed cycle, to avoid one train to go to station C for example you could close the station.
Today, if you do that, you will see that trains that are moving from B to C will go straight to A.
That is exactly what could be done. But instead of only a global "close station" you have the train evaluating if it should go to station.

Usually you see something like that to try get over it
  • Go to Station A
    Go to Station B
    Go to Station A
    Go to Station B
    Go to Station A
    Go to Station B
    Go to Station C <-- trying to pass here less times
If the train could check by itself if it should or shouldn't go to the station, we cold avoid that (A, B, A, B, A, B, A, B .... , z)
And if a new signal was implemented to read the train fuel value, a fuel station would became straight forward.

I would imagine something like that:
  • 1. The same interface that we have now, with one more "division" for the entry condition
    2. The entry conditions will have less conditions available as the exit condition, like "Inactivity" and "wait X" don't make to much sense for going in.
entry condition.png
Entry condition
entry condition.png (206.32 KiB) Viewed 1361 times
So lets imagine this situation.
  • Station 1 > Iron ore Loader A
    Station 2 > Iron ore Loader B
    Station 3 > Iron smelter X
    Station 4 > central trains stop (fuel and maintenance)
The idea is to make the station 1 a priority, than only go to the second station if the first one wasn't full.
The basic flow would be:
  • 1. Go to Loader A
    2. Go to Smelter X
Than with entry conditions we could do
  • SETP. Target Station (Entry condition) (Leave condition)
  • 1. Go to Loader A ( ) (Leave if inactive for 5sec)
    2. Go to Loader B (If cargo < 5000) (Leave if inactive for 5sec OR cargo full)
    3. Go to Smelter X ( ) (leave cargo empty)
    4. Go to central (if fuel < 100) (wait 10sec)
The logic would be something like
  • 1. The train finish his task at Station A (complete the Wait condition)
    2. Before he jump to the next station, he check the entry condition for the next station. The train still in station A so it could read circuit network if needed.
    2.1 If there is no condition, the train will go to the station
    2.2 If there is a condition and the condition is TRUE, the train will go to the station
    2.3 if there is a condition but the condition is FALSE, the train will get the Next station and start the step "2" again. (check the entry condition) (the train still in the Station A)
If there is just 2 stations in the schedule and the entry for one of them is FALSE, the train will just hang in the previous station until the entry become TRUE
Why ?
That would make the game much more dynamic and fun, as well accomplish what some mods like "Logistic Trains Network", "The Fat Controller", "Fuel Station" try to do.

User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1493
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Train Entry-Condition

Post by Deadly-Bagel » Thu Feb 22, 2018 4:23 pm

We recently got the ability to disable stations but this is only a half-solution. It can't be selective of which trains can stop there and which can't, it's all or nothing, so it's useless for a fuel depot and many other use-cases.

Giving trains the ability to a) set conditions based on fuel, and b) skip a stop based on a condition would pretty much cover all vanilla requirements. Sure, a few will want to get into proper train programming and the like but that's what mods are for.

Once I would have said the current system is enough, however with the complexity of Nuclear Power it can be a bit awkward to ship around the Sulphuric Acid, especially if your reactors are off-site.
Money might be the root of all evil, but ignorance is the heart.

Sworn
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Apr 03, 2016 8:10 pm
Contact:

Re: Train Entry-Condition

Post by Sworn » Thu Feb 22, 2018 7:04 pm

Yeh.

While the devs don't consider that feature over others, we'll need to be happy with mods :?

boran_blok
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Mar 01, 2019 7:56 am
Contact:

Re: Train Entry-Condition

Post by boran_blok » Fri Mar 08, 2019 12:59 pm

Sorry to ressurect an old sugestion topic, but I'd rather do this than make a new one with the same suggestion.

Adding a condition on a target station would be a very good addition to the game in my opinion.
It would also fit the logic of the game as well, the train is at a stop and checks if it fullfulls the next stop conditions, if not it skips that stop and checks the conditions of the stop after that, etc. If no stops satisfy the conditons the train remains in the current station.

Coupling this with the circuit network would make scenarions like "go to the unload station with the least amount of iron in storage" possible.

bert862
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Mar 04, 2015 12:17 pm
Contact:

Re: Train Entry-Condition

Post by bert862 » Thu Mar 14, 2019 8:50 am

As a long-time train optimiser, I would *love* to see conditional station orders in the game. It would solve many issues I have with trains / fueling them in a smarter way.

Currently there is no easy way to fuel your trains aside from sending them to a station to refuel (potentially leading to either many different refuel stations / names or much traffic at one station that doesn't actually do very much) or to bring fuel to all your stations, both of which are really inefficient.

There are also many other ways in which conditional orders can smartly be used, i.e. skipping a delivery if your cargo is already empty or continue delivering if you still have some left over.

Post Reply

Return to “Ideas and Suggestions”

Who is online

Users browsing this forum: No registered users and 8 guests