Allow Inserters to take fuel from trains again

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Roxor128
Fast Inserter
Fast Inserter
Posts: 163
Joined: Sun Oct 02, 2016 9:48 am
Contact:

Re: Allow Inserters to take fuel from trains again

Post by Roxor128 »

I'm in favour of this. I remember the last time I switched a heap of trains from one fuel to another. Ugh. It would have been so much easier if I could have just set up a bunch of filter inserters set to remove the fuel types I didn't want and put them in an active provider chest.

Add whatever idiot-proofing measures you think are necessary, but please add this!

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Allow Inserters to take fuel from trains again

Post by ssilk »

Can you specify your use-case for that? Then we can explain you how you can achieve it with the current trains.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Roxor128
Fast Inserter
Fast Inserter
Posts: 163
Joined: Sun Oct 02, 2016 9:48 am
Contact:

Re: Allow Inserters to take fuel from trains again

Post by Roxor128 »

Last time I did it was on vanilla 0.16, and that was switching from coal to solid fuel for around 50 trains. The only way to get the coal out was to hang round the refuelling station, call the trains in and do it manually for every train. In the process of which, I ended up finding wood and wooden power poles I thought I'd gotten rid of long ago.

At the moment, I'm playing through a game in v1.1 of the mod Nullius and unlike vanilla, it produces outputs when fuel is used. Those will be unloaded by an inserter, but the only way to get unused fuel out is to do it manually, which is a problem when you want to move to a new fuel type, and I'm going to be doing that sometime soon, once I'm reasonably sure I have enough production of methanol canisters going. I don't want to leave a heap of hydrogen canisters sitting around unused in trains like the wood stuff from the earlier game because canisters are a bit of a pain to make at the stage in the game I'm at, so I'd rather use them in a controlled way and reuse them.

Hell, I probably wouldn't be asking here if we could use circuit logic to read the fuel and would just set something up to only load in new fuel if the train is nearly empty.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2485
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Allow Inserters to take fuel from trains again

Post by FuryoftheStars »

I wonder, if the primary reason people want this is for changing out fuel in their locos, and the devs feel as though allowing inserters to take from them still cause too many issues, what about changing locomotive behavior to always use the lowest grade fuel first? I mean, they do have 3 slots….
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2632
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Allow Inserters to take fuel from trains again

Post by steinio »

FuryoftheStars wrote:
Thu Sep 01, 2022 9:49 pm
I wonder, if the primary reason people want this is for changing out fuel in their locos, and the devs feel as though allowing inserters to take from them still cause too many issues, what about changing locomotive behavior to always use the lowest grade fuel first? I mean, they do have 3 slots….
That's actually a very good idea.
Fuel gets used up anyway so why take it out.

Also I guess a train could get stranded without fuel if the inserter takes it all.
Image

Transport Belt Repair Man

View unread Posts

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Allow Inserters to take fuel from trains again

Post by mrvn »

Hi, I just run into the same problem. I'm running out of coal but I have oil and want to change all my fuel to solid fuel. So I added filter inserters to the refueling stops to take out the coal and inserter solid fuel instead and nothing happens. :(
ickputzdirwech wrote:
Fri May 22, 2020 10:42 pm
WhatheWorld wrote:
Sat May 09, 2020 7:48 pm
does anyone know if there is a mod that will allow inserters to pull from trains or know if it is even possible to a mod to allow it?
Have a look at mods.factorio.com/mod/InserterFuelLeech.The only limitation is that the targeted entity can't be a chest but must have a fuel slot as well.
I can confirm this mostly works. Except there seems to be a 2 bugs:
  1. Place a locomotive somewhere and set it to auto (no stop so it just stands there), attach a cargo wagon and put some coal in the locomotive and cargo wagon.
  2. Next place inserters next to the locomotive and cargo wagon so they extract items. Nothing will happen.
  3. Place a furnace in front of the inserter. Nothing will happen, but the inserter at the locomotive not waking up is actually a bug.
  4. Rotate the inserters 4 times each (or move the train). Now the locomotive will be emptied. But that is also a bug since the train isn't loading/unloading. The cargo wagon remains closed as the train is automatic and not at a stop.
