ASTRONEER

ASTRONEER

View Stats:
Ghost314 Jun 6, 2024 @ 6:50pm
How can I automate rail trains for automatic transport?
I'm at the stage in the game where I've started using auto extractors for resource gathering. Now I want to combine them with trains to automatically transport the goods back to base.

To keep things simple I'm planning to set up a separate rail line for each resource type, so the 'compound' rail line just goes back and forth between my base and the auto extractor for compound.

The rail stations have that handy 'load/unload' setting that can automatically load and unload the resources from the train. The part I'm not sure about is how to get the train to move between stations efficiently. Ideally the train should sit and wait at a station until all the cars are fully loaded/unloaded to avoid wasting energy by going back and forth constantly.
< >
Showing 1-11 of 11 comments
seven Jun 6, 2024 @ 7:28pm 
I think the easiest solution is to just use a storage sensor on the rail car itself. A video can show it much better than I could describe it. Here are 3 videos I bookmarked when I was learning. No connection to either youtuber.

https://www.youtube.com/watch?v=zOAercmwRhc

https://www.youtube.com/watch?v=gYwJBrtw53I

https://www.youtube.com/watch?v=42eRpsFPrA4
Ghost314 Jun 6, 2024 @ 8:01pm 
Originally posted by seven:
I think the easiest solution is to just use a storage sensor on the rail car itself. A video can show it much better than I could describe it. Here are 3 videos I bookmarked when I was learning. No connection to either youtuber.
Ah, I kept trying to use sensors on the station storage and station pin slots to control when the train moves. Something from the train storage back to the rail engine seems a lot simpler.
Last edited by Ghost314; Jun 6, 2024 @ 8:01pm
Geauxboy Jun 7, 2024 @ 6:04am 
Put the storage sensor on the train car, not on the storage you put on it. Then attach the pin of the storage sensor on the train car. Then make sure you have it on full/empty (both green arrows). Additionally, you do not need stations. You can put an autoarm by the extractor to take off of it and onto the storage on the train car. It's a lot cheaper and quicker (crafting wise). I then put a large canister at the other end of the line also with an autoarm to take the materials off the train car.

One other thing I do is to attach the pin from the rail post onto the autoarm so that it turns off/on only when you want it to be off/on. I do this because I absolutely hate it when you walk too close to an autoarm that has an item on it and it puts it in your backpack. So, when the train pulls in, it will turn the autoarm on and when the train leaves, it turns it off. I use a large T platform so I can put the large container in one slot and an autoarm on the other (front) slot.

I'm at work and can't give you a visual understanding of exactly how to wire it up.
Last edited by Geauxboy; Jun 7, 2024 @ 6:07am
Ghost314 Jun 7, 2024 @ 7:39am 
Yea, I saw the no station and no rail engine tricks in the videos above, but I'm the sort of person that cares about aesthetics in games like this. I even space out my wind mills so they don't clip into each other while turning (the trick is to place them in columns, not rows). So I'll probably continue using stations and engines just because it looks nicer.
Geauxboy Jun 7, 2024 @ 8:08am 
Originally posted by Ghost314:
Yea, I saw the no station and no rail engine tricks in the videos above, but I'm the sort of person that cares about aesthetics in games like this. I even space out my wind mills so they don't clip into each other while turning (the trick is to place them in columns, not rows). So I'll probably continue using stations and engines just because it looks nicer.

I used to be like that too. Always had to place stations at each end. It does have advantages to have stations when it comes to loading and unloading, but I eventually learned that it wasn't significant enough to warrant the time spent building umpteen stations. I would put two medium storage silos on each station and would put two medium storage on the train car. That way, I could get to the loading station and the train would fill up in a second and would start heading to the other end of the line. It would then quickly unload in one second and again head back to the other end. Sounds fast and it is, but there is a problem with that afterall which is that the train would go faster than the time it took to replenish the medium storage silos enough to continue that fluid, constant one second load/unload. So the train car would sit at the loading station until it was full. You could of course use a delay repeater instead of a storage sensor to have the train car take off after a certain amount of time instead of being full/not full.

