[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

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

Post by elzar760 » Thu, 15. Dec 05, 03:18

Never mind I think that was those ships buying jump fuel since the spp wasnt up and running yet and didnt have a chance to make any. my mistake.

Delon
Posts: 7
Joined: Sat, 26. Nov 05, 05:40
x3

OK, dumb question

Post by Delon » Thu, 15. Dec 05, 05:17

I have installed the script, how do I start my ships uing it ?? I see no options under the command con to select ?

What am I missing ?

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

Post by Naffarin » Thu, 15. Dec 05, 07:29

Turn on the scripteditor, delon, this is most probably the cause. There's a sticky topic in this forum which explains how.

User avatar
DeltaWolf
Posts: 597
Joined: Tue, 6. Jul 04, 08:48
x4

Post by DeltaWolf » Thu, 15. Dec 05, 07:53

@Naffarin

Could you please put the date of the last update in the title of this topic, it makes it easier for us users to see when the script was last updated.

Delon
Posts: 7
Joined: Sat, 26. Nov 05, 05:40
x3

hmm

Post by Delon » Thu, 15. Dec 05, 07:53

Editor is on, and I see the options under my UT's and under a few Ships that have been assigned to the factory since the start of the game. BUt I don't see the options under most of my ships

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

Post by Naffarin » Thu, 15. Dec 05, 08:35

@DeltaWolf: ok, will do

@Delon: This script is only usable by TS and M6 class ships, maybe that's the problem?Ships also need to have a homebase to use it, too.

Harabec Weathers
Posts: 46
Joined: Fri, 2. Dec 05, 03:28
x3

Post by Harabec Weathers » Thu, 15. Dec 05, 09:44

Amazing script, Naffarin! Got a few quick questions for ya...

Where in the script do you set the 20/80% limits? I'd like to change them, as I can run my complex more efficiently if I set my own limits. (Would be a great addition to the script too, but I know that's a somewhat large undertaking, so no worries)

Any possibility of including your complex resource control script in this one? I love both of 'em, and think that both are very much required to have near-realistic trade happen. Or, on the other hand, justput a link to it in the top of this thread, as everyone should know about it :)

Thanks again for the great scripts!

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

Post by Naffarin » Thu, 15. Dec 05, 10:07

ratios are coded in line 31 in script plugin.strader.checkMultiProd and line 35 of plugin.strader.checkMultiRes

The complex manager won't be added to this script...1.3 will add functionality that will be superior to the complex manager afaik.

And an automated setting of product sale would be a little bit too mighty i think.

User avatar
-XTM-
Posts: 1277
Joined: Sat, 12. Nov 05, 19:46
x3

Post by -XTM- » Fri, 16. Dec 05, 03:27

Could you plz specify the exact conditions under which the factory-traders will auto-order a jump-drive?

I've tried everything I could think of (except for giving them MK3 but that would't make sense now would it.) but no luck sofar.

-Factory, 2 freighters assigned to it, 1 on import, 1 on export
-Freighters have lvl 1 script experience (could this be it?)
-3.000.000 in the factory bank
-freighters equipped with mk1/mk2

-can trade with other races YES
-max jumps 50 (also tried 1,2,3,4,5)

-waited about half an hour

-tried them idle, busy, docked at home...nothing.

Or am I just mistaken and do you have to equip them with one yourself?...that wouldn't be a biggy...just liked the id of them auto-ordering it.
Edit; nope, I'm reading at least one feed-back that it should/does/did work so I'm not a total idiot after all....I'll keep trying then.

Edit : If it would work, how exactly will the jump-code influence the behaviour, I mean, what parts are enabled (energy-order mainly)?
I assume the freighter will use all of the MK3 jump-code, so when there are 200 of them crossing through space, will this also mean I'll go nuts with the Out of fuel messages?
DOES the jumpdrive show up in the freight-list or is it just hidden-code it uses?

Great script!
The Xtended Mod

Need Help?

Ask Questions / View the FAQ's at TheXUniverse Forums
Read the News on Mod Developments at our Website

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

Post by Naffarin » Fri, 16. Dec 05, 08:09

Freighters will order a jumpdrive under the following conditions
- level 1 rank
- sitting at homebase
- completed a trading run
- homebase has 125000 credits minimum

