[Script] Update 17.12.06 V1.26 Station trader, automated supply/trade for stations

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Naffarin
Posts: 481
Joined: Sat, 3. Dec 05, 09:49
x3

Post by Naffarin » Fri, 23. Dec 05, 18:21

Ah thanks, you are absolutely right...luckily both things can't cause any issues but i will fix them of course with the next release

User avatar
HawK53
Posts: 225
Joined: Fri, 22. Aug 03, 09:36
x3tc

Post by HawK53 » Sun, 25. Dec 05, 10:41

Your script is something i always wanted
Thanks :)
Personal Log Entry

The pilot (13) Senior trade negotiator
"Silly Teladi" (name changed to protect the guilty)
of the ship Angel 1 in Sector Saturn - Solar Power Plant XL alpha(Saturn)
needs your help. No Jumpdrivefuel found in range.

Naffarin
Posts: 481
Joined: Sat, 3. Dec 05, 09:49
x3

Post by Naffarin » Mon, 26. Dec 05, 10:20

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.

ergie
Posts: 36
Joined: Fri, 25. Nov 05, 19:42
x3

Post by ergie » Mon, 26. Dec 05, 10:22

Awesome :) It has made my life easier.

ericbab
Posts: 68
Joined: Wed, 6. Jul 05, 16:19
x3

Post by ericbab » Mon, 26. Dec 05, 13:06

You are a god, micro managment was getting too me :S ! :P :>

Naffarin
Posts: 481
Joined: Sat, 3. Dec 05, 09:49
x3

Post by Naffarin » Mon, 26. Dec 05, 17:44

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.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain » Tue, 27. Dec 05, 00:19

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.

Velox
Posts: 29
Joined: Sat, 10. Dec 05, 16:35
x3

Post by Velox » Tue, 27. Dec 05, 03:35

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!

elzar760
Posts: 36
Joined: Sun, 20. Nov 05, 04:51
x3

Post by elzar760 » Tue, 27. Dec 05, 07:44

I can confirm the bug. I dont know if its with everything, but my SPP M is sitting at 9800/10000 energy and the ships come in, and leave saying sell ware with 700 energy on them. Its the only plant type ive noticed so far thats backing up on products.

Naffarin
Posts: 481
Joined: Sat, 3. Dec 05, 09:49
x3

Post by Naffarin » Tue, 27. Dec 05, 10:05

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

Naffarin
Posts: 481
Joined: Sat, 3. Dec 05, 09:49
x3

Post by Naffarin » Tue, 27. Dec 05, 11:10

grr, bugfinding doesn't stop today

Update 1.17c

fixed a bug that could cause a transport endlessly looping in a station. Luckily it does not freeze the game. Anyone who was using 1.17b and experiences transports idling in the home base has to reissue the command

Velox
Posts: 29
Joined: Sat, 10. Dec 05, 16:35
x3

Post by Velox » Tue, 27. Dec 05, 11:40

Damn your good! Many thanks, i'll check it out now.....

/bow
/thank

*edit* yeah he's behaving a lot better now! - cheers!

User avatar
bengoin
Posts: 168
Joined: Thu, 31. Mar 05, 23:45
x3tc

Post by bengoin » Tue, 27. Dec 05, 21:10

does this need activating from the script editor?
are they new commands? how can i tell if its loaded?

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain » Tue, 27. Dec 05, 21:12

You do need to activate the script editor I believe, they are new commands. What you have to do first is assign a trader to a station, then go to the trader, click on trade and the new commands will be there. Manage station, Export, Import

User avatar
bengoin
Posts: 168
Joined: Thu, 31. Mar 05, 23:45
x3tc

Post by bengoin » Tue, 27. Dec 05, 21:20

it appears to be working now but a question. it seems only to work with TS class. i got 2 M5s dashing arround buying EC's but they dont get the commands. only a TS script? or should it be with everything equiped with trade MK1?

Naffarin
Posts: 481
Joined: Sat, 3. Dec 05, 09:49
x3

Post by Naffarin » Tue, 27. Dec 05, 21:26

It's only working with TS and M6 class ships. I ruled out the other ones because they lack jumpdrive support or cargo space or both.

User avatar
bengoin
Posts: 168
Joined: Thu, 31. Mar 05, 23:45
x3tc

Post by bengoin » Tue, 27. Dec 05, 21:29

ok fair enough. im just a little too poor to afford another TS at the moment. will buy another 1 asap. i must salute you for the new BPH :lol:

User avatar
bengoin
Posts: 168
Joined: Thu, 31. Mar 05, 23:45
x3tc

Post by bengoin » Tue, 27. Dec 05, 21:32

a small question. on the ship upgrades, will it only upgrade speed cargo and rudder of the ship? any chance of it upgradingin shields? but paying that little extra of cause for its delivery :P

Naffarin
Posts: 481
Joined: Sat, 3. Dec 05, 09:49
x3

Post by Naffarin » Tue, 27. Dec 05, 21:41

Currently it only upgrades cargo, speed and rudder...shields may be a worthwhile addition though...haven't been in need of that because i equip my transports with full shields when i buy them. But i can build that in.

User avatar
bengoin
Posts: 168
Joined: Thu, 31. Mar 05, 23:45
x3tc

Post by bengoin » Tue, 27. Dec 05, 21:45

personally i would see it as a worthwhile addition. i love the script. u have a list of other scripts u created?

Post Reply

Return to “X³: Reunion - Scripts and Modding”