[Fixed 1.08][Bug 1.07] Resources may take the longer route

Hey hey!

restarted a new game so my production line is still very small. I tried to keep some space for later enhancements and still have only one Resource Importer.
The annoying point at this time is that the resources do not take the shortest way and may slow down the direct supply from importer to production slot:

In this setup the resources take the red route and ignore that the yellow route is slightly shorter. The resource conveyor via the stock piles was added as last.

Kind regards


Shuts down all my big plants. I started disconnect all my resource conveyor lines to manually connect the stations to the closest imoorter to ensure my resources are not transported across the whole plant.

I noticed this myself this morning…am working on a fix for it right now…

Ha! I know what this is…
I changed some of the code in the previous patch so that the stockpiles were more ‘smart’ than before (haha). They now take into account the length of the queue in a resource importer. So if one of them has a queue of 100 items coming in, and one is 20 tiles further away but empty…then it requests stuff from the empty one. Which sounds cool right…?

Except it only recalculates which importer to use when the routes change. So ten seconds later when the closer importer has an empty queue, it still uses the one 20 tiles further away.

In theory easily fixed! just always recalculate for each object. In practice…ouch that would be sloooow.

I’m working on a fix.

Plus, it seems like once a demand/order for parts has been placed, it sticks to the importer it has been directed to. Even when an importer right next to it becomes free. Is this intended?

No, thats exactly the problem. I’m changing it to do this:

A supply stockpile or production slot always calculates the nearest import bay AND the 2nd nearest one. it then dynamically ‘load balances’ between those two at order time.
This should remain fast enough, and allow a slot to use 2 different importer to reduce bunching at one importer, and ensure it never orders from one that is too far away.

in messing about with wheels tire and brakes i run short

So what is the import part limit/time frame? and is this modified if there is multiple types of parts called for?

Hey cliff,

yeah perfomance even on slower hardware is important so if I would have to decide between perfomance and perfect routing I would choose performance.
So at this point maybe it could be a solution to calculate the route of a resource when movement is required the first time (e.g. when available at the Resource Importer or Stockpile) and only recalculate when the resource can’t reach the next planned destination. If no new route can be calculated it’s lost and can be deleted. The idea behind is that you don’t delete resource conveyors all the time - there is a continuity. This would be an imperfert solution but with some potential to get it better with better layout so it’s in players hand a bit.

This means to split up the ordering process into

  1. get the stuff into the warehouse (importer queue)
  2. move it from goods receipt station to the demanding station (production slot or stockpile)

Btw.: Is it possible to get the resources heading for a focused stockpile visible as they are when heading for a focused production slot?

Kind regards & keep up the good work!

Hi Cliff,

And another suggestion for improving the ‘Resource Importer’ while working on this:
It’s great that a secondary importer calculated but when the secondary importer has a high number or resources to be imported by itself it does not improve the situation.

So in such case - and only in such case - it would be great if a third would be calculated and - if the third has much less items to import - refuse the secondary and use the third Resource Importer instead.

Kind regards