[Bonus Plugin] Commercial Agent
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 221
- Joined: Mon, 17. Sep 07, 11:52
commercial agent
hi
im trying to download the commercial agent script but the link does not work, does anyone know of another place where i can download it
thanks
im trying to download the commercial agent script but the link does not work, does anyone know of another place where i can download it
thanks
-
- Posts: 16999
- Joined: Mon, 5. Mar 07, 22:03
-
- Posts: 22555
- Joined: Sat, 23. Apr 05, 21:42
Not sure, but probably total amount of $ware that $ship can hold. Ie hold space left after adding ship equipment and fuel (/drones/mosquitos).Teladidrone wrote:What is 100% of the cargo bay?
How exactly is that calculated?
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.
Insanity included at no extra charge.
There is no Box. I am the sand.
-
- Posts: 16999
- Joined: Mon, 5. Mar 07, 22:03
Code: Select all
( $WareCargo * 100 / $WareCargoMax2 ) > $ConD
Code: Select all
$WareCargo = [THIS] -> get true amount of ware $Ware in cargo bay
$WareCargo2 = [HOMEBASE] -> get amount of ware $Ware in cargo bay
$WareCargo = $WareCargo + $WareCargo2
$WareCargoMax2 = [THIS] -> get max amount of ware $Ware that can be stored in cargo bay
-
- Posts: 644
- Joined: Tue, 24. Aug 04, 11:41
Hm, ok - but I just dont get it...
What I want: do not start selling the product unless the factory has more than 50% in stock.
Configuring that 50% barrier was easy (Variable C%) - and pointless, too, because as soon as there is enough of the product to fill 30% of the CAGs cargo bay he runs off with it and the stock at the factory never goes near that 50% I want to hold back.
Even if I'd change that 30% to 100% he will start selling way before the factory stock reaches 50%...
So can it be done at all?

