Train station skipping conditions

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
<NO_NAME>
Filter Inserter
Filter Inserter
Posts: 291
Joined: Tue Aug 02, 2016 9:52 am
Contact:

Re: Train station skipping conditions

Post by <NO_NAME> »

sparr wrote:Bumping this thread. I'm not a fan of a lot of the additional ideas put forward in the middle of the thread, but I would still very much like to see my original idea implemented. I am going to try to implement it as a mod, if I can figure out all the UI stuff.
I'm looking forward to it.

If you succeed, please add condition 'Skip if any other station is not skipped'. It would allow trains to go to a depot when they have nothing to do.
I am a translator. And what did you do for Factorio?
Check out my mod "Realistic Ores" and my other mods!

kamiza
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Dec 31, 2014 10:04 pm
Contact:

Re: Train station skipping conditions

Post by kamiza »

sparr wrote:
leoch wrote:You can do this in 0.15 by using the circuit network to disable stations. Mind, it doesn't work well with multiple trains and might require you building long-distance circuit networks.
I don't want every train to skip the iron loading station, I only want trains already full of iron to skip it. I don't want every train to skip the third iron dropoff station, I only want empty trains to skip it.
Agree.

It would be nice if the train would at least know the -kind- of stop it was going to next
A: unloading - if (own cargo) empty, skip
B: loading - if (own cargo) full, skip
At the very least, that should just be a simple checkbox / toggle between [L] and when adding a station
Maybe even choose item type to check for too (in-case carrying multiple types)

Then maybe something that can check for fuel? Or add [F]uel type.

Granted...I guess I have done situations where I have done both in 1 stop, that I loaded to 1 cargo and unloaded from another. Could then add additional toggles oth and/or [N]one so would skip that logic
But really...I'm sure you can find an example for any case to counter everything, but then we wouldn't get features implemented.

Engimage
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Train station skipping conditions

Post by Engimage »

I came up with the same idea here.

There could be a second set of rules for skipping station in addition to leave condition.
The decision about skipping station should be done when train picks its next station (and not on the move).

You can add following types of skipping conditions:
  • Cargo full
  • Cargo empty
  • Cargo contains certain item/amount
  • Fuel below/above certain value
  • Circuit network condition
By default skipping condition list is empty which defaults to current train behaviour.

This can ultimately extend train possibilities to make game even more awesome.
Examples follow:
  • Creating dedicated refueling stations
  • Creating on-demand logistics
  • Optimizing trains to serve multiple outposts
There are LOTS of possibilities. And the implementation is really simple!

TheUnknown007
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun May 03, 2015 9:17 pm
Contact:

Re: Train station skipping conditions

Post by TheUnknown007 »

I think this already was in this thread (great minds think alike)
PacifyerGrey wrote:And the implementation is really simple!
You are not a programmer, are you?

Engimage
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Train station skipping conditions

Post by Engimage »

TheUnknown007 wrote: You are not a programmer, are you?
I am IT Manager, a mix of a sysadmin and project manager. I know programming.
And here I can freely judge. I know capabilities of Factorio devs. And I do understand this suggestion brings nothing new or complex to them as most of related stuff is already in the game.

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Train station skipping conditions

Post by sparr »

TheUnknown007 wrote:
PacifyerGrey wrote:And the implementation is really simple!
You are not a programmer, are you?
I'm a programmer. I write Factorio mods. The only thing stopping me from writing this as a mod is the UI portion of the problem. The actual train logic code IS simple.

Selvek
Fast Inserter
Fast Inserter
Posts: 238
Joined: Fri May 06, 2016 4:04 am
Contact:

Re: Train station skipping conditions

Post by Selvek »

PacifyerGrey wrote: There could be a second set of rules for skipping station in addition to leave condition.
Disclaimer - I haven't read the entire last year of this thread.

Would it be sufficient to have a check box saying "if wait condition is already met, skip station"? IE if your wait condition is "wait until cargo empty" and the cargo is already empty, the station is skipped. I imagine this would simplify the implementation since you don't need a whole separate section for defining skip conditions.

Or, are there behaviors people need where the skip and wait conditions would need to be separate? E.G. if your wait condition is "wait 30 seconds" there would be no way to skip the station (without adding an OR to the wait condition). But I feel like personally I could do everything required without separating the conditions.

----

