Skip Navigation
Factorio @lemmy.ml Tangerine @lemmy.ml

Tips for a simple vanilla train system?

After making my starter base, I was working on a train system using train limits, circuits, and bidirectional 3-8-3 trains. I realized the scale was too large for me, and I wanted something smaller and simpler. I had also messed up the fueling system, and wanted to redesign it.

I nuked the old system (literally and figuratively), and I want to switch to unidirectional 1-4 trains, but still using train limits and circuits to calculate the limits. I also want a single fueling (maybe adding multiple as the factory grows) station that is visited by all trains.

Any suggestions for planning or designing something like this? The only mega base I have ever made was a spaghetti mess and I'm trying to be a bit more organized in the creation of this one (the initial goal is 2.7k spm)

2
2 comments
  • This is the simplest I'd do:

    • Have a dedicated refueling line. This one is a bit special and probably with a 1-1 train it'll be enough. This line should go from "fuel pickup -> fuel drop off". Maybe, down the line, more than one refueling train will be needed. Your fuel drop off should refuel this line first. This way, as you progress you just need to change what's in "fuel pickup" and all your trains will (eventually) use your new fuel.

    • Have a* refueling area where all your trains are refueled. Think of having 5-10 (as many as you need) stations in parallel, all canned exactly the same (i.e "Refuel") *These stations might become a traffic bottleneck so you might want to have a few returning areas scattered around. For automatic schedule you can use a few seconds of inactivity as a condition.

    • Have a parking area. Think of 10 stations all named exactly the same (i.e. "Parking"). These might also become a traffic bottleneck so you might want to have a few of these areas scattered around. Use no condition in the schedule, so trains won't stop unless they have nowhere to go. It's important to consider these areas, as you don't want a train which can't pickup anything blocking a refueling station.

    • Name every pickup station type exactly the same (i.e. 1-4 Iron Ore Pickup) Use amount of material in the station as a condition to set train limit (and not enable/disable station). You can use circuits to set exactly the number of trains you can serve but I usually don't bother. If you can request 3 trains, you need to make sure that there's space to park 2 trains by the station where they won't interrupt traffic. I did it simpler to just have multiple pickup stations in parallel and depending on waiting material request 1 or 0 trains. As multiple trains would be waiting anyway, I prefer them being loaded. This might not be the most efficient way but I think it's simpler. For the scheduler you'd use full cargo OR Time passed. If a couple of minutes have gone by, have the train depart and not wait anymore.

    • Name every drop of station exactly the same (following the iron ore example, 1-4 Iron Ore Drop Off) As schedule conditions you'd use Empty Cargo OR Time passed. If a couple minutes go by, have the train depart and not wait anymore. You'd use circuits to keep requesting trains until the station has stopped as many material as you want. Keep in mind that if you request more than one train, you'll need space for the remaining trains to wait without interrupting traffic.

    Your train schedule should look like (adjust times add needed):

    • Refuel: Inactivity > 5 sec
    • Parking: No conditions
    • 1-4 Resource Pickup: Full Cargo OR Time Passed > 60
    • 1-4 Resource Drop Off: Empty Cargo OR Time passed > 60

    You can repeat parking, pickup, drop off a few times to minimize refueling (be careful not to do this too many times so your trains spend all their fuel before refueling) If you do, remember that after drop off you should always go to parking.

    Once you have the schedule set up for a train, you can copy it with shift+right click and paste with shift+left click.

    Finally, it's important to use train limit instead of enable / disable.

    Using the former, over a train has departed, if the station changes and requests 0 trains, the train will keep going.

    If you use disable, if a train departs and the station becomes disabled, the train will stop in the middle of nowhere, potentially causing a gridlock.

    PS: I usually name my stations with the type of train, so if later I decide to bring ore from an outpost far away, I can make a few exchanging hubs with 3-8, 4-16, ... bringing materials and 1-4 distributing then around the base

  • I thought bidirectional trains would be easy to deal with but it seems to just cause lots of traffic problems. I lay two parallel tracks everywhere with roundabouts so I don't really have to think about direction at all. Trains can get anywhere so as long as they have somewhere to get out of the way and I keep them at four cars or shorter.

    If you design it like that it would be easy to add a refueling station that all the trains can visit. I just use a requestor chest at each dropoff station with a bit of solid fuel since I tend to overproduce it to keep oil types balanced.