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)

  • kimli@lemmy.mlM
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    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

    • Tangerine@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      This was very in-depth, thanks a lot!

      If I am reading this correctly, the parking area is only to serve as a buffer for trains that have nowhere to go, right? For example, if there are no stations that have enough resources for a train to pickup, the train will be forced to wait at parking. This is one of the problems that I had been running into with my old system, and this will definitely solve it.

      And yes, I had been using train limits instead of enable/disable. I especially like your idea of

      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.

      Also, I will be sure to include the train type in my stations, i can see this being very useful if I want to scale up in the future!

  • max@feddit.nl
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Hmmm, it’ll be hard to do what you want, most notably the single refuelling station, with just vanilla trains. I used to have refuelling on every stop in a base (main base, big outposts). Then the trains would go between them and mining outposts for example. I’d name all similar stations the same so that it’ll go to the nearest activated station. (Deactivate them when demand has been met). That worked fine for me. Nowadays, however, I use LTN to achieve something very similar to what you have. Instead of trains waiting at the iron smeltery waiting to be dispatched, they now wait in the depot and can go anywhere as long as the wagon type matches the cargo. Gave me the benefit of centralised refuelling in the depot and fewer active trains at any given time. Really worth looking into LTN if trains are your thing. I promise it’s not as complicated as it may look at first. :)

    • Tangerine@lemmy.mlOP
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I will give LTN a look, although I am fairly set on not using any train mods. Thanks for the advice though!

      • NeveHanter@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        There is straightforward vanilla friendly mod from one of the Factorio developers that handles train refuelling and train depots, the Train Control Signals (you need to use vanilla station limit feature). Also aside of the already mentioned LTN you could try Project CyberSyn and/or TSM.

        • Tangerine@lemmy.mlOP
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          Thanks for the links. TCS and TSM look especially interesting… I may have to check them out

      • cactusupyourbutt@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I did a LTN light playthrough. Meaning that I had LTN installed, but only used it to keep stations logistic storage topped up with stuff required to build the defenses. For all the other transportation needs like moving items from factory to factory I used plain old vanilla train logic.

        Maybe you could use LTN to keep fuel at outposts and refill the trains there?

  • Thadrax@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Designing something from scratch and expecting it to work on the first try probably won’t work.

    My suggestion would be, to start with some simple blueprints for a train station, intersections etc. and just use it until you run into issues. Then you can improve on it, update your blueprints, use those for a while and repeat.

    For example, I tried the whole refueling station for a while, and had bad experiences with it. It created bottle necks and fixing those turned into a whack-a-mole type of situation for me. What I did instead was to refuel my trains at every station that wasn’t purely a mine (I excluded those, because those will get torn down when the resources dry up and the trains picking stuff up there will always drop it off at another station that has refueling).

    So now my station blueprint includes a stop for a refueling train that only enables when the local stock of fuel drops low.

  • Toribor@corndog.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    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.

  • numberedcompany
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    If you want an intermediate system go 1-4, blue chest fuel, simple station limits, and pre-unloading stackers. Dead simple and can easily support non-ups limited megabases, and compact enough to not hurt the layout of a gigabase.

  • Spzi@lemmy.click
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    using train limits and circuits to calculate the limits

    This makes me happy. This is the way :)

    Yes, 8 wagon trains are quite big. 1-4 goes a long way. 2.7k is well doable with 1-4.

    I also want a single fueling (maybe adding multiple as the factory grows) station that is visited by all trains.

    So each train has a schedule of 3 stops? That means they will visit the fuel station much more often than necessary, which creates more traffic than necessary. When you get to 50 trains or more, traffic and jams can start to cause issues which are hard to solve. You could reduce the issue by making longer schedules (load, unload, load, unload, …, refuel).

    Another option would be to incorporate the refueling into large stations. For example, ore trains can be refueled at the smelter unload. You can have one dedicated fuel train delivering fuel, and the ore trains can have a simple schedule (load, unload).

    I’m trying to be a bit more organized in the creation of this one

    If you enjoy making blueprints and planning ahead, make a rail book. Stations, straight, turn, T- and X-junctions. Make sure they align when rotated. Grid aligned can make sense, but isn’t necesssary.

    Or grab a book from the internet.

    It also helps to move smelting / production sites to rail based outposts as soon as possible. This way, your main base won’t need to become messier and messier as you progress.

    • Tangerine@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Yeah I already have a book of tracks, but I will definitely add station blueprints to it!