[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

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

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

The only other script available is the Complex manager which allows you to set/remove products in a complex. It is sometimes a necessary installation if using the station trader since it is not possible for the script engine to ask for the new setting for intermediate products, also it might be more sensible if only a few of many intermediate products should actually be sold.

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

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

BTW thanks for all the advertising, BlackRain :)

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

Post by BlackRain » Tue, 27. Dec 05, 22:01

Hehe, I advertise anything I use myself :)

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

Post by bengoin » Tue, 27. Dec 05, 22:16

problem, i had the same problem with the station software as i had before. my trader fly to a station in ringo moon and sold my wares for 5x when my limit is at about 80. it arrived at the station and didnt check the price. so i made a loss with that trade.

is it possible to add a another check when it reaches a station to make sure ware price hasnt changed?

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

Post by BlackRain » Tue, 27. Dec 05, 22:53

I dont know what is wrong with your game, but it never does that for me, what you can do is try Reinit cache in the script editor, then stop the trader and restart it.

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

Post by bengoin » Tue, 27. Dec 05, 22:55

could do. ill give it a try. for all i know i made a mistake (im only human) just thought i would bring it up.

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

Post by BlackRain » Tue, 27. Dec 05, 22:57

Might not be your fault, I don't know as I can only go by what I see in my own game.

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

Post by Naffarin » Tue, 27. Dec 05, 23:17

No, this is a flaw in the script actually...sadly there is a maxprice option for the buy command but no minimum price option for the sell command and i didn't put one in myself. I have never seen it actually happen though that a transport sells below price...anyway next version checks sell price and returns home if it can't sell for at least the minimum price of the station.

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

Post by bengoin » Tue, 27. Dec 05, 23:23

there really is a problem then? phew thought i had imagined it and caused hastle for nothing. doesnt do it all the time but now and again.

when u have limited creds and have to play to get those creds i spend hours watching and cheacking the stations they arrive at and what is happening. glad i could be of help.... if i was a help??? :lol:

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

Post by Naffarin » Wed, 28. Dec 05, 00:03

The good thing with many people testing your work is that they find errors and flaws that you never experienced, so, yes you have helped :)

random50
Posts: 283
Joined: Fri, 23. Dec 05, 14:43
x3

Post by random50 » Wed, 28. Dec 05, 05:06

Absolutely superb script.

I'm finding it far more user friendly than BPH (which was also great!)

If you've coded it readably then an extra gold star as I'll probably be using it to try and work out how complex scripts get put together!

X-it
Posts: 1311
Joined: Wed, 6. Nov 02, 20:31
x3

Post by X-it » Wed, 28. Dec 05, 11:22

Naffarin wrote:The good thing with many people testing your work is that they find errors and flaws that you never experienced, so, yes you have helped :)
Which is why betatesting is so important. A programmer friend of mine says that when they work on a product they try to cover every user action possible to counteract any error messages etc. And most often - during the first few seconds of testing by someone not involved in the development, the tester does something no one have thought about, causing the program to crash... :D

Anyway,

Is there a way to get the freighters to check their current cargo before they decide what action to take? I usually fill up my freighters with energy cells before I assign them to a homebase. When I set them to maintain a station, the first thing they do is head for a SPP to buy energy cells, even when they're filled to the brim.

Also, I'd love to have the freighters order shields as well, as sometimes I can only find S or M versions when I buy freighters, and 25MJ shields are hard to find.

Thanks again for this great script!

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

Post by Naffarin » Wed, 28. Dec 05, 12:17

Hmm, i tested the cargo problem of yours with a new transporter equipped with jumpdrive and filled to the brink with ecells...as soons as i ordered "maintain" it used the jumpdrive to jump to the homebase as it should do.

So i can't really reproduce the problem.

Shield ordering is currently undergoing testing.

X-it
Posts: 1311
Joined: Wed, 6. Nov 02, 20:31
x3

Post by X-it » Wed, 28. Dec 05, 12:58

Thanks, I've never equipped the freighters with jump drives. I thought they only used those when reaching a certain level. Reading the first post again I don't know why I thought that. :roll: Probably got them mixed with UTs. Going to install jump drives on my 2 new (and only) freighters now! :D

Anyway, when the ships have no jumpdrive: I docked the two freighters in a SPP in Ore Belt last night and filled them up. After setting up two wheat farms in Home of Light I set up each freighter with a wheat farm each as home base, then set them to maintain station. Then they both went to a SPP in The Wall. Each wheat farm had 200,000 credits, so the ships should actually have ordered/bought a jumpdrive as well at this time according to your first post?

But jumpdrives it is from now on, and all worries will be over. Thanks again!
Last edited by X-it on Wed, 28. Dec 05, 20:59, edited 1 time in total.

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

Post by Naffarin » Wed, 28. Dec 05, 13:10

A jumpdrive will only be ordered when the traders reach level 1 but they will use an installed one from the very beginning

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

Post by Naffarin » Wed, 28. Dec 05, 18:15

Update 1.18

Added code that lv 4 traders order the best shields available for their ship
Changed code in the sell script that the whole sector quarant is searched for a station that would buy a product with maximum profits
Ships now verify that the sell price at a station is still over the minimum selling price of the hgmebase
Bugfixes:
fixed code in the known customers search which was using a variable of another context
fixed code in the repair script that was causing a transport not to return home or go to a shipyard
fixed a bug in the buy script that caused the experience to be calculated too low
fixed a bug that caused the transport showing buy commands although it was doing something different
fixed a bug that caused the experience not to be limited at 2M+1
probably some more that i don't recall
Last edited by Naffarin on Wed, 28. Dec 05, 18:24, edited 1 time in total.

Githyanki
Posts: 46
Joined: Sun, 13. Nov 05, 19:56
x3

Post by Githyanki » Wed, 28. Dec 05, 18:21

May I suggest a readme file in the zip that contains a changelog. It would be easier to tell which version of the script I have.
Also, consider updating topic title.

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

Post by Naffarin » Wed, 28. Dec 05, 18:25

thanks, forgot to change the topic this time.

As for the readme...SOON (tm) :)

Hyppe
Posts: 63
Joined: Wed, 2. Nov 05, 13:42
x3tc

Post by Hyppe » Wed, 28. Dec 05, 19:03

Thanks for this great script, makes things so much easier 8)

It would be nice to have an option to disable ordering upgrades, since basic freighter is cheap and its easily replaceable if things go wrong.. (damn khaak :shock: ), but if fully upgraded freighter goes byebye, you'll lose much more valuable ship :(

Anyway, this script is awesome, keep up the good work :)

Cormic
Posts: 8
Joined: Mon, 5. Dec 05, 21:40
x3

Post by Cormic » Wed, 28. Dec 05, 19:45

Hi there,

New to the X3 world and all and this script looked useful. You made mention of the mk3 trade software in the description but you don't outright say if you need mk3 in a station freighter. I have poked around in both the ship commands and the station commands and I can't find anything that wasn't already there before I turned the the script editor on. Install you said to just drop the files into the right directory and I did.. but I honestly am not seeing any different behavoir (waiting for the 80% full holds, etc).

Am I missing something?

Cormic

Post Reply

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