Factorio

Factorio

View Stats:
Help with trains, please?
I'm attempting to make 'shopping trains' that respond to a signal and go to a pickup, then drop off, then return to depot await another signal. They'll still only pick up one type of item, but drop off at multiple locations. In short; I'm replacing the bus with trains.

This is all well and good, works for one factory 'module'. The moment I bring another module into the mix that requires the same stuff delivered to it, I enter a situation where I can't use the same train twice.

For example: Iron Train is now getting the signal for Station B, but will visit Station A regardless and eventually overfill it.

I'm aware I can shut down stations themselves, but I wanted to see if it was possible to do this with one station before I make a bunch of stations for everything requested and/or a huge depot
< >
Showing 1-15 of 18 comments
zayaid May 4, 2019 @ 4:52pm 
can you show us your set up?

also filler inserter might help you
Toastie Buns May 4, 2019 @ 4:59pm 
Shopping list:
https://i.imgur.com/tVyjZk3.jpg
Train orders
https://i.imgur.com/iVPB2NZ.jpg

Current logic is: If the storage chests are above a certain level, disable the station.
Edit: problem arises that a train bound for station B will stop at station A because it's on, even though it has not send a signal for a pickup itself.
The ingredients list is coded for each train, so green is Steel in this case
Last edited by Toastie Buns; May 4, 2019 @ 5:03pm
zayaid May 4, 2019 @ 5:13pm 
gonna admit this set up is beyond my feeble knowledge can solve :bbtcat:
Toastie Buns May 4, 2019 @ 5:21pm 
I'm tempted to pin that as the correct answer, because it's beyond my feeble knowledge too. Look on the bright side, at least you don't have to try and understand the solution if someone solves this mess D:
ShutEye_DK May 4, 2019 @ 5:41pm 
Have you learned the basics?
Sometimes one can get ahead of oneself by weiving other amazing designs.

I'm not saying you shouldn't aim high, just don't aim THAT high at first :)

And: Have fun while trying!
Last edited by ShutEye_DK; May 5, 2019 @ 2:16am
DCYW May 4, 2019 @ 5:57pm 
Is there any other trains using the same signal or same route, put them in your train orders?
Your trains looks still as an statue with not enough train orders.

Even though not so simple to solve, you will find ideas to solve your problems if you played OpenTTD.
Last edited by DCYW; May 4, 2019 @ 6:20pm
Toastie Buns May 4, 2019 @ 6:29pm 
Originally posted by DCYW:
Is there any other trains using the same signal or same route, put them in your train orders?
No, two stations are generating the same signal, thats the Supply trains 'Go' signal. Unfortunately, the Supply train will visit the station that didn't send the signal, because its in the orders and switched on.

There's multiple ways of fixing this. One is to have seperate stations for inputs and just disable them when they meet conditions. This is fine, but I'd have lots of input stations.

The other is to have many supply trains in a depot, so essentially I'd build a module, list the ingredients needed and source the same number of trains. This will result in lots of trains instead.

I'm just looking to see if I can merge this behaviour into one station and one train, so I could have (in theory) one iron train supplying all the stations requesting iron.
Originally posted by DCYW:
Even though not so simple to solve, you will find ideas to solve your problems if you played OpenTTD.
Trains were better in OpenTTD, you could operate them in a perpetual state of 'lost' if you so desired and you had far more signals to work with. Also, you didn't have times when you couldn't unload because the station was full!
Originally posted by ShutEye_DK:
Have you learned the basics?
Sometimes one can get ahead of oneself by veiwing other amazing designs.
I have a system that very rarely gets deadlocked and its caused by one single rail that can be removed, so I'd say I'm doing okay (at least for trains working, lol). I could also fix the problem easily, but I figured I'd see if there was something else I hadn't considered, or some combinator magic I could learn.
Last edited by Toastie Buns; May 4, 2019 @ 6:32pm
DCYW May 4, 2019 @ 6:37pm 
Originally posted by Toastie Buns:
Originally posted by DCYW:
Is there any other trains using the same signal or same route, put them in your train orders?
No, two stations are generating the same signal, thats the Supply trains 'Go' signal. Unfortunately, the Supply train will visit the station that didn't send the signal, because its in the orders and switched on.

There's multiple ways of fixing this. One is to have seperate stations for inputs and just disable them when they meet conditions. This is fine, but I'd have lots of input stations.

The other is to have many supply trains in a depot, so essentially I'd build a module, list the ingredients needed and source the same number of trains. This will result in lots of trains instead.

