I have tried the following :
Uninstalled Avorion from Steam
Navigated to the install directory and manually deleted it (clearing up any leftover uninstall artifacts (the mod folders were still installed))
Installed Avorion from Steam
Created a copy of data/scripts/lib/tradingutility.lua called tradingutility.lua.original.backup
Installed the mod
Created a copy of data/scripts/lib/tradingutility.lua called tradingutility.lua.complexMod.backup
Copied the original tradingutility.lua back over the top of the modded tradingutility.lua
Edited the tradingultility.lua lines 26 and 27 (added comma and reference to complexFactory.lua script):
local scripts =
{
"/consumer.lua",
"/seller.lua",
"/turretfactoryseller.lua",
"/factory.lua",
"/highfactory.lua",
"/basefactory.lua",
"/midfactory.lua",
"/lowfactory.lua",
"/tradingpost.lua",
"/planetarytradingpost.lua",
"/casino.lua",
"/habitat.lua",
"/biotope.lua",
"mods/complexMod/scripts/entity/merchants/complexFactory.lua"
}
Booted up the game.
Confirmed no script errors in the console and that my existing platinum/gold mine was still trading (selling) with NPC traders. NPC trader faction relations are 'Excellent' but over 11 jumps to the nearest occupied faction territory station.
Jumped to an empty sector next door.
Spawned in a ship using /run Entity():addScript("lib/entitydbg.lua")
Founded a Solar Panel plant. Edited build to use the Modular Station :
http://steamcommunity.com/sharedfiles/filedetails/?id=1178447686
As soon as the station was founded, a warning was written to the console :
Warning: Couldn't add script from stream: index is already taken
Station started production of energy cells as expected.
Spawned in another ship and founded a Scrap Metal factory. Got the same warning in the console as above.
Used the Complex Manager on the Solar Panel plant to merge stations. UI of Complex Manager seems ok, production rate and goods for sale detected successfully. The combined station produces resources up to the assigned limit. The Buy/Sell Goods menu is correctly populated too, with the correct stock.
Sat idle in sector with the complex station. Endured a couple of pirate attacks. Received notifications that the mine in the adjacent sector was still trading (selling) with NPCs.
No traders have since visited the new empty sector with the complex station.
Is there a way I can up the logging level to the console to try and get more information for you ?
Notes :
I am using an existing galaxy that I backed up before installing the mod - no complex stations exist, just the mine.
The complex station does not have a full compliment of crew and is suffering normal damage over time due to lack of maintenance.
The complex station does not have a captain.
The station is set up inside of the barrier at [-32,40]
The sector was initially completely empty of all entities. No asteroids, no wrecks, no containers etc.
Can confirm that the config still has 'config.enableNPCTrading = true'
I have tried removing all existing docks from the merged complex station, exited build mode, entered build mode again and reapplied a single dock.
Aside :
Config file has the version 'config.version = "[0.90b] "' (yes there is an extra space in there it seems) - confirmed this matches what is on GitHub.
Looking at the logs when the station is constructed :
<${good} Trader ${size}> Complex Construction begins.
<> Paid 5.529.000 credits to found a factory.
Warning: Couldn't add script from stream: index is already taken
After adding 'config.debuglvl = 5' to complex.lua I am able to see the messages of (amongst other data) which I presume means the mod is scanning products correctly :
[CPX3][0.90b] sync of ProductionData
[CPX3][0.90b] new Productiondata 1 Solar Power Plant S
[CPX3][0.90b] new Productiondata 2 Scrap Metal Trader Class II
[CPX3][0.90b] Updating ListDataPanel