[X3TC Bonus Plugin] Commercial Agent (CAG)

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

Zloth wrote:I could swear it was fine before 2.6 and the bonus pack hit.
Did you uninstall the unsigned version before you installed the bonus pack? (or vice-versa)
Zloth
Posts: 456
Joined: Tue, 20. Jan 09, 03:48
x3tc

Post by Zloth »

OK, I uninstalled the bonus pack, ran the Delete all Commercial Agent Scripts.bat file, ran the bonus pack install again, and now it works! Thanks Carlo!
Gyakuto
Posts: 45
Joined: Wed, 19. Apr 06, 19:48

Post by Gyakuto »

Carlo the Curious wrote:No, I mean there may be enemies in the area.
I did a little research...
The problem is that starting CAG's won't sell shit...
They only buy to supply in the early levels.
After they gain some levels they will start selling also.
Not wonder they didn't do anything in my self sufficiant complex
HappyGunman
Posts: 20
Joined: Sun, 4. Jan 04, 12:26
x4

Post by HappyGunman »

Hi all,

Sorry for the cross-post, but I wonder if it would be possible for anyone to provide any insight on a technical problem i'm having which i've now isolated as being caused by a CAG ship docking to buy some crystals, which causes my game to crash, 100% of the time - I've detailed the full issue in the technical forum, at:

http://forum.egosoft.com/viewtopic.php?p=3263862

Thanks a lot for any potential help.
Gyakuto
Posts: 45
Joined: Wed, 19. Apr 06, 19:48

Post by Gyakuto »

HappyGunman wrote:Hi all,

Sorry for the cross-post, but I wonder if it would be possible for anyone to provide any insight on a technical problem i'm having which i've now isolated as being caused by a CAG ship docking to buy some crystals, which causes my game to crash, 100% of the time - I've detailed the full issue in the technical forum, at:

http://forum.egosoft.com/viewtopic.php?p=3263862

Thanks a lot for any potential help.
I had some crashes too with my CAGs after looking in to everything it was mostly the money problem that I gave the factory.
Since I gave the factory/complex money so they can succesfully buy stuff it never crashed again.
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

Gyakuto wrote:I had some crashes too with my CAGs after looking in to everything it was mostly the money problem that I gave the factory.
Since I gave the factory/complex money so they can succesfully buy stuff it never crashed again.
The game crashed to desktop? Or do you just mean the CAG didn't work?
HappyGunman
Posts: 20
Joined: Sun, 4. Jan 04, 12:26
x4

Post by HappyGunman »