I'm just looking to see if I can merge this behaviour into one station and one train, so I could have (in theory) one iron train supplying all the stations requesting iron.
Originally posted by DCYW:
Even though not so simple to solve, you will find ideas to solve your problems if you played OpenTTD.
Trains were better in OpenTTD, you could operate them in a perpetual state of 'lost' if you so desired and you had far more signals to work with. Also, you didn't have times when you couldn't unload because the station was full!
Originally posted by ShutEye_DK:
Have you learned the basics?
Sometimes one can get ahead of oneself by veiwing other amazing designs.
I have a system that very rarely gets deadlocked and its caused by one single rail that can be removed, so I'd say I'm doing okay. I could also fix the problem easily, but I figured I'd see if there was something else I hadn't considered, or some combinator magic I could learn.
Fair enough.
zOldBulldog May 5, 2019 @ 2:13am 
For low volume requests like this I think the simpler solution is to close the receiving station and only enable it when ready to receive product. That way the train is always loaded and waiting to go out all the time, and takes off the moment a receiving station enables. This works regardless of whether the receiving station wants one or many possible items from one or many possible trains coming from multiple sources.

The other very good option is the LTN mod. With it trains are used for many purposes, wait empty at a depot (stacker with stops) and get sent to collect when needed.

I use one or the other depending on the need. Mostly LTN, but there are some cases when the vanilla "station disabled" approach is cleaner (for example, for one-time-use receiving stations used to deliver construction materials after placing a blueprint).

Last edited by zOldBulldog; May 5, 2019 @ 2:14am
Toastie Buns May 5, 2019 @ 8:24am 
Originally posted by zOldBulldog:
The other very good option is the LTN mod. With it trains are used for many purposes, wait empty at a depot (stacker with stops) and get sent to collect when needed.
I hear a lot about the LTN mod, gonna have to check it out after this world is finished with (vanilla playthrough with friends, so no mods atm)
Originally posted by zOldBulldog:
This works regardless of whether the receiving station wants one or many possible items from one or many possible trains coming from multiple sources.
Isn't that what I'm doing already? The problem I'm running into is that when I have two stations with the same logic, trains overwhelm the first station getting to the second and I can't turn the first off because it uses some products quicker than others and thus turns itself back on D:

I did see a solution that involved setting filter inserter requests, that seems like it might work since the train would arrive at the station, but no filters would take the stuff, leading to 5 seconds of inactivity and said train will go to the right station this time. Still messier than I'd like though.
AlexMBrennan May 5, 2019 @ 8:35am 
I can't turn the first off because it uses some products quicker than others and thus turns itself back on D:
In that case the obvious answer would be to make sure that the train's cargo matches the required materials (e.g. if you are smelting iron then it would be silly to load trains with 1000 coal and 1000 iron ore so maybe change that to 1850 iron ore and 150 coal instead)
Toastie Buns May 5, 2019 @ 8:42am 
Originally posted by AlexMBrennan:
In that case the obvious answer would be to make sure that the train's cargo matches the required materials
Yeah, which will end up with a depot full of trains, essentially tailoring trains to the modules they serve. I'm aware I can do that, but I'd like the Iron Plate train to visit practically every module I make, so the 'required materials' float wouldn't be the same, if that makes sense.

I do get what you mean, filter the wagon itself and send one train on a shopping adventure. This was also something I wanted to avoid, but I can't remember why so lets give it a try :D: Might have just been as simple as "It won't be fast enough" but whatever. Tis better than multiple signals triggering one another.

Edit: Oh yeah, I wanted the trains to be quick to destination to avoid my friends demanding I go back to a bus because it's 'more efficient' and 'doesn't have these problems' lol. I don't care, who's ever enjoyed being on a bus? Nobody. S'why trains exist.
Last edited by Toastie Buns; May 5, 2019 @ 8:45am
brian_va May 5, 2019 @ 8:47am 
Originally posted by Toastie Buns:
I did see a solution that involved setting filter inserter requests, that seems like it might work since the train would arrive at the station, but no filters would take the stuff, leading to 5 seconds of inactivity and said train will go to the right station this time. Still messier than I'd like though.
this is probably going to be your solution, and would be fairly simple to setup and somewhat bulletproof as long as supply can keep up with demand.

https://www.reddit.com/r/factorio/comments/7vl8n3/question_how_do_you_dispatchrequest_a_single/
that might shed to insight to your situation, i dont believe train logic has been changed since that post, so the stated problem of potentially multiple trains getting sent to a station would still be an issue.
Toastie Buns May 5, 2019 @ 9:54am 
Oooh, that was a nice link. I never thought of wiring the provider and requester stations on separate wires and then using the AND condition to force trains to need two conditions. Very nice. Even if that doesn't solve the problem, it's a nice thing to know.

Still looks like the same problem of multiple trains, as you said, but the situation is looking more hopeful now.
Elenda86 May 7, 2019 @ 1:50am 
you could try using Train Supply Manager (TSM) Mod

https://mods.factorio.com/mod/train-pubsub

its easier and more light weight then LTN.trains get filled, then parked in a depot, when stations request stuff, you can specify how many trains get send
< >
Showing 1-15 of 18 comments
Per page: 1530 50

Date Posted: May 4, 2019 @ 4:47pm
Posts: 18