You mentioned that it's more about personal aesthetics, so you be you and play however you want.
Ghost314 Jun 7, 2024 @ 9:39am 
I actually gave up on using medium storage silos with trains, my approach has been to use a large storage covered with medium storages on the stations for 32 small slots (equivalent of 1 medium silo) and 2 rail cars with 2 medium storages each (another 32 small slots and avoids clipping with station storage, as well as making the train look more like a train due to multiple cars). With that setup the load/unload of the trains is literally instant, at the cost of moving fewer items per trip I suppose but that doesn't bother me too much if it can all be automated.

Now that I know the trick about sending signals directly to the train I might just expand my setup to have one train gather multiple resource types. It would probably require a clever mixture of multiple storage sensors and count repeaters but it would also make for a longer cooler looking train :P
Ghost314 Jun 7, 2024 @ 10:57am 
Originally posted by Ghost314:
Now that I know the trick about sending signals directly to the train I might just expand my setup to have one train gather multiple resource types. It would probably require a clever mixture of multiple storage sensors and count repeaters but it would also make for a longer cooler looking train :P

Gave it some thought over lunch and had an epiphany. The storage full/not full setting is guaranteed to always toggle between those 2 states, which means you can create a sensor that goes off ONLY when a storage is full by sticking a count 2 sensor on top of the storage sensor (the 'not full' state, which must happen before the next 'full' state will always get ignored by the repeater). Similarly a sensor that goes off only when a storage is empty can be made with the empty/not empty setting.

The logic for moving the train then becomes "When X storages are full move to next station" (connecting the storage full sensors together with a count repeater depending on how many storages you want to dedicate to one resource). At the same time you can combine all the 'storage empty' sensors for the whole train into another count repeater which basically says "When every storage on the train is empty, move to next station" (unloading at base).

If I went back to using medium storages and allocate one medium storage for each resource type then a single max length train could collect just about every resource on the planet and dump them all at a single station at my base.
Geauxboy Jun 7, 2024 @ 12:37pm 
That actually can work, but not exactly the way you're thinking as far as storage is concerned.

STORAGE: A train with multiple cars (and storage) stops at the first station. The materials will load on any of the storages on the train, so you end up with some storages half full and others full while also having a mix material storage on each storage device. This can be done just fine if your unloading train station is setup to pull different materials into specific storage devices. If I understand your strategy right and you use medium resource containers so that each car will pull only a specific material. That may change some of your logic because you would then need to put the instructions on the train station instead of the cars themselves because one loading will more than likely not fill that container.

UNLOADING: How would your containers unload automatically when it gets to the unload station? You could possibly have a storage sensor on each container and it would unload ONLY when full. So in essence, the same container could stay partially full and make several rounds before it is full and eventually unloaded at the unload station.
Ghost314 Jun 7, 2024 @ 1:21pm 
Originally posted by Geauxboy:
The materials will load on any of the storages on the train, so you end up with some storages half full and others full while also having a mix material storage on each storage device.

I would be surprised if it didn't try to load the cars in order, I've noticed while using a shredder attached to a large rover that it always fills the available storage slots on the rover in the same order, front to back.

Originally posted by Geauxboy:
If I understand your strategy right and you use medium resource containers so that each car will pull only a specific material. That may change some of your logic because you would then need to put the instructions on the train station instead of the cars themselves because one loading will more than likely not fill that container.

I think we might have different ideal behaviours in mind. I'm fine with the train waiting at a station until it has a full load. Less moving around means less energy consumption.

Originally posted by Geauxboy:
UNLOADING: How would your containers unload automatically when it gets to the unload station? You could possibly have a storage sensor on each container and it would unload ONLY when full. So in essence, the same container could stay partially full and make several rounds before it is full and eventually unloaded at the unload station.

Since I don't mind the train waiting at some of the resource stations, I'm expecting that once it finishes loading at the last station all storages on the train will be full which is the cue to unload at the next stop. That also means that my track will now be circular with the train always moving the same direction, instead of a line going back and forth.

