[SCR] Commercial Agent [2010-04-28 X3TC 3.3.03]

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

marcusdavidus
Posts: 155
Joined: Fri, 29. Oct 04, 12:31
x2

Post by marcusdavidus »

Awesome Script
I run Super complex ( by cc 60 + self sustained factorys in ore belt ) + HQ , 3 CLS are deliver products from my complex to HQ) like 30 kilometers or so :P than few Major Dealers jump around univers in Mistrals with 15000 cargo and sell tons of plankton microchips and everything wha left. Few CAG's fly in pieco's and buy what i need to build items in hq. i using Ware manager
but i found one problem . is there a way to disable selling product on hq? cuz i found that hell of NPC sit in my base and uy crafting materials . Station got prices on auto. when i run nly small complex with 3 cags by time i make terran plot i check secondary acount and lool 200 m by 1 day . CAGS ROX BTW i found that they can sell any amount of plantkon im runing x 20 plankton when i produce Spices only on x 5 so i make huge amount extra plankton and wtf spice factory always yelowish cuz no plankton becouse cags fly with 15 k cargo full of it :P .. GJ

maybe This talened script writer make real hq managment script :P
CreepyD
Posts: 47
Joined: Wed, 6. Nov 02, 20:31
x4

Post by CreepyD »

I have a slight problem..
Most of my traders's shield are oddly down at 20MJ (should be 50MJ).
They look like they are trying to go up, but are stuck at exactly 20,000 when I look in their stats. Oh and 1 ship which should have 25MJ shield, has exactly 10MJ while flying about.
It only happens to some ships (most).
Shield go to full when they dock, and immediately lower to 20MJ when they leave.
Sometimes a ship will have full 50MJ shields for 1 sector, then it goes back down to 20MJ when they change sectors.

This sound familiar to anyone?
This only applies to ships using CAG.
CreepyD
Posts: 47
Joined: Wed, 6. Nov 02, 20:31
x4

Post by CreepyD »

I've never edited scripts until now.. I've changed 1 line in the "admin" part of the script so when you run CAG on a ship, it puts that pilot at level 6 "Economist".
Basically my universe is waaaay to harsh a place for ships not to be using the JJ.
It works perfectly, but magically, every time I reload the game, the script is back as if I never touched it. So I have to edit it every time I load the game.
Is this normal? Do I have to do something to keep the changes permanently?
I should add it's only for my personal use and is awesome other than the above post!
User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan »

CreepyD wrote:It works perfectly, but magically, every time I reload the game, the script is back as if I never touched it. So I have to edit it every time I load the game.
Is this normal? Do I have to do something to keep the changes permanently?
Lucike distributes his script-files packed in .pck-file format. The script editor saves the scripts in .xml-file format, but X³:TC prefers packed ones before unpacked ones.

So pack your .xml version of the script into .pck (with a program like 7-zip ... pck is gzip-compression if i remember right) and replace the original with it or simply delete Lucike's original .pck version of the script, so your .xml version is the only one left. You can find the script-files in the ./scripts-directory of your X³:TC installation.

After doing one of both ways, your version of the script should be automatically loaded.
CreepyD
Posts: 47
Joined: Wed, 6. Nov 02, 20:31
x4

Post by CreepyD »

Aaah awesome, thanks!
Only that weird shield problem left then.
NewEonOrchestra
Posts: 106
Joined: Sat, 26. Dec 09, 23:42
x3tc

Post by NewEonOrchestra »

Okay, a couple quick questions...

1. Is there an English thread/version for the required libraries? I feel hesitant to try and install scripts without knowing precisely how.

2. I need this script to be used in combination with Dockware Manager so I can keep my PHQ properly stocked. Does a Major Dealer trader have, essentially, the same task as a MKII trader with the "buy ware for best price" command from the vanilla game, but it able to gather not just one type of ware but every type required in the PHQ?

Thanks.
User avatar
Saetan
Posts: 3223
Joined: Wed, 1. Feb 06, 19:26
x4

Post by Saetan »

NewEonOrchestra wrote:1. Is there an English thread/version for the required libraries? I feel hesitant to try and install scripts without knowing precisely how.
There isn't yet. Actually I'm waiting for his permission to release the (nearly complete) translated SRS topic ... I may ask him for permission for a libraries topic with links to his other scripts too.

To answer your question: The libraries only contains basic features needed for most of Lucike script's, like the Pilot Union. The installation is exactly the same as of all other script's by Lucike. Simply unpack into your X³:TC directory. All script- and language-files should be placed in the proper ./scripts- or ./t-directories automatically.


