Jump to content

Lt. Derp

Members
  • Posts

    4
  • Joined

  • Last visited

Lt. Derp's Achievements

2

Reputation

  1. Above screenshot is an example where I could not enter all the trade commands in time, so the loop command is going back to order 2(Buy 500 coal) instead of order 1(Buy 500 ore). Note that when pausing the game, orders do not appear in the queue until the game is unpaused.
  2. When issuing the loop command, it will loop back to whatever command the ship is currently executing(highlighted green) rather than the first command in the chain; is that the intended behavior? It makes it so I have to position my ship far enough away from the first command that it does not complete it before I click loop. Fast tasks such as buying from a station with transporter software tend to be done before I can finish chaining the rest of the commands in the loop.
  3. For anyone that is interested, I figured out a patch to somewhat fix this(I am not a coder so your mileage may vary): in sellgoods.lua: -add "local stationsupplier = false" variable at the top with the other local variables, before the "if onServer() then" line -two functions need to be edited, Function 1: function updateServer(timeStep) ...(first part is same,edit the text below from)... -- Check if we're done yet local required = getRemainingAmountToFulfill() if required == 0 then -- print ("required: " .. required) terminate() return end CHANGE TO: -- Check if we're done yet local required = getRemainingAmountToFulfill() if required == 0 and stationsupplier == false then -- print ("required: " .. required) terminate() return elseif required >= 0 and stationsupplier == true then -- print ("Idle Station Supplier Detected, executing next Order") terminate() return end (leave the rest) Function 2: function updateFindingPartner() ...(first part is same,edit below from)... elseif full then -- soft error TradeUT.setSoftError("No merchant has room for '%s'."%_T, self.data.name) return CHANGE TO: elseif full then -- soft error TradeUT.setSoftError("No merchant has room for '%s', assuming station supplier."%_T, self.data.name) stationsupplier = true return (leave the rest) This could break your game so try it at your own risk(always make a backup of edited files and saves). The idea is to flag any sell order that has a good station to trade with but a full station cargo as a "stationsupplier", which will then complete the sell order as if the cargo of the ship is 0(leaving the remaining cargo in the ship and moving to the next order if there is one). I'm sure their are scenarios where this breaks but I just wanted a quick fix to supply my stations with as few ships as possible.
  4. 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.
×
×
  • Create New...