I posted this on the Steam discussion but wanted to copy it here.
The basic issue is that when you are setting up complex production chains and have stations in multiple sectors and you only want to use materials produced by your own mines/factories, you have to set up a huge number of freighters once you get past basic production chains. Why? Because when looping orders to set up a supply chain, a "soft error" can occur where a station becomes full of a feedstock and your freighter will wait indefinitely until the # of goods in the freighter cargo hold you first set when issuing the order is achieved. It will send an error notification every 10 mins and otherwise do nothing, even if it has other commands available in the loop.
Below is some of the pertinent code(I am not a coder):
From sellgoods.lua:
-- ## Things that can go wrong: ## --
-- no station buys the goods -> critical error
-- stations buy the goods, but not enough space -> soft error
-- stations buy the goods, but unfitting prices -> soft error
-- other player doesn't have enough money -> soft error
-- Critical Error: notify & block
-- Soft Error: keep trying / wait, after 10 minutes: notify & keep trying
if full and badMargin then
-- soft error
TradeUT.setSoftError("No merchant has room for '%s' or a matching price."%_T, self.data.name)
return
elseif full then
-- soft error
TradeUT.setSoftError("No merchant has room for '%s'."%_T, self.data.name)
return
elseif badMargin then
-- soft error
TradeUT.setSoftError("No merchant accepts '%s' for a matching price."%_T, self.data.name)
return
end
end
end
From tradeutility.lua
function TradeUT.updateErrorHandling(timeStep)
if not self.currentError then return end
local maximum = 10 * 60
self.notificationTimer = (self.notificationTimer or maximum) + timeStep
self.lastError = self.lastError or ""
local newError = self.lastError ~= self.currentError.text
if self.notificationTimer > maximum or newError then
self.notificationTimer = 0
self.lastError = self.currentError.text
if self.currentError.critical or not newError then
-- notify whenever an error has been there for a while
-- or when a critical error happens for the first time
Faction():sendChatMessage(Entity().name, ChatMessageType.Normal, self.currentError.text, unpack(self.currentError.args))
end
end
DockAI.reset()
end
function TradeUT.setSoftError(msg, ...)
self.currentError = {text = msg, critical = false, args = {...}}
end
Like I said, I'm no coder so I could have missed something but it seems like the issue is that a soft error does not take in to account if a ship is in a command loop. Since the scenario where a station becomes full of feed material is likely to occur at times, especially when first setting up large supply chains, it makes sense to have it check if the next order in a loop can be completed without errors. Seems like a third "Very Soft Error" should be made for TradeUT.setSoftError("No merchant has room for '%s'."%_T, self.data.name)" error.
If that can be done, then you could technically have a single giant barge supplying all your stations with self produced materials.