[Bonus Plugin] Commercial Agent

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

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

dogdirt2000
Posts: 3
Joined: Tue, 3. Jan 06, 13:14
x3

Post by dogdirt2000 » Thu, 17. Sep 09, 21:45

Hi all, I've had X3 for years now and have never got round to finishing it - have started from the beginning 4 times now and always get fed up with setting up stations... so, this time round i'm determined to see it through.

Not used and scripts or plugins on X3:R before, but CAG's seemed to be ideal for removing any headaches involved with station trading, so I jumped on board and downloaded the bonus pack.

I've had 2 CAG's running for about a day now, and they seem to be going alright. They are both top level too. I'm now trying to make them more efficient at their jobs through the configuration settings.

I've basically got 2 Caiman SF's as CAG's for my large Ore Mine, which is on a high yield asteroid (50 ore/min). I've got one of them set up to be an Ore Seller only by locking the E-Cells, and the other CAG both buys E-Cells and sells Ore. Ore is being produced so quickly that this seems to be the best way to set them up.

I've just got a few questions relating to the configuration options, in the aim of clearing up some of my confusion...

1. The read-me with the bonus pack doesn't clarify between the different stock types, ie. "Apprentice or higher: Resources are bought when stock is below A% (default 80%) ". Can I assume that in this case 'stock' refers to Resources stock, whereas, "Assistant Courier or higher: Products are sold when stock is above C% (default 20%)" refers to product stock???

2. What are Intermediate products in the context of an Ore Mine, or another Station like a SPP?

3. What is the point in the "Assistant Courier or higher: Products are sold if the pilot can load D% into his cargo-bay (default 30%)", as setting the "Products are sold when stock is above C% (default 20%)" seems intuitive and flexible, whereas I read previously that D% can only be a max 0f 101%, which is very limiting?

For example, my Ore Mine can hold 4150 units of Ore at Max, 24000 units of E-Cells at Max, and my CAGs both have 6800 units of Free Cargo Space. So, how do I get my dual duty CAG to only sell Ore when there's more than about 1800 units of Ore available? I could set C% to something like 45%, but as the 101% is the max value for D%, the CAG would still go on selling until there's much less than 1800 units of Ore in stock, surely?

(6800 Cargo Space / 8 (Volume of Ore per 1 unit)) = 850 units of Ore

1.01 * 850 = 858.5,

Therefore, the CAG will only stop selling Ore when there's less than 858.5 Ore in stock in the Ore Mine... Correct or Wrong?

As far as I can understand the CAG description, this is what is meant, but I know I may be wrong. If, however, I am correct, then I do not see the benefits of using the Cargo Space limitation rule (D%) where the Stock limitation rule (C%) seems more than suitable?!?

Sorry for the long post, but I am determined to understand this and get my upcoming industrial empire a slick and efficient one.

Thanks :)

jlehtone
Posts: 21810
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Sun, 20. Sep 09, 22:24

1. Yes. A for Resources, C for Products.

2. There are no Intermediates on single station. Not on all complexes either.

3. Good question. Somewhere within this thread (or one of the other CAG threads) are my ponderings on the topic. A low D% allows the ship to do a run even when it cannot fill its hold. Might be useful somewhere. At D%=101% the ship should always load to full (unless low C% lets it run anyway). Less frequent runs. But not all NPC can take full loads, even when their stock if totally empty. That is already a top dollar offer, so high D is useless.

Otherwise the D% does cause trouble if one wants to maintain a minimum stock of product at station/complex.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

dogdirt2000
Posts: 3
Joined: Tue, 3. Jan 06, 13:14
x3

Post by dogdirt2000 » Mon, 21. Sep 09, 03:19

Thanks for the reply.

I ended up getting annoyed with the D% option, so just removed that particular part from the rule from within the script - not touched upon scripting ever before, but thought it must be easier than simple coding, which I found it is :)

After the last few days of running all my CAG's this way along with some testing, it's working how I want it too now, so I'm happy... now if only I could figure out why some of my UT's are landing at my PHQ with the intention (seemingly) of selling goods there, and getting permanently stuck there until I intervene, but that's another thread I think.

Thanks again :)

Knight Shadow Wolf
Posts: 97
Joined: Sun, 14. Jun 09, 09:31

