Refuel train when needed *Help Please*

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
PreKopLiX
Burner Inserter
Burner Inserter
Posts: 10
Joined: Thu Aug 03, 2023 11:52 am
Contact:

Refuel train when needed *Help Please*

Post by PreKopLiX »

Hello guys !

I am new here and I didn't find this topic so I am going to describe my problem and try to solve it here.

I would like to do a "train refuel station" when the train is empty on fuel (best possibility is something about 20 solid fuel = will call this empty in this topic).
So basically I would like to have one station which is shuted off, till the moment when a train is empty, turn on the station on train schedule, refuel train, then turn off the station on schedule, I hope you are understand what I want to do it. I have a LTN mod but I am stuck here.

My idea:
the train fuel level should be checked on station A (loading station) and when it's empty turn on the station C (fueling station) on schedule.
So basically the schedule will look like A-->B --x-->C -stop on C when the fuel tank is empty.



My english is not very good, and I am at work so I can't send you a screen, I am sorry. :D

Take care of yourself, love this game <3

Amarula
Filter Inserter
Filter Inserter
Posts: 539
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

Re: Refuel train when needed *Help Please*

Post by Amarula »

I think we all want something like this for our trains! :D
Sadly in vanilla there is no way to read how much fuel is left in a locomotive, which takes us to the world of mods. A search of train fuel in the mod portal has lots of results, you might want to look at this one for inspiration: https://mods.factorio.com/mod/TrainRefuelStation
Good luck and have fun!
My own personal Factorio super-power - running out of power.

SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Refuel train when needed *Help Please*

Post by SoShootMe »

In vanilla, you can't read how much fuel a train has, so you must flip the problem around: bring fuel to trains instead of trains to fuel. This also has the advantage that refueling happens when the train is stopped anyway, instead of requiring a diversion and an extra stop (even if only occasional).

I do this partly by train: a single "Train fuel load" stop (near where fuel is produced), numerous identical "Train fuel unload" stops and a single train. At each "Train fuel unload" stop, fuel is unloaded into a buffer from which it is distributed to all other nearby unloading stops. Using the circuit network, the stop's train limit set to 1 if the buffer is empty (with a single Decider combinator: if <everything>=0, output L=1). The train has a simple schedule, "Train fuel load: wait until Full cargo inventory; Train fuel unload: wait until Empty cargo inventory".

One small train supplying rocket fuel or nuclear fuel can support hundreds of trains over a wide area and has (so far...) been sufficient for me, but this could be scaled up with additional "Train fuel load" stops, each set to a fixed train limit of 1, and a train for each of those stops (with schedule as above).

PreKopLiX
Burner Inserter
Burner Inserter
Posts: 10
Joined: Thu Aug 03, 2023 11:52 am
Contact:

Re: Refuel train when needed *Help Please*

Post by PreKopLiX »

Amazing guys...thank you very much for your ideas :) Yesterday I did a "depo fuel stop" thru LTN so when the train is in depo and do nothing/waiting for cargo,then it is refueled :)

Once more, thanx a lot and have a great day :)

Post Reply

Return to “Gameplay Help”