NewEonOrchestra wrote:2. I need this script to be used in combination with Dockware Manager so I can keep my PHQ properly stocked. Does a Major Dealer trader have, essentially, the same task as a MKII trader with the "buy ware for best price" command from the vanilla game, but it able to gather not just one type of ware but every type required in the PHQ?
CAG are able to buy and to sell different resources, intermediate products and products. But you are also able to black- or whitelist different wares, sectors or even stations I think. They are able to use the jump drives. They are able to call the Rescue Service (part of the SRS) for emergency if attacked. They are able to use an ejection seat if their ship is destroyed.
All that depending from their rank and their settings. Just see the manual for more detailed information.

CAG also includes basics of station- and complex-management like credit transfers to the player (to other stations I'm not sure) and also to an additional account which can store huge amounts of credits. Also it supports automatic pricing and de-/activation of single factories in complexes.
User avatar
Alee Enn
Posts: 2575
Joined: Sat, 28. Mar 09, 16:03
x4

Post by Alee Enn »

Why hasn't this script been included in X3TC ?
It's in Reunion's bonus pack, so it's known to Egosoft & been signed off, So why not in X3TC ?

Please forgive me if this has already been answered,
just refer me to which page number it's on and I'll look myself.

I tried looking through this thread, but after 6 pages of "He just sits there on stand-by" & "Log analysis please", and not wanting to look through another 31, so I thought I'd ask.

BTW - thank you Luckie for one of the most popular scipts in Reunion & Terran Conflict.
Lord Dakier
Posts: 3258
Joined: Fri, 8. Dec 06, 13:45
x4

Post by Lord Dakier »

Quick question, I have a CAG set to sell my crystals however hes just sitting there on standby. I'm pretty sure I've gone over everything.

Set it to shopper
Increased the sell product to 100%
Changed the cargo bay size to 90% however the ships a M4 Mako.
Stations pricing has been set correctly

I've had to set it to the vanilla sell for best price commands. It makes little difference as I expect the stock in crystals to never be on a shortage however, I find CAG more reliable.
User avatar
cattafett
Posts: 886
Joined: Thu, 30. Aug 07, 00:40
x3tc

Post by cattafett »

not sure but i think shopper only buys stuff
try salesman or trader (i think)and is he of the right rank
Courier for products and Trader if the crystals are intermediate products
those UFOs you hear about are just what you tried to explaine to me going over my head
Advanced Complex-Hub you know you need it Catta Fett's D.O.G.S Vanilla safe mod collectionyou don't need them but you want them
Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings
Rapier
Posts: 11377
Joined: Mon, 11. Nov 02, 10:57
x3tc

Post by Rapier »

This may be a known issue, I've only looked back to August last year, but yesterday I caught one of my CAG's using the broken gate in Brennan's Triumph. Not really a huge problem, considering they are capable of gateless jumps but worth noting if it hasn't been already.
Rapier - The Orifice of all Knowledge

Godwin's Law is not one of the Forum Rules.
Search just the forum with Google
User avatar
Alee Enn
Posts: 2575
Joined: Sat, 28. Mar 09, 16:03
x4

Post by Alee Enn »

I have a question I don't think has been asked or answered,

Why does my CAG keep flying to get Energy Cells from SPP's when it already has some in it's hold (but not full) and no money in the factory to buy more ?

Here are what I've got the Trader Duties set to (as I think that's where the problem is) :
Trade Duty - Trader
Purchase Resources - 100%
Sell Products - 0%
Sell Products Freighter Cargo Bay - 100% (I have tried changing this to 20% & 80% but it made no difference)
Purchase Intermediates - 100%
Sell Intermediates - 100%
Purchase Station Credit Limit 0cr

The station is full of product which it doesn't sell much of (I'd like it to sell more)

Any help please ?
Alien.
Formerly "Alien Tech Inc."
TalonDragon
Posts: 4
Joined: Sat, 20. Mar 10, 14:30
x4

Post by TalonDragon »

I've been trying to figure out where I've been going wrong in the settings for my new CAG but have failed to get the desired result, so here's the puzzle I've been trying to solve:

I have a 14-station self-sufficient complex which sells 5 end products and requires no incoming resources.

My goal is to have some CAGs do these things:
- Sell any excess intermediate products over 80% in stock.
- Sell any excess end products over 40% in stock. (So I can use the place as a one-stop shop for my own new fighters)