Wait a second... hold on... I imagine a grid inside engines which you can place combinators in, with input ports from the fuel and cargo inventories as well as external circuit connections through the current train stop, and an output that can be used to set the train's destination...

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Train station skipping conditions

Post by sparr »

Selvek wrote:
PacifyerGrey wrote: There could be a second set of rules for skipping station in addition to leave condition.
Disclaimer - I haven't read the entire last year of this thread.

Would it be sufficient to have a check box saying "if wait condition is already met, skip station"? IE if your wait condition is "wait until cargo empty" and the cargo is already empty, the station is skipped. I imagine this would simplify the implementation since you don't need a whole separate section for defining skip conditions.
The fifth post in this thread is a gui mockup of exactly that.

Selvek
Fast Inserter
Fast Inserter
Posts: 238
Joined: Fri May 06, 2016 4:04 am
Contact:

Re: Train station skipping conditions

Post by Selvek »

sparr wrote:
Selvek wrote:
PacifyerGrey wrote: There could be a second set of rules for skipping station in addition to leave condition.
Disclaimer - I haven't read the entire last year of this thread.

Would it be sufficient to have a check box saying "if wait condition is already met, skip station"? IE if your wait condition is "wait until cargo empty" and the cargo is already empty, the station is skipped. I imagine this would simplify the implementation since you don't need a whole separate section for defining skip conditions.
The fifth post in this thread is a gui mockup of exactly that.
Good thing I added the disclaimer then ;)

Tinyboss
Fast Inserter
Fast Inserter
Posts: 205
Joined: Sun Nov 16, 2014 12:11 pm
Contact:

Re: Train station skipping conditions

Post by Tinyboss »

Selvek wrote:
PacifyerGrey wrote: There could be a second set of rules for skipping station in addition to leave condition.
Disclaimer - I haven't read the entire last year of this thread.

Would it be sufficient to have a check box saying "if wait condition is already met, skip station"? IE if your wait condition is "wait until cargo empty" and the cargo is already empty, the station is skipped. I imagine this would simplify the implementation since you don't need a whole separate section for defining skip conditions.
I can't think of a situation where this wouldn't be sufficient. Granted, I've only been thinking a minute or so, but at least all the scenarios I've already run into where I want to skip stations would be solved by this. And if we just made that the default train behavior, it wouldn't require any UI change at all!
sparr wrote:
TheUnknown007 wrote:
PacifyerGrey wrote:And the implementation is really simple!
You are not a programmer, are you?
I'm a programmer. I write Factorio mods. The only thing stopping me from writing this as a mod is the UI portion of the problem. The actual train logic code IS simple.
I've only written one (simple) mod, and it didn't touch trains, so I don't know...is this change something a mod could accomplish?

User avatar
Lubricus
Filter Inserter
Filter Inserter
Posts: 294
Joined: Sun Jun 04, 2017 12:13 pm
Contact:

Re: Train station skipping conditions

Post by Lubricus »

PacifyerGrey wrote:I came up with the same idea here.

There could be a second set of rules for skipping station in addition to leave condition.
.....

This can ultimately extend train possibilities to make game even more awesome.
Examples follow:
  • Creating dedicated refueling stations
  • Creating on-demand logistics
  • Optimizing trains to serve multiple outposts
There are LOTS of possibilities. And the implementation is really simple!
[*]Creating on-demand logistics - Is already possible. Turn on the station that has the demand, turn it of when the demand is fulfilled. Wire the train-station to the buffer-chests
[*]Optimizing trains to serve multiple outposts - Name the outposts the same and turn them on when they have enough stuff.
[*]Creating dedicated refueling stations - No idea how to do it with the current system, would be fun to be able to.

Engimage
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Train station skipping conditions

Post by Engimage »

Lubricus wrote: [*]Creating on-demand logistics - Is already possible. Turn on the station that has the demand, turn it of when the demand is fulfilled. Wire the train-station to the buffer-chests
[*]Optimizing trains to serve multiple outposts - Name the outposts the same and turn them on when they have enough stuff.
[*]Creating dedicated refueling stations - No idea how to do it with the current system, would be fun to be able to.
Problems with current system of turning stations on/off:
  • Turning station off while train is in transit requires train to loop somewhere which is not good for many layouts like dual head design - or the train will just stuck and lock the system down.
  • Using same name for multiple outposts results in unbalanced outpost resource drain. Not a major issue but still...