What I want: do not start selling the product unless the factory has more than 50% in stock.
Configuring that 50% barrier was easy (Variable C%) - and pointless, too, because as soon as there is enough of the product to fill 30% of the CAGs cargo bay he runs off with it and the stock at the factory never goes near that 50% I want to hold back.
Even if I'd change that 30% to 100% he will start selling way before the factory stock reaches 50%...
So can it be done at all?
-
- Posts: 22555
- Joined: Sat, 23. Apr 05, 21:42
This is tricky. Firstly, any input greater than 101 is converted to 101, so that 101% is indeed the max you can set. However,
Can WareCargo go over WareCargoMax2? Yes, if WareCargo2 is large, and WareCargoMax2 is small.
For example:
* Complex can hold 10.000 units.
* Ship can hold 2.000 units.
* Complex has 3.000 units.
=>
3.000 < 50% * 10.000, ie not near the ConC we want
101% * 2.000 = 2.020 << 3.000, ie ConD is true and ship hauls.
If the ship could hold 5.000 units, then the Complex should have at least 5.100 units before ConD is true (as 102 is the first value greater than 101% in integer math), and by that time ConC (Complex over 50%) is true too.
Thus, if the ship is not big enough, you have to calculate at what stock level the ConD=101 starts hauling and perhaps increase the ConC to compensate.
And if the ship is small, there is nothing you can do, but it will leave at least 2% of $WareCargoMax2 into the station (with ConD=101).
One more quirk: CAG sells. It will not load more than what is can sell to destination, based on the free stock of the destination at the moment of loading. Thus, even if a Dolphin SF could load to full due to ConD, it might not do so, as not all NPC can buy that much.
Ahh, so many numbers ...
(or is it
)
Code: Select all
( $WareCargo * 100 / $WareCargoMax2 ) > $ConD
For example:
* Complex can hold 10.000 units.
* Ship can hold 2.000 units.
* Complex has 3.000 units.
=>
3.000 < 50% * 10.000, ie not near the ConC we want
101% * 2.000 = 2.020 << 3.000, ie ConD is true and ship hauls.
If the ship could hold 5.000 units, then the Complex should have at least 5.100 units before ConD is true (as 102 is the first value greater than 101% in integer math), and by that time ConC (Complex over 50%) is true too.
Thus, if the ship is not big enough, you have to calculate at what stock level the ConD=101 starts hauling and perhaps increase the ConC to compensate.
And if the ship is small, there is nothing you can do, but it will leave at least 2% of $WareCargoMax2 into the station (with ConD=101).
One more quirk: CAG sells. It will not load more than what is can sell to destination, based on the free stock of the destination at the moment of loading. Thus, even if a Dolphin SF could load to full due to ConD, it might not do so, as not all NPC can buy that much.
Ahh, so many numbers ...


Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.
Insanity included at no extra charge.
There is no Box. I am the sand.
-
- Posts: 644
- Joined: Tue, 24. Aug 04, 11:41
-
- Posts: 1
- Joined: Sun, 10. Aug 08, 00:12
I'm trying to use the CAG as a jumpdrive-using alternative to the station manager, but I think I've found a bug. When I ask my CAGs for a report, the station credit balance requirement (set by 3-2-x) is given as "null" credits. I've tried setting this to 100, 100000 etc. but it always stays "null." My CAGs also refuse to come off standby but I assume that's caused by the null-credit problem. Using different saves, ships or stations doesn't fix it. I only installed X3 about a week ago, and I have all the latest patches and the latest version (3.1.07) of the Bonus Package. Other bonus package scripts (e.g. the station manager) seem to work fine.
Anyone encountered this before? Should I try to reinstall the bonus package or is there another fix?
Anyone encountered this before? Should I try to reinstall the bonus package or is there another fix?
-
- Posts: 15
- Joined: Tue, 21. Feb 06, 20:24
This might have been asked before (and I apologise if it has as I can't find the answer).
I use the satellite limited UT script, which renames the your advanced satellite to adv trade beacon.
The CAG uses different names for it's varient of this. I am wondering where I could edit the names of the satellites so that they both work of the same logic?
Thanks
---
OK with the help of Exscriptor, I found the point where the changes could be made. However the file type is .pck and Exscriptor can only save as xml. Anyone know if changing the type causes problems?
I use the satellite limited UT script, which renames the your advanced satellite to adv trade beacon.
The CAG uses different names for it's varient of this. I am wondering where I could edit the names of the satellites so that they both work of the same logic?
Thanks
---
OK with the help of Exscriptor, I found the point where the changes could be made. However the file type is .pck and Exscriptor can only save as xml. Anyone know if changing the type causes problems?
-
- Posts: 13
- Joined: Sun, 27. Apr 08, 21:27
CAG is ignoring its locked goods list
Hello all,
I have a couple of CAG TS's set up, all leveled up.
They're all assigned to the player HQ and all are locked to 3 different goods.
However, each of them completely ignore their locked goods list and are now bringing in stuff like 120MJ shields and what not (because that's also in the HQ's wares list).
Any idea what's causing this? I'm going limit the storage space for each and every good to 0, will probably work as a workaround, but even then it is sort of odd.
I do have the "Apprentice or higher: Resources are bought when stock is below A% (default 80%) " set to 100%, though.
I have a couple of CAG TS's set up, all leveled up.
They're all assigned to the player HQ and all are locked to 3 different goods.
However, each of them completely ignore their locked goods list and are now bringing in stuff like 120MJ shields and what not (because that's also in the HQ's wares list).
Any idea what's causing this? I'm going limit the storage space for each and every good to 0, will probably work as a workaround, but even then it is sort of odd.
I do have the "Apprentice or higher: Resources are bought when stock is below A% (default 80%) " set to 100%, though.
-
- Posts: 22555
- Joined: Sat, 23. Apr 05, 21:42
Re: CAG is ignoring its locked goods list
First of all, do not create a new thread for a topic/script/mod that already has a thread.
I hope you do mean "for each ship, locked every ware except the three that they are supposed to trade"?shadowcode wrote:They're all assigned to the player HQ and all are locked to 3 different goods.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.
Insanity included at no extra charge.
There is no Box. I am the sand.
-
- Posts: 669
- Joined: Sun, 6. Jul 08, 20:16
shadowcode, you probably did what i did when i got my PHQ... lol
choosing the lock ware option locks the pilot from using that ware, not locks the pilot to only use that ware.
personally i dont use CAGs on a PHQ cos they cause more problems than they solve. especially if you're not currently building anything
tho a quick work around is set NPC trading off, and set all the max price of the weapons to as low as possible, your CAGs wont be able to wonder off and waste your money then!
doesnt work so well with ammo tho, cos some places still sell at the lowest price.
or you can go through all the wares locking the weapons but it takes a while.
choosing the lock ware option locks the pilot from using that ware, not locks the pilot to only use that ware.
personally i dont use CAGs on a PHQ cos they cause more problems than they solve. especially if you're not currently building anything
tho a quick work around is set NPC trading off, and set all the max price of the weapons to as low as possible, your CAGs wont be able to wonder off and waste your money then!
doesnt work so well with ammo tho, cos some places still sell at the lowest price.
or you can go through all the wares locking the weapons but it takes a while.
Cosmic Spacehead
Twitch.tv/cosmic_spacehead
Twitch.tv/cosmic_spacehead
-
- Posts: 669
- Joined: Sun, 6. Jul 08, 20:16
CAG Problem
hey all, i was gonna ask this on the CAG page, but its locked (in 2006 lol)
so i'll start a new one!
for some reason, all my freighter pilots wont use there jump drives, i've got 3 at that level and they all keep pottering about without jumping.
they've all got jump drives, triplex scanners, boost extentions.
but they wont jump, its annoying cos i cant increase my complexs range until they do start jumping or they'll be wondering through pirate territory.
i'm running XTM 7.3, on 2.5 with the lastest bonus pack, plus these scripts
Apricot PHQ Mod :: Apricotslice :: Yes :: 1 :: 21/10/2007
Arena :: LV :: Yes :: 1.4 :: 19/09/2007
Bounty Boost :: LV :: Yes :: 1.1 :: 19/09/2007
Cargo Delivery Service :: Klaatu :: Yes :: 1.04 :: 30/06/2006
Convoys :: LV :: Yes :: 1.1 :: 19/09/2007
Crystal Free SPP :: Anarkis Federation :: Yes :: 1.01 :: 04/11/2006
Dock TS :: LV :: Yes :: 1.1 :: 12/09/2007
Escort :: LV :: Yes :: 1.71 :: 13/10/2006
Freight Transporter Upgrade :: LV :: Yes :: 1.3 :: 03/10/2006
Jumpdrive Delivery :: LV :: Yes :: 1.5 :: 10/02/2008
LV's Cheats :: LV :: Yes :: 1.4 :: 17/09/2007
Player Response Fleets :: LV :: Yes :: 1.1 :: 12/09/2007
Race Response Fleets Final :: LV :: Yes :: 1.7a :: 30/12/2007
Shield Boost :: LV :: Yes :: 1.1 :: 19/09/2007
Stevio Fab Supplier :: Stevio :: Yes :: 3.02 :: 30/05/2007
Stevio Shipyard :: Stevio :: Yes :: 2.00 :: 30/05/2007
Stevio Weapons Dealer :: Stevio :: Yes :: 2.10 :: 30/05/2007
Xai Corporation Advanced Money Transfer (AMX) :: Dr Xavia :: Yes :: X3.1.0 :: 02/04/2007
XaiCorp. Station Upgrades Framework :: Dr Xavia :: Yes :: X3.1.0 :: 10/07/2006
Xtended Mod Scripts :: The Xtended Team :: Yes :: 0.7.3 :: 03/09/2007
they used to work fine in my old game, they just dont any more, n i have no idea why.. lol
do you think reinstalling the bonus pack may help?
so i'll start a new one!
for some reason, all my freighter pilots wont use there jump drives, i've got 3 at that level and they all keep pottering about without jumping.
they've all got jump drives, triplex scanners, boost extentions.
but they wont jump, its annoying cos i cant increase my complexs range until they do start jumping or they'll be wondering through pirate territory.
i'm running XTM 7.3, on 2.5 with the lastest bonus pack, plus these scripts
Apricot PHQ Mod :: Apricotslice :: Yes :: 1 :: 21/10/2007
Arena :: LV :: Yes :: 1.4 :: 19/09/2007
Bounty Boost :: LV :: Yes :: 1.1 :: 19/09/2007
Cargo Delivery Service :: Klaatu :: Yes :: 1.04 :: 30/06/2006
Convoys :: LV :: Yes :: 1.1 :: 19/09/2007
Crystal Free SPP :: Anarkis Federation :: Yes :: 1.01 :: 04/11/2006
Dock TS :: LV :: Yes :: 1.1 :: 12/09/2007
Escort :: LV :: Yes :: 1.71 :: 13/10/2006
Freight Transporter Upgrade :: LV :: Yes :: 1.3 :: 03/10/2006
Jumpdrive Delivery :: LV :: Yes :: 1.5 :: 10/02/2008
LV's Cheats :: LV :: Yes :: 1.4 :: 17/09/2007
Player Response Fleets :: LV :: Yes :: 1.1 :: 12/09/2007
Race Response Fleets Final :: LV :: Yes :: 1.7a :: 30/12/2007
Shield Boost :: LV :: Yes :: 1.1 :: 19/09/2007
Stevio Fab Supplier :: Stevio :: Yes :: 3.02 :: 30/05/2007
Stevio Shipyard :: Stevio :: Yes :: 2.00 :: 30/05/2007
Stevio Weapons Dealer :: Stevio :: Yes :: 2.10 :: 30/05/2007
Xai Corporation Advanced Money Transfer (AMX) :: Dr Xavia :: Yes :: X3.1.0 :: 02/04/2007
XaiCorp. Station Upgrades Framework :: Dr Xavia :: Yes :: X3.1.0 :: 10/07/2006
Xtended Mod Scripts :: The Xtended Team :: Yes :: 0.7.3 :: 03/09/2007
they used to work fine in my old game, they just dont any more, n i have no idea why.. lol
do you think reinstalling the bonus pack may help?
Cosmic Spacehead
Twitch.tv/cosmic_spacehead
Twitch.tv/cosmic_spacehead
-
- Posts: 16999
- Joined: Mon, 5. Mar 07, 22:03
-
- Posts: 669
- Joined: Sun, 6. Jul 08, 20:16
ah, that might be it.. thanks!
i knew i posted in a cag thing somewhere, but its not on my "your posts" section... very odd!
thanks
i knew i posted in a cag thing somewhere, but its not on my "your posts" section... very odd!
thanks

Cosmic Spacehead
Twitch.tv/cosmic_spacehead
Twitch.tv/cosmic_spacehead
-
- Posts: 22555
- Joined: Sat, 23. Apr 05, 21:42
Re: CAG Problem
No, this CAG thread has not been locked, and No you don't. It would violate forum rules.cale_online wrote:hey all, i was gonna ask this on the CAG page, but its locked (in 2006 lol)
so i'll start a new one!

-
- Posts: 669
- Joined: Sun, 6. Jul 08, 20:16
sorry and thanks!
it random appears in my posts again now.. lol

Cosmic Spacehead
Twitch.tv/cosmic_spacehead
Twitch.tv/cosmic_spacehead
-
- Posts: 13
- Joined: Sun, 27. Apr 08, 21:27
Re: CAG is ignoring its locked goods list
Woops, did check the rules but must've missed that one.jlehtone wrote:First of all, do not create a new thread for a topic/script/mod that already has a thread.I hope you do mean "for each ship, locked every ware except the three that they are supposed to trade"?shadowcode wrote:They're all assigned to the player HQ and all are locked to 3 different goods.
Right. I feared that it would be something like that but I couldn't imagine why you would want to lock certain goods out where one would assume most players would want to have a trader lock on a specific collection of goods.
Well, good to know then

Is there any other way? Maybe I'll just modify the CAG script to turn it into an inclusion rather than exclusion list.
-
- Posts: 22555
- Joined: Sat, 23. Apr 05, 21:42
Re: CAG is ignoring its locked goods list
There is at least one insane way ...shadowcode wrote:Is there any other way?
Buy a Trade Dock and add the 9 wares. Set CLS1 haul those wares from PHQ to Dock. Set the CAGs to sell from Dock (each with 6 locked wares). Small stock sizes and all, not very nice, is it?
CAG was made way before PHQ, for factories. The default is that CAG trades all wares, and that is very logical for a factory (and even for complex). In that usage, protecting single wares from CAG is more logical. For example the Distillery: you want to trade both resources, and only the product is "hands off".
But just in case, check the unsigned version of CAG. It might have one or two extra configuration options. You have to visit german S&M to find it. They call it HVT.
[Edit] Yes, unsigned CAG 3.4.07 does have toggle to turn "locked" into "shopping-list".
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.
Insanity included at no extra charge.
There is no Box. I am the sand.