Since building in a different order or moving the train wakes up the inserter properly and the requirement for the inserter to transfer fuel into a fuel inventory the two bugs are probably not important. But still...

The bigger problem is that InserterFuelLeech will only transfer fuel into fuel slots. So you could chain fuel locomotives or furnaces from a locomotive. Something I find highly problematic as their is no way to leave some fuel in the locomotive. It would be easy to take out all fuel and then the locomotive leaves the station with it's unspent fuel and runs out. The mod (as is) does not really help swapping one type of fuel for another. For example I want to remove all the coal from trains and replace it with solid fuel. And I want the coal to go towards plastics and not be burned up in furnaces. If I burn the coal I might as well leave it in the trains. But that could be added. It's all done in LUA though and that's always a risk of being a big UPS cost.

Overall I think the only clean solution would be to have a option in the inserter prototype that allows taking from fuel slots and maybe even input inventories. Then mods can make a fuel-extractor or even an ingredient-extractor. The later would be useful with e.g. furnaces smelting multiple things. When you switch from smelting stone to iron ore you can end up with furnaces having 1 stone in the input (as it takes more than one to produce a stone brick) and you could then remove that with a filter inserter under circuit control. This would allow normal users to build programmable furnace.

I think having an extra entity for fuel/ingredient extraction should make everyone happy (except the dev that has to implement it). It avoids any accidental removal of fuel, even the case where you have a filter inserter set to coal and accidentally park a locomotive in front of it. And it should be obvious to users that a fuel-extractor will remove fuel and that if you want to remove fuel you place a fuel-extractor. So I could even see this as vanilla feature.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Allow Inserters to take fuel from trains again

Post by ssilk »

Hm. The loco has three slots. The wagon has 40. So the loc stores 7.5 % (13.3 times less) of the wagon.

I don’t understand this discussion. Or maybe a little bit, because I remember being in situations where coal was low. But then it was always much, much, much more easy to limit the supply for the trains and using an extra wagon for coal, instead of doing such things. I mean if you do it in the real world it’s as if you have a truck which transports anything. And at the target you put a hose (a fuel extractor) into the trucks fuel and empty it. I understand the idea, but when transferred into real world you see immediately, that it is not such a clever idea. Because wouldn’t it be much easier to use the truck’s container to transport the fuel? Wagon filter are keywords.

And, yes, the idea that a vehicle uses the lowest grade fuel is really good! I would eventually add, that I can set a game-wide order for any vehicle. Some requester that shows me every fuel in game and I can move the items up and down to set the order of consumption. With that I think most of the use cases won’t be needed anymore and for the rest see above. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Allow Inserters to take fuel from trains again

Post by mrvn »

ssilk wrote:
Sat Sep 03, 2022 8:14 am
Hm. The loco has three slots. The wagon has 40. So the loc stores 7.5 % (13.3 times less) of the wagon.

I don’t understand this discussion. Or maybe a little bit, because I remember being in situations where coal was low. But then it was always much, much, much more easy to limit the supply for the trains and using an extra wagon for coal, instead of doing such things. I mean if you do it in the real world it’s as if you have a truck which transports anything. And at the target you put a hose (a fuel extractor) into the trucks fuel and empty it. I understand the idea, but when transferred into real world you see immediately, that it is not such a clever idea. Because wouldn’t it be much easier to use the truck’s container to transport the fuel? Wagon filter are keywords.
I don't get the part about using the locomotive to transport coal either. But for a LC train and a smelter that could work if one fuel smelts >13 ore then <7.5% fuel is all you need.

But I hope you see that changing the fuel used by the locomotive or chain loading locomotive is something different but needs the same mechanic.