Post by Knight Shadow Wolf » Tue, 27. Oct 09, 14:16

Need some help here guys.
I'm getting a different second rank to the one listed on page 1
For the second rank I'm getting 'Assistant Courier'
Can someone tell me if that's the only change to the ranking system?
If not can they list the new ranking system please
What do you know of war?

jlehtone
Posts: 21810
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Tue, 27. Oct 09, 19:29

Knight Shadow Wolf wrote:Can someone tell me if that's the only change to the ranking system?
Yes. Inconsistent translation in various bits of documentation. The difference is only in the name of that rank.

Knight Shadow Wolf
Posts: 97
Joined: Sun, 14. Jun 09, 09:31

Post by Knight Shadow Wolf » Wed, 28. Oct 09, 10:36

Cool. Glad it's only that one difference.
Thank's Jheltone.
What do you know of war?

MarkusXL
Posts: 219
Joined: Thu, 5. Nov 09, 19:44
x3tc

Quick Commercial Agent question?

Post by MarkusXL » Tue, 22. Dec 09, 05:21

X3R - bonus Pack Q

Hi,

I made the mistake of telling a CAg to "Start Commercial Agent" after either doing a Manual Trade Run or after I had to micro-manage their way out of pirate trouble.

But this resets their experience level to Apprentice! Dang!

What is the trick to get them going again without level reset?

T H A N K S ! !

<sorry for the lamer question on the old thread...> :roll:

{Please do not cross post. Discussion here. - eladan}

User avatar
digdug83
Posts: 277
Joined: Tue, 22. Aug 06, 22:33
x4

Post by digdug83 » Sat, 2. Jan 10, 19:48

I apologize for the slight necromancy but I've either missed the answer in this thread or else it's one of those obvious things I don't know yet :) I'm setting up my CAG agents to only buy/sell certain wares and of course used the add/remove ware command. My problem is that I can't tell when the ware is locked or unlocked as all that happens when I select the command is a beep for confirmation. Are all wares unlocked by default? Does lock have a different tone or number of sounds than unlock? Many thanks in advance to whoever can resolve my ignorance :D

jlehtone
Posts: 21810
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Sat, 2. Jan 10, 19:59

IIRC, lock is one beep and unlock is two. All wares are unlocked by default.

Do "Config 0 0 0" to get a report. It lists the wares. Quite sure it does.

User avatar
digdug83
Posts: 277
Joined: Tue, 22. Aug 06, 22:33
x4

Post by digdug83 » Sat, 2. Jan 10, 23:29

Many thanks for that. Getting my HQ agents to only look for a handful of items each was quite time consuming as there's so much junk on there at the moment :D My next question is will agents at a certain rank or above utilize the Mosquito missile defense command if available? I only ask because I caught one running around with it activated and a number of missiles in the hold. I don't recall setting it up before and it's not listed on the various capabilities on the first post, plus it was locked out from buying it as a ware for my HQ :o

MarkusXL
Posts: 219
Joined: Thu, 5. Nov 09, 19:44
x3tc

Post by MarkusXL » Sun, 3. Jan 10, 15:34

Since this thread popped up to the top again I want to add that my CAGs rocked (before I had to start a new game) with all the default settings i.e. I just got them going and left them alone for a LONG time,

BUT then I noticed them jumping around from system to system like madmen and making TONS of credits, and rarely, if ever getting into trouble.

WOOT!!! :lol:

Thanks again for the great code and support!

jlehtone
Posts: 21810
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Sun, 3. Jan 10, 21:08

Bonuspack Readme wrote:If the pilot has the Fight Command Software MK2 in his ship and thus can use the Missile Defense Mosquito, then he will buy some Mosquito missiles too.
I prefer not to equip CAG with FCS Mk2.

Retiredman
Posts: 795
Joined: Fri, 4. Sep 09, 02:35
x3ap

Post by Retiredman » Mon, 18. Jan 10, 15:51

How can this script be used to make your agent only a resource expeditor?
(He only maintains stock levels or needed resources for a single factory)

eg; Terran/warhead fac.. needs energy, Mre and ore, If I use CDS then I need 3 transports to maintain resources. When the resources are filled, the transports just sit at supply hub and take up slots. Which is most of the time.
Can this script do the work of those 3? and sit at the home factory when not busy?