I think the biggest issue would be the train getting held up because a single extractor ran out of resources or a single resource has overflown its storage containers at the base. The latter issue could be handled by using the shredder, or just expanding storage areas. The former is already bugging me and I haven't quite figured out what to do about it. I need some sort of notification system for when an extractor runs dry. Maybe I can use a signal to activate a beacon?

I think I'm going to try the single resource train approach just because it sounds like a fun project to try and make it work xD
Geauxboy Jun 7, 2024 @ 1:39pm 
Originally posted by Ghost314:
Originally posted by Geauxboy:
The materials will load on any of the storages on the train, so you end up with some storages half full and others full while also having a mix material storage on each storage device.

I would be surprised if it didn't try to load the cars in order, I've noticed while using a shredder attached to a large rover that it always fills the available storage slots on the rover in the same order, front to back.

Originally posted by Geauxboy:
If I understand your strategy right and you use medium resource containers so that each car will pull only a specific material. That may change some of your logic because you would then need to put the instructions on the train station instead of the cars themselves because one loading will more than likely not fill that container.

I think we might have different ideal behaviours in mind. I'm fine with the train waiting at a station until it has a full load. Less moving around means less energy consumption.

Originally posted by Geauxboy:
UNLOADING: How would your containers unload automatically when it gets to the unload station? You could possibly have a storage sensor on each container and it would unload ONLY when full. So in essence, the same container could stay partially full and make several rounds before it is full and eventually unloaded at the unload station.

Since I don't mind the train waiting at some of the resource stations, I'm expecting that once it finishes loading at the last station all storages on the train will be full which is the cue to unload at the next stop. That also means that my track will now be circular with the train always moving the same direction, instead of a line going back and forth.

I think the biggest issue would be the train getting held up because a single extractor ran out of resources or a single resource has overflown its storage containers at the base. The latter issue could be handled by using the shredder, or just expanding storage areas. The former is already bugging me and I haven't quite figured out what to do about it. I need some sort of notification system for when an extractor runs dry. Maybe I can use a signal to activate a beacon?

I think I'm going to try the single resource train approach just because it sounds like a fun project to try and make it work xD


The single train in a loop works just fine especially considering that you're ok with the waiting. There are old vids that show that when the trains first got released.

Now I'm trying to figure out what you could do to signal you if the resource runs dry. I have problems with thumpers (extractors) just stopping for no reason even when there are clearly plenty of resources left to extract. I even tried to setup an overclock logic that I hoped would restart it automatically if it just stopped, but it didn't work. That makes me wonder if there is even a way to signal you if it stops. Can't use power or storage sensor cause power nor storage are the reason for it to just stop. A couple of count repeaters hooked up to a delay and button repeater wouldn't work either because of the train staying in the station for an extended time.
Last edited by Geauxboy; Jun 7, 2024 @ 1:41pm
Ghost314 Jun 7, 2024 @ 2:51pm 
Originally posted by Geauxboy:
Now I'm trying to figure out what you could do to signal you if the resource runs dry. I have problems with thumpers (extractors) just stopping for no reason even when there are clearly plenty of resources left to extract. I even tried to setup an overclock logic that I hoped would restart it automatically if it just stopped, but it didn't work. That makes me wonder if there is even a way to signal you if it stops. Can't use power or storage sensor cause power nor storage are the reason for it to just stop. A couple of count repeaters hooked up to a delay and button repeater wouldn't work either because of the train staying in the station for an extended time.

I haven't put too much thought into it yet, but my intuition says power sensors might be the key. Rather than detecting that it's out of power, I'm thinking maybe there's a way to detect when it's consuming power? Since in theory, 0 power consumption means it's not running. Might be able to set that up by putting the extractor on a special isolated circuit. Unfortunately that doesn't tell you WHY the extractor isn't running (maybe storage is full) so I need to give it more thought.

Edit: I ran some experiments in creative mode and discovered that extractors drain power even while not doing anything!! I'll need to add some sensors to shut them off just like the auto arms.

Plan B to detect when extractors are idle involves using motion sensors to detect whether or not the auto arm moved anything out of the extractor 'recently'.
Last edited by Ghost314; Jun 7, 2024 @ 5:36pm
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: Jun 6, 2024 @ 6:50pm
Posts: 11