Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
If you are just wanting a train to come when the station is low then just wire the chests to the station and turn it off when the chests are full, this only works if you have multiple stations with the same name iirc.
be mindful that the train will either just sit at the originating station until called, potentially blocking it from other trains using it, or it will just skip that station if you have multiple stations in the schedule.
The basic idea is that you want the train limit to be 0 when there are enough items in the unloading station's chest and set it to 1 (or more) when there is enough space for a full train to be unloaded.
Let's take an example to make it easier to understand.
You have an iron plate unloading station, with 6 inserters+steel chests (or active provider chests, same capacity of 48 slots) unloading trains there (as many as possible but only on one side, a relatively common setup).
A steel chest has 48 slots.
A cargo wagon has 40 slots.
Let's assume we use "standard" trains of 4 cargo wagons.
Let's also assume that the chests are emptied at similar rate for each group of 6 (not necessarily each individual chest, preferable but not necessary in our case).
The "simple" solution is relatively easy.
You can do "iron plates" <= 99200 output A to 1 (can be any other signal if you want to use a different letter for example).
Connect that to the train stop and set it to set the train limit with A.
Any time the amount of iron plates falls under 99200 (math below) your stop will allow a train scheduled for it to come but only 1 at a time.
The amount of slots per wagons that can be filled and still accept a full wagon unloading:
48 (slots per chest) * 6 (chests per wagon) - 40 (slots per wagon) = 248
Same but for a full train:
4 (wagons) * 248 = 992
Amount of items (iron plates have a stack size of 100):
992 * 100 = 99200
You can of course adjust the threshold to fit your needs, like 0 if you want the chests to be empty before calling a train (not recommended since a train takes some time to arrive but that's up to you).
This solution works well if you don't have a consumption fast enough that a train at a time wouldn't be enough (which is usually fine unless you are going for mega factory).
If you need to be calling more trains, the solution is more complex because you need to use arythmetic combinators to determine how many trains worth of cargo you want to be calling.
Note that this tends to be used by naming most of the stations that need the same item with the same name so trains can be dispatched from the loading stations to where they are currently needed.
You can also do a similar system for the loading stations but you would need some "parking" spaces between loading and unloading in the train schedule, so usually 4 entries instead of just loading and unloading.
Determine how much material your chests can hold and how much material the train can hold and subtract. When your supply drops to this number or lower is when you want your station to request a train.
Wire all the chests to a decider combinator and the decider to the station. Set the decider to condition item <= the number you determined. Set out put to L=1. Set your station's circuit connection to set train limit. This will request a train any time your chests can hold the entire contents of 1 train.
With that out of the way you then have to either set up your production so you have full trains waiting somewhere out of the way or make certain that an empty train can be filled, make the trip and unload, before your storage at that station is empty which means you need some place out of the way for empty trains to wait. This can be a large stacker at some central location.
https://steamcommunity.com/sharedfiles/filedetails/?id=3197352063
or small stackers at individual locations.
https://steamcommunity.com/sharedfiles/filedetails/?id=2972560848
Edit - Fel posted while I was typing.
Depending on the size of your chests they may hold more trains than your stacker can hold, and that can cause gridlock. Or on the flip side they may not hold enough so that the delivery request comes too late. Better to hard-code the station to whatever you predict you need in terms of delivery time and stacker size.
Also n to m trains (that can go between multiple unload and multiple load) are really only a megabase thing. If you have a 1 rocket base you should have dedicated trains going between unique stations, or at most have multiple collections and then only for ores. Eg have a train go to ore outpost A and back to base, and then also be able to go to B and back to base. If you start distributing your red circuits to multiple locations in a 1 rocket base, and have multiple locations produce green circuits for it; then you have a really inefficient base, even worse than a bus base.
1) Where your empty chest is, use a green (or red - just don't mistake it for copper wire lol) wire to attach it to a train station. If it doesn't reach, you need to attach the green wire to a power pole in between, and another green wire from that power pole to your station.
2) Set the condition: Click on the train station next to the chest, hit 'enable', and click on the empty box and find the product in question (copper wire in this example). Copper wire < 20 will be our example. When there is 20 or more copper wire, the train stop will be disabled by default.
3) Set a train anywhere on your connected train tracks, and program it to go to that station and back. If you did this right, you should see the station in RED - this means the stop is disabled. The train will stay at the station until it turns black (enabled), because you only have two stops, and one is currently disabled. Done! (I'd actually avoid multiple station names, since you're just learning and that'd add extra complications if something goes wrong)
First of all - thanks. So much replies only in one night.
Now, ik its in russian (my second language, at which im better then in my native one bruh), but thats the only guide i managed to find that actually had what i need:
https://www.youtube.com/watch?v=fCSNARZfBVA
I did everything, like, literally everything, i even named stations like in the vid (even knowing that it is not necessary), but the train didn't even wait, he just vroom vroom, without a stop, going in a loop without giving a damn to the circuit network, to the combinator, any signals and potato potahto.
Also, its a bit hard to understand what you guys wrote because the names of items/buildings in english, and i have a game in russian (and most important over the years i used to it)...
So, in 2 days (hopefully), i will try everything you guys wrote. Thanks you again.
And by the way, can someone make a creative world, and build that system/network please? Like, only Station A, which needs for example iron plates, and a Station B which loads trains with iron plates. Like, the most simple thing you could muster. Pretty please 😔
https://steamcommunity.com/sharedfiles/filedetails/?id=3270041964
that will call 1 train when iron plates = 0 in that chest.
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910125563/
In the above picture the two decider combinators are linked together to form a set-reset latch. If you care about how it works, each combinator will output S=1 if it receives an input of S=0. Since their outputs are linked to each others inputs, this makes the output of one toggle the output of the other. They'll do this infinitely until we give them our own inputs. The important thing is to set the logic of both to what im showing there and then link each Dec Com output to the others input.
From there, an additional S value greater than 0 can be used to lock the S/R latch in one of its states.
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910204146/
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910229577/
The constant combinators above send S=1 to their connected decider combinator when turned on. This locks the R/S latch into one of its states. This isn't very useful with constant combinators, but we can get the same result automated from adding more decider combinators AND its where this whole thing becomes useful for trains.
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910284875/
Now we're getting more complex. The screenshot is an example of a loading depot. You can see that our S/R latch now has two in line decider combinators. On top of that, we've hooked one of the S/R latch outputs into a train stop. To top it off, we have everything happening with the chests on the left.
If this looks complex, its really just 3 simple parts. If this doesn't look complex, congrats on being a cool guy.
We'll start with the chest setup since its actually optional, but still super useful.
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910357258/
We wire together all of the chests for a wagon segment and pass the signal into an arithmetic combinator, multiplying the signal by 1 so that we don't change the number and outputting it as a sort of "scrubbed" signal, in this case the dot signal. This is useful because anytime we paste the blueprint down we wont have to change anything in the logic for the different resource type. Without this step, you could instead connect directly to the decider combinator in the screenshot below and check against "everything" instead of the dot, but it can be useful to have a scrubbed signal built into your designs.
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910358103/
Here we take the dot output of the arithmetic combinator and pass it onto a decider combinator. The DC checks to see if the signal value is greater than 2000 (the inventory space of a train wagon.) If its true, then the DC outputs a "check". It's important to connect all the chests together "per wagon" instead of linking every chest in the loading station together, as it lets us check if EVERY wagon can be filled completely before we request a train. This is repeated for every wagon that needs loading at our stop.
Next we move back to our R/S latch.
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910461939/
The DC on the left checks if our "check" signal is less than 4.
The DC on the right is just checking if "check" is equal to 4.
In this case, they are set to check against 4 because thats the amount of train wagons we're filling.
These two DC's are the most important part of the train stop and also outline the benefit of going through all this setup. Lets look at an unloading stop real quick.
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910592007/
In this screenshot the highlighted DC is checking if the chests at this stop have less than 300 copper plates. If they do, it outputs a signal of S=1 into its connected DC of the S/R Latch. The other is checking if the total amount plates is *greater* than (or equal to) a set number, in this case 10k. The outputs are the same if the condition is true.
The strength in setting up your train stops this way is that we can keep a train request open until we hit our high threshold, at which point we stop requesting trains until we deplete to our low threshold. This prevents trains from getting stuck at drop-off stop because our chests are all full, which is especially useful when dealing with multiple train stops with the same name.
To cap it all off, lets look at how we can actually request the train.
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910649604/
its as simple as connecting the R/S latch to your station, ticking the "set train limit" box on your station, and then setting the condition to "S". When everything we've set up before determines a train should be requested, the latch will toggle and an S=1 signal will turn the train stop limit to 1 instead of 0 allowing a train to come to the station.
As a bonus, you can also send the signal to the train itself. When the high threshold is hit, our train station will set its limit to 0 but our train will remain until its unloaded all of its cargo. This isn't an issue if you've left space in your high threshold to finish the unload, but if you also pass the signal onto your train you can do this:
https://steamcommunity.com/profiles/76561198041548995/screenshot/2441595099910688499/
That circuit condition in the train schedule will make the train depart immediately once the high threshold is hit, instead of letting it stay to finish unloading.
If you have any questions about any of this, feel free to ask me. I like the trains in this game a lot.