Freighters will then buy a jumpdrive if a jumpdrive selling station is within 5 sectors reach, or order one with the delivery service

Jumpbehaviour is different from MK3, this means that before they make a trade run they will check if they have 10% cargo full of energy and take the missing amount from the homebase if not. If they are not at the homebase at that time, they calculate the amount of energy needed for the jump home and if they don't have enough go to the nearest solar power plant to buy some.

Jumpdrives and energy show up on the normal freight list.

Tritous
Posts: 899
Joined: Sat, 15. Jan 05, 17:20
x3tc

fixed

Post by Tritous » Fri, 16. Dec 05, 08:23

looks like its all working for me. cheers for the help

now for some profitzzzzzzzzzz...
Give a man a fire, he'll stay warm for a day
Set a man on fire, he'll stay warm for the rest of his life ;)

Delon
Posts: 7
Joined: Sat, 26. Nov 05, 05:40
x3

Got the script working, and its going ok

Post by Delon » Fri, 16. Dec 05, 18:45

couple of quick questions,

I have 10 freighters assigned doing export from one of my major complexes. This complex is in the Ore Built. They are the only ships selling out of this complex besides the couple of discovers running space weed and space fuel. This complex produces 2 of every end weapon / shield / missle that the aragon can produce.

I have used another script to add a couple of resources which this station has extra as sellable.

Now my question, it seems that the ships are alway selling energy / silicon or something instead of all the end weapon / missle / shield products this complex makes.

I have the selling price set to the lowest possible for all products.
Is there anyway to modify the script to sell end products if the station has it first ??

Its not like they are going to run the complex out of energy, it has 3 XL SSP's and something like a 850000 cell capcity, but would be nice for them to sell the big ticket items 1st.

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

Post by Naffarin » Fri, 16. Dec 05, 19:44

Well there is no way to give a product a higher sell priority over others, but the script already calculates the most profit gaining ware for a salesrun so the high end wares should be sold as the first thing

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

Post by Naffarin » Sat, 17. Dec 05, 10:09

Update 1.14

added code that allows a station to remember previous stations it sold products to, so if a transports finds a station where another transport is already flying to, he will now try one of the previous stations. Since this is a learning effort it won't kick in immediately but the effect should show up after some time.

Possible bugfix: changed a line of code that may have prevented transports from ordering a jumpdrive

Cisor
Posts: 287
Joined: Sat, 25. Sep 04, 15:06
x4

Post by Cisor » Sat, 17. Dec 05, 12:18

Could you please include the version number as part of the filename? That way we can check which version we have and whether we need to upgrade.

PS: (I know you put in the upgrade date in the topic header, but after a few days I can't remember whether I got it nor not) :)

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

Post by X-it » Sat, 17. Dec 05, 16:45

This sounds like a great script! I've installed it, but was just wondering: Will this enable the option to have one single ship (or several ships) both buy and sell for your factory?

hox
Posts: 119
Joined: Fri, 28. Oct 05, 12:27
x3

Post by hox » Sat, 17. Dec 05, 16:46

Thanks for making this mod - it really improves the game! 8)

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

Post by Naffarin » Sat, 17. Dec 05, 16:46

@X-it: Yes, that's what the script is for

@Cisor: There is only one planned release left, so i hope you pardon me not doing that :)

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

Post by X-it » Sat, 17. Dec 05, 17:03

Naffarin wrote:@X-it: Yes, that's what the script is for
:oops: Sorry, it wasn't too clear in the initial post, but I suspected it. And it sounded a bit too good to be true, so instead of pinching myself to make sure I wasn't dreaming I had to ask.

Thank you very much for this.

Cisor
Posts: 287
Joined: Sat, 25. Sep 04, 15:06
x4

Post by Cisor » Sat, 17. Dec 05, 19:38

@Naffarin: OK, thanx anyway.

Just a few quick questions:

I have the impression asking for the trader report sets the trader activity to idle. Do they have to be restarted? If so, can this be fixed?
Ditto for changing the station jump range.

Or am I completely mistaken? (I asked for a report of all the traders, and then found them all just sitting there/wherever idling).

Post Reply

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