As for it being minor amounts: I have 100 trains, each has 3 stacks of coal and all my coal mine is just about dead. That's 300 stacks of coal I can turn into plastic (or grenades) while I find a new coal field, kill the aliens and build a new mine.
ssilk wrote:
Sat Sep 03, 2022 8:14 am
And, yes, the idea that a vehicle uses the lowest grade fuel is really good! I would eventually add, that I can set a game-wide order for any vehicle. Some requester that shows me every fuel in game and I can move the items up and down to set the order of consumption. With that I think most of the use cases won’t be needed anymore and for the rest see above. :)
Lowest grade fuel would be a bad change. With nuclear fuel it is useful to put coal, wood or any other cheap burnable in the first 2 slots and nuclear fuel in the third. Nuclear fuel lasts forever and limiting it to only one slot greatly reduces the amount you waste filling up all the slots of every locomotive and never getting used. Especially when you just start producing it.

Maybe locomotives should have that "X" button to limit the number of fuel slots like chests have. Then I could set the locomotive to 1 slot only when I have a rich enough fuel source that only 1 slot is needed. Which would also allow manually placing fuel into the blocked slots to get rid of it and it would be consumed first. Like when I have too much wood in my inventory.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Allow Inserters to take fuel from trains again

Post by ssilk »

If you set the slot to 1, you have the danger of getting stuck with nukular, if you have long-distant trains or special refill stations.

Hm. Btw. Refill-stations. If we have special train stops for refill (go to the next refill station, if fuel is below X), we could change the trains behavior so, that at those stations the inserters work as propagated here. E.g. a filter inserter will put out all unneeded fuel.

So no special inserter needed.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Allow Inserters to take fuel from trains again

Post by mrvn »

ssilk wrote:
Sat Sep 03, 2022 12:01 pm
If you set the slot to 1, you have the danger of getting stuck with nukular, if you have long-distant trains or special refill stations.

Hm. Btw. Refill-stations. If we have special train stops for refill (go to the next refill station, if fuel is below X), we could change the trains behavior so, that at those stations the inserters work as propagated here. E.g. a filter inserter will put out all unneeded fuel.

So no special inserter needed.
A stack of coal has 200MJ so 3 stacks make it 600MJ. A single nuclear fuel has 1.21GJ, or twice that. You have to go truly long distances to use up a whole nuclear fuel. And if so you could always not set the slots to 1 and use all 3 slots. As with chests limiting the slots would be a choice in the game. I'm not talking about modifying the prototype.

Refill-stations? You mean some special train stop "refill-station" and when a train stops at one of those special stops then and only then filter inserter can remove fuel? That seems much harder to grasp for the user and horrible to implement. I bet it would slow down every single inserter in the game because they would always have to check "am I at a refill -station?".

Otherwise that's what you have with LTN. You have depots where trains always return to between jobs and normally that is where you refuel them. There are also mods that insert fuel stops into the trains schedule when it gets low on fuel.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Allow Inserters to take fuel from trains again

Post by ssilk »

mrvn wrote:
Sat Sep 03, 2022 12:20 pm
You have to go truly long distances to use up a whole nuclear fuel. And if so you could always not set the slots to 1 and use all 3 slots. As with chests limiting the slots would be a choice in the game. I'm not talking about modifying the prototype.
It is easy to build a map, where one transport takes one nuclear fuel. They are just very big.
I had maps, with LTN mod, where bad combinations of items regularly used up two nuclear fuels per transport. :)

Refill-stations? You mean some special train stop "refill-station" and when a train stops at one of those special stops then and only then filter inserter can remove fuel?
No, the train inserts a refill station in its schedule, if needed.

That seems much harder to grasp for the user and horrible to implement.
Hm, some mods do that already.
I bet it would slow down every single inserter in the game because they would always have to check "am I at a refill -station?".
Hm. Maybe it’s a bad idea. 8-)
Otherwise that's what you have with LTN. You have depots where trains always return to between jobs and normally that is where you refuel them. There are also mods that insert fuel stops into the trains schedule when it gets low on fuel.
Yeah, and I remember building such a refill station that looked into each train, if there is still coal left and if yes it stopped that train for further scheduling by LTN so that I could remove the remaining coal myself. Some things don’t need to be automated, because they happen only once for less than 100 entities.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Ideas and Suggestions”