How do I make an inserter only place at maximum 50 coal into a train?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Rosemary225
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Jun 16, 2022 12:27 am
Contact:

How do I make an inserter only place at maximum 50 coal into a train?

Post by Rosemary225 »

I have an oil field where I am manufacturing all my oil related stuff, but I also plan to have this train go to a iron mine as well. I have a cargo wagon, and I don't want to build an entire second one just for coal. I want to have only a single stack of 50 coal inserted into the wagon so that it can be shipped to the oil field, and so I can have space for iron ore. Trying to look this up online is impossible. I can't understand anything enough by myself to do this, the inserter just loads as much coal as possible, since it is loading the coal from my fuel conveyor belt. I have tried everything I can think of to the point of making myself dizzy trying to think of more options.

tl;dr How to put only 50 coal into a train car using inserters?

Zavian
Smart Inserter
Smart Inserter
Posts: 1616
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: How do I make an inserter only place at maximum 50 coal into a train?

Post by Zavian »

Filter the cargo wagon, (middle mouse click on a slot) so it will only accept one stack of coal, and 39 stacks of iron.

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

Re: How do I make an inserter only place at maximum 50 coal into a train?

Post by FuryoftheStars »

It's also possible using the circuit network, though isn't perfect and may require some combinators depending on your setup. As such, I'd only recommend going down that vein if you find yourself setting up multiple trains like this, or you start needing the ability to have something else go in the wagon when the iron comes out.

mmmPI
Smart Inserter
Smart Inserter
Posts: 1599
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: How do I make an inserter only place at maximum 50 coal into a train?

Post by mmmPI »

Rosemary225 wrote:
Thu Jun 16, 2022 12:35 am
tl;dr How to put only 50 coal into a train car using inserters?
Filtering the wagon using the mouse middle button is the easiest and safest option but :


You can also connect the train stop and the coal-loading inserter with a green wire, then click the train stop and tick only the box "read train content", then click the inserter and tick only the box "enable/disable" and under this box, setup the condition by selecting "coal" on the left " < " (inferior to) in the center, and write "50" in the right.

What this will do is allow the train stop to send a signal containing the content of the train that is stopped into the wire that connect it to the inserter, and this inserter is only active when the signal is "coal less than 50 ". So when an empty train arrive, the inserter will load coal, the number of coal in the signal will increase as the train gets loaded up to when there is 50 coal, and then the inserter will not be active anymore and stop load the coal.

That is a relatively basic setup using only 1 wire and 2 configured entity, it is not very precise, it would function but for example if the inserter load coal 4 by 4 because you have done some reserch on stack capacity already it will go from 0 to 4 to 8 .... to 48 and then 52 before the inserter is disabled. Or if you use 4 inserters all wired up to go faster it will act the same and sometimes load a little too much. That can happen if the train arrive with already exactly 50 coal, it is possible that the inserter load coal one time before receiving the signal and disabling itself. As mentionned earlier, those system will often involve combinators doing operation on the signal to be more precise or versatile.

However even this kind of setup using only 1 wire allows the train to have iron and coal during one trip, and plastic the other trip because it doesn't uses the wagon-filter and you don't have to configure all 40 slot of the wagon which i found both are significant enough :)

Post Reply

Return to “Gameplay Help”