What is currenyly happening is the CAG empties the end product stock completely and I've noticed it occationally sells intermediate products even though there's less then 80% in stock.

The CAGs training level is 'Major Dealer'
It's trading duties are set to:

Trading duty (Salesman)
Purchase resources (0%)
Sell products (40%)
Sell products freighter cargo bay (0%) ** I've also tried 100% and 101% here
Purchase intermediate products (0%)
Sell intermediate products (80%)
Purchase station credit balance (0 credits)
Quit working in home base (No)

Any idea's where I'm going wrong?
User avatar
Alee Enn
Posts: 2575
Joined: Sat, 28. Mar 09, 16:03
x4

Post by Alee Enn »

@TalonDragon,
Have you seen this in the instructions in the 1st post ?

Sell Products Freighter cargo bay
The Agent will sell products, if it can fill its cargohold at least to this level. In this case, the Agent will sell product even if the "Sell Products" requirement is not met. The rationale here is that it is more important to sell "sufficient" amounts than to wait for the product stock to fill up.

Hope this helps
Alien
Formerly "Alien Tech Inc."
TalonDragon
Posts: 4
Joined: Sat, 20. Mar 10, 14:30
x4

Post by TalonDragon »

@Alien ND

Yep, I read that, that's why I've been messing with the 'Sell Products Freighter cargo bay' setting in an attempt to get the CAG to wait until there's /excess/ products to sell.

These are the results I've got so far:
At 0% the CAG sells end products ASAP, empting the stock
At 100% the CAG sells intermediate products, ignoring the fact they're below 80% stock
At 101% the CAG sells end products once they've reached 40% in stock.. but it sells ALL of them, not just the excess stock above 40%
User avatar
Alee Enn
Posts: 2575
Joined: Sat, 28. Mar 09, 16:03
x4

Post by Alee Enn »

TalonDragon,
The way I read it (the following is an example) :
If you set Sell Products Freighter Cargo Bay to 100% - It will fill it's cargo hold to 100% even if that empties the factory.
If you set it to 80% - It will fill it's cargo hold to 80% even if that empties the factory.
If you set it to 10% - it will fill it's cargo hold to 10% even if that empties the factory.

So the solution it would seem is to find a % that fills it's cargo hold and leaves 40% in the factory.

Hope that helps (I too find the technicalities of the CAG script confusing :o )
Alien
Formerly "Alien Tech Inc."
TalonDragon
Posts: 4
Joined: Sat, 20. Mar 10, 14:30
x4

Post by TalonDragon »

Nice idea, unfortunately it won't work in this case:

IREs - 276 volume at full stock
PACs - 96 volume at full stock
PRGs - 32 volume at full stock
1 MJ Shields - 250 volume at full stock
MD Ammo - 832 volume at full stock

Total is 1486 volume, so even if The CAG (in a Mercury) could pick up and sell multiple products at the same time, it could still take everything in one fell swoop.

At the moment the setting is set to '101%' as that atleast makes the CAG wait until an end product fills up past 40%
exogenesis
Posts: 2718
Joined: Sun, 9. Sep 07, 15:39
x4

Post by exogenesis »

nm
Last edited by exogenesis on Thu, 15. Apr 10, 22:40, edited 1 time in total.
shadix
Posts: 4
Joined: Fri, 2. Apr 10, 17:02
x4

Post by shadix »

Hi, I might found a bug.

Beginning with a random hangs, i realized that the game hangs at same "play time". when I turn off the CAG Script, the hangs suddenly disappeared. After hundreds of reloading, i "might have" found the cause.

I have a Power Plant XL, with 40 TS running CAG supplying and selling the products. One time, the primary resource is depleted, so 3 of my TS searching for it. Mean while, about 25+ TSes have returned to the station and docked (CAG on Standby), while others are returning back. The problem begins(game hangs) when the others are closing to the station. Maybe because they're trying to dock but the station is full.

This also happens on my ore mine M with 10 TSes..
senzou
Posts: 2
Joined: Tue, 6. Apr 10, 18:36
x3tc

Post by senzou »

i seem to have a problem getting this script to run. configuration menu etc work but the agent doesnt seem to do anything.

ive got a complex with 2 plankton M factories and he is supposed to get new energy cells which he doesnt do. station does have cash in its account and i think ive got the configuration right.

you can find his log here http://pastebin.com/6bgKx6Yq

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