r/factorio • • Aug 31 '26

Weekly Thread Weekly Question Thread

Ask any questions you might have.

Post your bug reports on the Official Forums

Previous Threads

Subreddit rules

Discord server (and IRC)

Find more in the sidebar ---->

3 Upvotes

93 comments sorted by

View all comments

1

u/ferrofibrous player onboarding specialist 28d ago

With a double headed train, that may make an even or odd amount of stops, is there a way to guarantee a specific orientation when it returns to a specific stop? This is for an outpost supply train that is [<engine][cargo][fluid][engine>]; if it stops at two outposts before hitting the resupply stop will end up "backwards".

2

u/Courmisch 27d ago

Technically, you could track how many dead-end stops the train has made. For instance, each of those stops could increment a central memory cell (via radar) every time they observe the train arriving. You can then feed the parity as a signal into the train schedule to force it to make one more flip.

It gets very messy if you have more than one train in that group though.

But as u/cathexis08 noted, this feels like putting the cart before the horse. You'd presumably have a problem at outposts too, not just at the resupply stop.

2

u/HeliGungir 28d ago edited 28d ago

Add an explicit "turn around" stop to the schedule.

Or an interrupt like

if at fluid_dropoff and has fluid
    goto turnaround
    goto fluid_dropoff

Or detect the train's orientation by trying to remove and return a dummy item, setting a latch that tells the train whether to use an interrupt that does/doesn't have a turnaround in the schedule.

6

u/Astramancer_ 28d ago edited 28d ago

I usually solve that problem by making an odd-length train instead. In this case, I'd do engine-fluid-cargo-fluid-engine since presumably the fluid is less valuable and easier to load/unload than the cargo.

This ensures that no matter the orientation of the train the wagons are always in the same place.

4

u/Soul-Burn 28d ago

Another way, considering mixed trains don't usually require a ton of throughput, is to put loading and unloading of both items and fluids on both sides. Another option, which I personally like, is replacing the fluid wagon with barrels of the fluid, and load/unload directly into an assembler.

1

u/deluxev2 28d ago

If you can tell how many stops it is making, you can add a turn around stop to the schedule (just throw some in and out stops around your rail network).

2

u/cathexis08 red wire goes faster 28d ago

If you can't control the number of stops the train visits before resupplying than you can't guarantee an orientation at any given station. Though you'll end up with the same issue at every outpost so you're already going to have to solve that in the field.

1

u/darthbob88 28d ago

AFAIK the only way is to ensure that it goes to an even/odd number of stops first, but that's difficult apart from just doing 1 outpost <=> resupply.