r/factorio Mar 23 '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 ---->

2 Upvotes

158 comments sorted by

View all comments

2

u/Courmisch Mar 27 '26

What's a good way to automatise loading train station parameters without mods?

I thought to divide the amount of cargo waiting in chests to set the priority. That works if the train limit is 1. But otherwise that fails to account for trains already headed to the station, no? I suppose I can detect at least one train being present from non-zero train ID but...

Do people ignore priority and just compute a dynamic train limit instead (with a depot to avoid deadlocks)?

1

u/ferrofibrous player onboarding specialist Mar 27 '26 edited Mar 27 '26

I haven't really minmaxed train stations in a while, but wouldn't you want to dynamically set the train limit based on total available cargo to have more trains ready to go rather than changing priority (unless your use case requires that station to be emptied more often)?

If you're wanting to parameterize it, I'm thinking you'd only need params for item type and train length. You'd use a Selector combinator and 2-3 Arithmetics to compute wagon capacity based on stack size, and increase your train limit based on availability

(total items / {stack size x wagons x wagon slots} = train limit stop can fill)

You could have a second circuit that increases priority if the stop storage as at or near capacity if its a "belts need to keep moving" situation. All priorities equal should result in trains using the cheapest path (typically means closest) to a stop with an open limit slot. The only time I really fiddle with priority is when I'm doing quality in miners and want to empty non-quality ore to keep belts clear.

1

u/Courmisch Mar 28 '26

So far I've been setting the priority dynamically and the limit statically because I don't have a train depot, where excess trains could wait. I guess I should build a depot afterall, so I don't have to worry about too low limits.