this post was submitted on 23 Oct 2024
67 points (100.0% liked)

Factorio

1047 readers
9 users here now

A Lemmy community for the game Factorio made by Wube Software.

Rules

founded 1 year ago
MODERATORS
 

No time to play myself at the moment, but curious what other people experiences are!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 month ago (1 children)

You can also set each train stop's priority via circuit. I've been setting it based on how badly a train is needed at that station.

[–] [email protected] 1 points 1 month ago (1 children)

Are you using the radar to check which station needs resources?

[–] [email protected] 3 points 1 month ago

I'm using the radar network for dispatch and priority for tie breaking/to make sure the resources are distributed evenly.

All my loading stations are simply called "Cargo Pickup" and all of my cargo trains go to any of them with an opening. Once there, the station reports on the red wire the ID of the train in the channel corresponding to the item being loaded (unless another train is already being reported by another station with the same items).

On the demand side, stations look for the ID on the item they need. They copy the ID into the green network on the channel corresponding to their station name. In the simple case, a station serving copper ore to copper smelters copies the train ID from copper on the red network to copper on the green network. But stations can also request multiple ingredients in which case they have some other symbol in their name besides copper ore. (Of course, here too the copying only happens if no other station is requesting a train on that same channel).

Back on the supply side, the station looks through all the IDs on the green network and sends the ones that match the waiting train to the train. The train uses the symbols to activate an interrupt to go to the corresponding station to deliver the goods.

I just set this up today. I haven't perfected it yet. One minor hiccup is handling the fact that you have no way to atomically access a channel. So two stations could request on the same channel at the same time, corrupting the ID. But that only happens if the stations are activated to make a demand on the exact same tick. It's not so much that it's a constant problem, it just bothers me that it could be.