I really don't need a guy who sells, I need a guy who buys only for the factory or hub or dock..etc.

MarkusXL
Posts: 219
Joined: Thu, 5. Nov 09, 19:44
x3tc

Post by MarkusXL » Mon, 18. Jan 10, 19:22

Yes but there is another script for that, "Commodity Logistics Software" or CLS, that lets you specify wares and stations and the ship will stick that specific trade route. If set up correctly, it will go 'round and 'round your circular route, move the ware(s) you specify.

Side note, I have added the NOS script to my CAGs, and now they are really good at avoiding trouble.

I have also added Mosquito missile defense but it NEVER gets used on CAGs or UTs. Pirates / Police never start attacking freighters with missiles. I'll strip them out eventually to gain that little bit of space back.

jlehtone
Posts: 21810
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Mon, 18. Jan 10, 19:40

Single CAG can fulfill all the needs of a station/complex. If you do not want it to sell the product, then you "Lock ware" the product.

Actually, first level CAG can only buy resources, so it could not sell anyway, nor function at all in loop-complex. Without Trading Extensions the pilot does not level up, so a factory would have a "free slave" forever, but without the benefits of higher level CAG.


CLS Mk2 lets you define a fixed "route" that it repeats like a train. But it is not "by need only"; it preceeds on its route when it can.

CLS Mk1 is "by need", like CAG. CLS1 delivers from homebase (and other similar producers) to one or more consumer. It can deliver more than one product. Internal logistics good at pushing wares, but Retiredman seems to need a "puller" to fetch resources to his Factory. CAG does that.

JoeBravo
Posts: 1
Joined: Sat, 24. Jul 10, 10:20

move pilot

Post by JoeBravo » Sun, 1. Aug 10, 20:27

somehow I can't get the "move pilot" command to work.
I get a single beep and a "command accepted" notification, but the pilot remains in the original craft. (need to select vessel twice, station once)

What am I missing?
:?:

jlehtone
Posts: 21810
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Mon, 2. Aug 10, 23:46

You need to select
1. Ship A
2. Ship B
3. Station C

A and B will both dock to C. Then the pilots (if any) of A and B will swap.

LowkeeDragon33
Posts: 68
Joined: Sun, 29. May 11, 17:27

Commercial Agent Help

Post by LowkeeDragon33 » Thu, 9. Jun 11, 15:41

Hi all,

Perhaps nobody plays this game? Last post here was about a year ago (I think).

Anyway, I am hoping for some help understanding a Commercial Agent Command. This one:
A pilot of level auxiliary courier sells products if cargo hold higher then C% (standard 20%) or if he can load D% (standard 30%) in cargo bay. A pilot of level freighter pilot 1st class skip this regulation at a station bank balance below E Credits (standard 20.000 Credits).
What is this 30%? Is this the percentage of the stations capacity, the percentage of the amount of goods compared to the cargo bay of the ship, or what?

Basically, I want my trader to only sell goods when they would fill up his/her cargo bay.

Thanks.


{X3R S&M Posting Rules. Merged. jlehtone}

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Thu, 9. Jun 11, 17:40

LowkeeDragon33 wrote:What is this 30%? Is this the percentage of the stations capacity, the percentage of the amount of goods compared to the cargo bay of the ship, or what?
It should be the percentage of free cargo units of the trader's total cargo bay.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

LowkeeDragon33
Posts: 68
Joined: Sun, 29. May 11, 17:27

Post by LowkeeDragon33 » Thu, 9. Jun 11, 19:37

Hmm, okay. Thanks. Thanks for moving me to the right thread too.

I have a few that are now working with 3,4 set to 100%, so perhaps it is only the percentage of free cargo units (as there are Shields, etc on the ship too). Otherwise, this would be a fair amount of micromanaging when cargo/weapons upgrades are bought. I am sure you know more than me though.

I also wonder why there needs to be a 3,3 and 3,4; seems like it should be one or the other (especially with the ware locking). Just don't get it, perhaps it should be:
...if cargo hold higher then C% (standard 20%) and if he can load D% (standard 30%) in cargo bay.
Edit: I think I see now. The trader will wait until the station can fill 100% of it's total cargo bay, and at that point it will fill the ship will be filled as much as possible. 100% certainly works, but ideally this value would be closer to the actual percentage of free space in the ship (as you said).

Post Reply

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