Also by creating on-demand logistics I meant that you gain the ability to control delivery point of a train using circuit network and it does not require turning off any stations and catching loaded trains in transit offguard as a result. This can lead to multiple cool solutions that currently people can't even come up with.

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Train station skipping conditions

Post by mrvn »

Tinyboss wrote:
Selvek wrote:
PacifyerGrey wrote: There could be a second set of rules for skipping station in addition to leave condition.
Disclaimer - I haven't read the entire last year of this thread.

Would it be sufficient to have a check box saying "if wait condition is already met, skip station"? IE if your wait condition is "wait until cargo empty" and the cargo is already empty, the station is skipped. I imagine this would simplify the implementation since you don't need a whole separate section for defining skip conditions.
I can't think of a situation where this wouldn't be sufficient. Granted, I've only been thinking a minute or so, but at least all the scenarios I've already run into where I want to skip stations would be solved by this. And if we just made that the default train behavior, it wouldn't require any UI change at all!
Making it the default would be bad. I had setups where trains stop at all stations until they get "Circuit condition G=1". Same condition on every stop. So the train would skip all future stops.

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

Re: Train station skipping conditions

Post by mp0011 »

viewtopic.php?f=6&t=49214&p=286148#p286097

There is my suggestion about skipping stations - last station You leave should decide about this, using Logic Circuit.

TheUnknown007
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun May 03, 2015 9:17 pm
Contact:

Re: Train station skipping conditions

Post by TheUnknown007 »

mp0011 wrote:viewtopic.php?f=6&t=49214&p=286148#p286097

There is my suggestion about skipping stations - last station You leave should decide about this, using Logic Circuit.
Yes, we had come to the same conclusion

Daz3
Burner Inserter
Burner Inserter
Posts: 13
Joined: Fri Jun 09, 2017 11:37 am
Contact:

Re: Train station skipping conditions

Post by Daz3 »

I'm not a programer so not sure if this could be worked but...

If each station is connected to it's buffer chests then it could put out to the rail-network (as opposed to the circuit or logistic nets) the condition of it's supplies. (Have coal or need coal for example.)

A train with that stop next in it's list would check on the 'rail-net' the condition of the station and decide to attend it or not:

Station A; wants coal. (Power plant)

Station B; has coal. (Coal mine)

Train C is empty; it's next stop is A, then B. As it has no coal it skips A and goes to B.

Train D has a full load of iron. It's next stop is B (Just for the example.) Then A. As it is loaded it skips B. As it's loaded with Iron it skips A, and keeps doing so until it finds a station that wants iron. Or get's stuck in a loop not knowing what to do but that kind of learning is part of the fun! (Program your trains better!)

Just my thoughts on the matter; sort of a hybrid theory, I guess...

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Train station skipping conditions

Post by sparr »

Lubricus wrote:[*]Creating on-demand logistics - Is already possible. Turn on the station that has the demand, turn it of when the demand is fulfilled. Wire the train-station to the buffer-chests
You've only solved half the problem. How do I stop a full train from visiting a station with supply?

Engimage
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Train station skipping conditions

Post by Engimage »

This will not allow creating a train logistic network but it would allow for much more creative solutions coming close to it.
If you want a train logistic network there is a mod for that.

TheVeteraNoob
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Wed Jul 20, 2016 2:20 pm
Contact:

Re: Train station skipping conditions

Post by TheVeteraNoob »

Where are the devs in all this. This topic is far too old and lacking entirely in purple chat.

guy smiley
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 21, 2017 7:40 am
Contact:

Re: Train station skipping conditions

Post by guy smiley »

It's probably worth noting here, that the train system already does calculation on which station to visit next, at the time it is about to leave the station it's currently at. It's just that, at the moment, the only criteria it checks for is whether a station has the name it's looking for (any number between 0 and all stations currently existing COULD have this), and which of those matches it can get to quickest. Simple algorythm, sure, but one that definitely already exists. Basically all that's being proposed here is including the ability for the player to add their own custom conditions to this already existing process, using a slightly modified but basically already existing UI and code base. Really not sure if there's some major problem with this on the dev's side, but can't imagine how there would be.

Also, conditions that check the trains own fuel state would be nice too.

Post Reply

Return to “Ideas and Suggestions”