Train Refuel Station


Adds a station that trains will automatically go to when they get low on fuel.

Content
2 years ago
1.1
13.8K
Transportation

g LTN Compatibility?

3 years ago

I love this mod after only using it for a few minutes, but I was thinking after I tested this with LTN and it did not work, would there be any way to make it work with LTN? I've seen the LTN cleanup mod do a similar thing, but with cleaning up train's that have items still in them after they come back to the depot.

3 years ago

I'm glad you are enjoying the mod. I looked into LTN a bit but I'm not sure they are going to be compatible, my mod directly modifies the train's schedule to insert the fuel station, and I'm guessing that LTN is also modifying the train schedule to make it go where the train needs to go. The LTN cleanup mod gets around this a bit by just tapping into the LTN mod's notifications/events and tweaking them a bit, whereas my mod would have to work without LTN and also with LTN, which makes it a bit more complex.

I also don't know how LTN deals with low train fuel - or if it does at all? I don't actually use LTN so I'm not sure. I'll keep looking into it, it might make sense to make a separate LTN version.

3 years ago
(updated 3 years ago)

Ah yeah, that is what I was thinking was how you did it. A separate LTN one then would probably be best. LTN oddly enough doesn't have automatic refueling built into it and most of us refuel trains at the depots, but that really does get tedious after a while because most of them that I build anyway are quite large and can usually hold 40+ trains. Somehow I replied to myself or something...idk how but sorry. Doing this from my phone probably wasn't the best idea then...

3 years ago
(updated 3 years ago)

Deleted due to accidental reply

3 years ago
(updated 3 years ago)

You don't need extra fuel station for LTN because u can fill you train at depot station, where every train goes anyway after every order

3 years ago

I have/had the same question. I use LTN and would love to have a central refueling station instead of modifying every depot so trains get refueled there.

A simple aproach where trains would just go to one station wouldn't work for me. I have two physically separated networks, and I am using trains with different amounts of locomotives which results in waggons being filled with fuel if a 1-2 train enters a refuling station for a 3-8 train where the first three and not only one spot is equipped with an inserter. Or I would have to make it more complicated and use a combinator which reads out train details and only activates an inserter based on some criteria.

Shame. Thought I could use the mod just like the LTN cleaner mod, which is a fantastic addon to LTN.

3 years ago

I'm not sure I will have the time to make it work with LTN. If someone else wants to give it a shot, they are free to take my code and use it however they want.

Becks0815 - this mod only has 1 train stop as the fuel station, so I'm not sure this mod would work for your needs anyway, since all trains go to the same fuel station - though you can have multiple stations with the same name, so that you don't have to only have 1 refuel station, but you'd still run into the problem where a 1-2 train would show up and get fuel inserted into its wagons if the inserters were setup for a 3-8 train. Generally I always make my locomotives in the same spot: 1-2, 1-8-1, 1-8-1-8-1 so that I can have them all go to the same fuel stations without having to worry about fuel being inserted into the wagons.

Honestly if I had the time (and ability) what I would love to do is create a UI for the "refueling station" system so that you could create different names for different refuel stations and then assign what type of trains would go there. That way you could say "send 3-8 trains to this refuel station (that uses a specific name)" and "send 1-2 trains to this other refuel station (that uses a different specific name)".

3 years ago

Don't worry, it's not a must - just because two people asked for this. If it's not possible, it's ok for me.

3 years ago

I tried using this with LTN and it worked just fine. Though, I also believe the depot kind'a makes using this mod a moot point, since I can just fuel everything there. I think this mod is better for those who don't want to go full LTN, but want to easily fuel their trains that have stops scattered all over the base.

3 years ago
(updated 3 years ago)

LTN changes the train schedule but only for trains at depots. So it probably overwrites refueling stops for trains at depots. But that should just cause a refueling stop to be added on the next stop. If the mind fuel value isn't too low that slight delay in refueling shouldn't matter.

Meanwhile I've added refueling support in ltn-cleanup and made a push request to the mod author to include it. If you want to try it out checkout the source from https://github.com/mrvn/factorio-ltn-cleanup/tree/feature-refuel . You can copy or link the src directory to mods/ltn-cleanup to test it.

New response