Gyakuto wrote: I had some crashes too with my CAGs after looking in to everything it was mostly the money problem that I gave the factory.
Since I gave the factory/complex money so they can succesfully buy stuff it never crashed again.
Thanks for the suggestion, that seems to be precisely the issue.
The CAG in question is on the way to buy crystals and the complex has 500,000 credits exactly at the moment the CAG docks at the fab in question, and crashes the game.
The fab has 368 crystals however, which would require 588,000 credits to buy all of them - For some reason instead of just buying as many as it can afford (which is what CAG's usually do and I know for a fact they do most of the time fine) it is in this case crashing the game completely.
To test that I disabled the complex's auto-transfer-money to allow it to hold more than 500k, then manually gave the complex an extra million, and lo and behold the CAG docked, bought 368 crystals, and did not crash.
So, that's isolated the problem to the CAG crashing when it's homebase doesn't have enough cash to buy all of the ware it's after, though it doesn't explain why 99% of the time that seems to work fine, with the CAG just buying what it can afford and taking that haul back.
Interestingly though, that particular CAG on that particular trade run still doesn't work properly even after giving the complex enough cash - When it does have the cash available, instead of crashing it buys the 368 crystals as it should, but then goes into standby and appears to stay that way indefinitely, instead of returning to the complex with it's cargo.
HappyGunman
Posts: 20
Joined: Sun, 4. Jan 04, 12:26
x4

Post by HappyGunman »

I've had a further thought on the possible cause of this..

It seems rather too obvious and the kind of thing that would crop up far more regularly, but... The complex the CAG causing the crash is homebased at, is set to auto transfer money over 500k to my main account - However, as is common, when the plex sells wares that put it over 500k, it takes a few seconds for that money to be transferred, during which it has more than 500,000 in it's account.
To the specifics of this problem, about 5 seconds before my CAG returns to it's plex and docks, a sale is made that puts the plex's balance at 568,000 credits.
The CAG then docks, then undocks to go buy crystals. *THEN*, the auto money transfer kicks in and the plex's balance reduces from 568k to 500k, then the CAG gets to the fab, docks, and the game crashes.
Could it be then that the CAG is told how much cash the complex has at the time it leaves it's homebase (568k) to go buy X amount of crystals, then when it gets to the fab it finds it has less money available (500k), can't buy all of the crystals, screws up, and crashes?

In other words, if the CAG leaves a homebase while the homebase has X credits available and the CAG wants to spend all (or almost all) of that X credits on Y amount of ware, then when it reaches the station it's buying at the plex has less than X credits because some have been transferred to the player account, it cant buy all of Y wares it was sent out for, and crashes the game?
User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious »

Possibly similar - the DE thread changelog for 3.3.01 reports fixing a freeze, anyway (or so Google translate says). The current signed version is 3.2.20.
Gyakuto
Posts: 45
Joined: Wed, 19. Apr 06, 19:48

Post by Gyakuto »

Carlo the Curious wrote:
Gyakuto wrote:I had some crashes too with my CAGs after looking in to everything it was mostly the money problem that I gave the factory.
Since I gave the factory/complex money so they can succesfully buy stuff it never crashed again.
The game crashed to desktop? Or do you just mean the CAG didn't work?
It crashes as in freezes up.

Only a forced closure of the application via ctrl-alt-delete is the only way to close the game then.
First time I thought maybe FPS lag but I wen to smoke outside and 15 minutes later it was still frozen so it just crashed after that happened allot.
So I went on some research.
Eddis
Posts: 278
Joined: Wed, 5. Aug 09, 09:00

Post by Eddis »

Thanks for the pointers guys.

How did I manage to operate 200 trade wessles without cag... :shock:

cag is my friend. :D
chrisb123
Posts: 5
Joined: Fri, 14. May 10, 02:57

Post by chrisb123 »

I'm using X3TC 2.6 with the official bonus pack
I can't seem to get my CAG pilot to buy resources or do anything
I've spent time training the pilot with the CLS
There are 2 places that resources can be bought and there are no enemies at either places. The pilot is just waiting at homebase "in standby"
amperrine
Posts: 1
Joined: Tue, 18. May 10, 00:22

Post by amperrine »

HappyGunman wrote:I've had a further thought on the possible cause of this..
Unfortunately, I don't think this can be the cause (or at least not the only cause).

I just spent a while trying to fix my own freeze and finally narrowed it down to one of the CAGs at my hub... which has well over 100 million credits in its account. Even if all my CAGs worked together at once they couldn't go over that amount.

Anyway, if anyone has any more ideas on the cause of this, please post. I'd love to avoid the issue in the future if possible.
The_Bob
Posts: 67
Joined: Mon, 10. Aug 09, 00:02
x3tc

Post by The_Bob »

I have three CAG for my PHQ.

One is an eclipse running tech items (tubes, chips, components etc), the other two are enhance dolphins.

One them runs to get all materials that the PHQ uses to build my soon to be fleet of boreas, while the other buys materials and weapons.

The one that buys mats and weapons does nothing. It just sits in the PHQ on standby. I don't know why.

I have the Dockware thing set so that all the limits total to below 500k, and i've checked that it's not a space problem.
Donziboy2
Posts: 144
Joined: Sun, 16. May 04, 21:20
x3tc

Post by Donziboy2 »

Maybe someone can help me here, I have a Kestrel setup as a CAG to buy crystals for 1 of my loops.
I have tried blacklisting everything but crystals and setting only crystals to trade, I have disabled the jumpdrive and set jump energy to 0 yet for some reason whenever i start him.
He loads up on e-cells and goes into standby since there is no hold space left for crystals.

I have been able to get him to stop taking ecells by removing his jumpdrive but he still sits there on standby, is there some setting im missing?

Got him out of standby, but the ecell thing is annoying.
jlehtone
Posts: 22551
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone »

Bonuspack 4.1.01 updates the CAG to version 3.3.02.
User avatar
Gswine
Posts: 712
Joined: Mon, 7. Aug 06, 19:56
x3ap

Post by Gswine »

Donziboy2 wrote:Maybe someone can help me here, I have a Kestrel setup as a CAG to buy crystals for 1 of my loops.
I have tried blacklisting everything but crystals and setting only crystals to trade, I have disabled the jumpdrive and set jump energy to 0 yet for some reason whenever i start him.
He loads up on e-cells and goes into standby since there is no hold space left for crystals.

I have been able to get him to stop taking ecells by removing his jumpdrive but he still sits there on standby, is there some setting im missing?

Got him out of standby, but the ecell thing is annoying.
There is no point using a kestral as a CAG.

I tried to set one up to sell Sats from one of my stations, even if you set the jump drive use to no the CAG still wants to buy 20 fighter drones and 20 mosquito missiles so there is no real room for trade items. These things cannot be adjusted in the menus.

Also in future use the trade list rather than the blacklist. If you had used trade list you would only have had to enter one item, 'crystals'.

If you are set on using a kestral then 'best buy/sell' is your best bet but you will find it eventually dies in a Xenon sector.
She was right. Selection B4, His most recent hit, 'Nowhere Nuthin' ****-up,' a sentimental number.
Demotruk
Posts: 468
Joined: Tue, 1. Aug 06, 21:02
x3tc

Post by Demotruk »

I can't seem to get this to work. The best I can get it to do is sit in it's home base with "CAG on standby" as it's command.

With default settings it has the command "none" and sends me a message telling me that I have to assign him wares, I do that in the menu changing the ware blacklist (which is empty by default so I don't know why it won't do it) to a ware trade-list with both wares. Under these conditions he sits there with "CAG on standby".

I have the latest version of TC and the latest version of the bonus pack, the station is a simple cattle ranch, there's a source of energy cells at 12cr in the same sector, and a trading station that buys argnu beef in sector. The station's range is 1, as is the CAG. The station has 250,000cr, I have ~500,000cr.
Demotruk
Posts: 468
Joined: Tue, 1. Aug 06, 21:02
x3tc

Post by Demotruk »

Does it need 25MJ of shields like a UT does? All it has is 4x 5MJ shields but I didn't think that would be an issue.

Edit: PS, there are no enemies for sectors, certainly not within the station's range.

Edit2: Oh, and "it" is just a Mistral, equipped with Fight Mark 1 and 2, Trade Mark 1 and 2, Nav Command Software, Trading System Extension, Best buy/sell, 4x 5MJ shields and 20x mosquitos with MDM set.
Demotruk
Posts: 468
Joined: Tue, 1. Aug 06, 21:02
x3tc

Post by Demotruk »

Never mind, I figured out my problem.

The ship I chose to set as CAG had all races but Terrans set to foes. This was to keep him trading only in Terran space, but it didn't work and he traded with his "foes" anyway, so I had forgot about that when I set him up as CAG.

My bad.

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”