[Script] Update 17.12.06 V1.26 Station trader, automated supply/trade for stations
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Update 1.17
Added improved code to find stations that would buy the products of the homebase. In my universe the traders are rarely idle now.
Added more calls to the fuel script to prevent ships running out of energy during a trade run
fuel script now looks if a destination is set and takes 2,5 * needed jumpenergy with it if that value is higher than the 10% energy reserve.
Bugfixes:
changed wrong variable name as discovered by beartlaoi
changed wrong if condition as discovered by beartlaoi
Script will now remove the old, obsolete experience variable on the ship to prevent interference with mk3 traders which would cause the mk3 software to ask for wages in the millions of credits range if a mk3 trader is started on the ship after it was used as a station trader and completed some trade runs.
Added improved code to find stations that would buy the products of the homebase. In my universe the traders are rarely idle now.
Added more calls to the fuel script to prevent ships running out of energy during a trade run
fuel script now looks if a destination is set and takes 2,5 * needed jumpenergy with it if that value is higher than the 10% energy reserve.
Bugfixes:
changed wrong variable name as discovered by beartlaoi
changed wrong if condition as discovered by beartlaoi
Script will now remove the old, obsolete experience variable on the ship to prevent interference with mk3 traders which would cause the mk3 software to ask for wages in the millions of credits range if a mk3 trader is started on the ship after it was used as a station trader and completed some trade runs.
Update 1.17a: corrected a wrong variable in the new code. This may lead to transports remaining idle though sell opportunities are available but only under special circumstances like stations in sectors with no valid sectors in the neighbourhood (e.g Cho's defeat). I would recommend for everyone to install the new version.
Hey, There seems to be a problem with the new version, at least in my game. After installing the new version my traders now barely trade. I have some power plants and I have traders set to export, they take like maybe 700 energy cells when they can hold 7000 and they jump and trade but they always sell all of the energy, which is very little as I said and then have to go to a power plant and buy energy so they can jump back home. Before this version it worked fine and my ships would export 7000 or more energy depending on how big the ship was and always had enough energy to jump back home.
Hi there
Firstly just want to say how good this script is! I only have a single factory and i'm already feeling the benefits! Can't imagine what it'd be like to run a fleet of factories without this......!
Very minor issue: Not sure if its something i'm doing wrong, but in a similar vein to the above poster I find that say for instance if my wheat factory starts at 10k energy then trcikles down to around the 8k mark, my TS will quite happily trundle off and purchase the required energy and come back with a tank full.
What I find happens intermittantly though is that he'll go off and get only about 300, so it puts the factory back up over the 8k mark. He'll then sit there for 10 mins or however long it takes to use up 300 then he'll go off and get another 300.
I actually thought he was doing the above constantly, but I have just noticed him bring back a full cargo hold of about 3k energy and dump it into the factory so its obviously not consistant.
Any thoughts?
Cheers!
Firstly just want to say how good this script is! I only have a single factory and i'm already feeling the benefits! Can't imagine what it'd be like to run a fleet of factories without this......!
Very minor issue: Not sure if its something i'm doing wrong, but in a similar vein to the above poster I find that say for instance if my wheat factory starts at 10k energy then trcikles down to around the 8k mark, my TS will quite happily trundle off and purchase the required energy and come back with a tank full.
What I find happens intermittantly though is that he'll go off and get only about 300, so it puts the factory back up over the 8k mark. He'll then sit there for 10 mins or however long it takes to use up 300 then he'll go off and get another 300.
I actually thought he was doing the above constantly, but I have just noticed him bring back a full cargo hold of about 3k energy and dump it into the factory so its obviously not consistant.
Any thoughts?
Cheers!
Update 1.17b
Fixed a bug where energy transports would unload the ecells right after loading them causing them to go almsot empty to the buyer
Fixed a bug in the station search logic that caused them to look for a buyer in respect of their last position and not their homebase position
changed logic for station search so that it would try to find a best buyer near the homebase first instead of looking for best buyers at the max range
Fixed a bug where energy transports would unload the ecells right after loading them causing them to go almsot empty to the buyer
Fixed a bug in the station search logic that caused them to look for a buyer in respect of their last position and not their homebase position
changed logic for station search so that it would try to find a best buyer near the homebase first instead of looking for best buyers at the max range