[S] [06.08.06] [X3 3.2.00] Commercial Agent

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

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

User avatar
Lucike
Posts: 12969
Joined: Sun, 9. May 04, 21:26
x4

[S] [06.08.06] [X3 3.2.00] Commercial Agent

Post by Lucike » Thu, 23. Mar 06, 00:37


Commercial Agent
(Version 3.2.00 - August 06, 2006)


Overview Commercial Agent
  • The Commercial Agent buys resources quit cheap and sells products at high prices. He approaches factories, trade stations and equipment docks.
  • The Commercial Agent buys intermediate products produced too little in complexes and sells an overproduction.
  • The Commercial Agent cares about the complete line of goods of the homebase. However single goods can be locked for him.
  • The Commercial Agent holds on to the purchase and terms of the management strictly and realizes change as quickly as possible. Purchase and selling conditions can be transmitted to him up to the smallest detail.
  • The Commercial Agent arranges things with his colleagues, which target stations are approached. This applies to the homebase colleagues as well as also to the sector colleagues.
  • The Commercial Agent pays attention to the financial situation of the homefactory and starts a clearing of the store at too low funds.
  • The Commercial Agent changes his route in the flight if he stumbles about a special offer in the aim sector. Are very important to firm customers in his, though.
  • The Commercial Agent can handle the jump drive and keeps his ship in good condition.
  • The Commercial Agent is always an open-minded contemporary and keeps in touch to customers and colleagues of other strange enterprises steadily. He can therefore calculate the prices better and what goes in front of himself in distant sectors gets. He is not a fighter and avoid and report sectors in those of enemies was reported.
The individual abilities of the commercial agents are available depending upon training course participation.


Preparation Commercial Agent

Downloading

-> Commercial Agent (Version 3.2.00)
-> Needed Libraries (You must install this!)

-> Recommended Shiptools (Pilots move, hire or fire / delete homebase)

-> Files in XScriptManager Format (Commercial Agent, Libraries, Shiptools)


Installation using the script editor

The X³ Script Editor has to be activated for this extension. To activate the script editor follow the following steps:
  • enter the menu to change your pilot's name
  • type Thereshallbewings (note the capital T) and press enter
  • the menu will close, your player name will NOT have been changed, and a confirmation beep will sound on correct activation
  • you will now find the "Script Editor" menu item in the command console
  • Save your game now and leave X³
Extract the directory structure into the X³ installation directory. Start X³ and load your previously
saved game afterwards. Activating the script editor causes your save to be marked as "modified"
which can not be removed by normal means.


Installation without activating the script editor

In the case that the script editor is active, several ingame menus are showing additional information about scripts and the script engine. Since this may disturb a player you may use another method to use unsigned scripts without the use of the script editor. You have to modify the scripts for that. It does not prevent your game from becoming modified.

Open the file "setup.plugin.com.agent.xml" with any text editor. Notepad, which is a included in MS Windows®, can be used without problems. You must not use MS Word® or MS WordPad® because the file is encoded in UTF 8 which is not supported by these programs. Notepad will not cause any problems with this encoding.

You have to change the following lines in the script file, but the only change is the insertion of an exclamation mark. After applying the changes, save the file.

Change:
<name>setup.plugin.com.agent</name>
to
<name>!setup.plugin.com.agent</name>

<codearray>
<sval type="array" size="10"><sval type="string" val="setup.plugin.com.agent" …

to
<codearray>
<sval type="array" size="10"><sval type="string" val="!setup.plugin.com.agent" …


Save the file now and quit notepad. You have to rename the file now by inserting an exclamation mark at the beginning.

C:\Games\X3 - Reunion/scripts/setup.plugin.com.agent.xml
to
C:\Games\X3 - Reunion/scripts/!setup.plugin.com.agent.xml


Instruction Commercial Agent

Overview

The Commercial Agent has the task, for the contract products within the contract field transmitted to him or circle of customers' businesses bill and on behalf of the enterprise to mediate and to execute out.

The Commercial Agent is developed in the own enterprise and tasks are assigned to him more more and more with the time. If an education is particularly wished by the enterprise, then the Commercial Agent receives a trade computer expansion.


Quick start guide
  1. Equip a TS class transporter with Navigation Software MK1, Trading System Extension, Trade Command Software MK1 and MK2
  2. Assign a homebase
  3. Choose the command "Start Commercial representation"
Additional pilot qualifications

Apprentice
The apprentice cares about the receipt of goods of the enterprise, means the purchase of goods. The apprentice is in the probationary period and no salary gets for this reason.
Auxiliary courier
The auxiliary courier does only not care about the receipt of goods but also around the sale of goods of the enterprise, means the sale of goods. Furthermore he can buy or sell goods of or on equipment docks and trade stations. He can these stations also are attached. The auxiliary courier gets 20 credits at a mizura flytime paid off after every flight.
Courier
The courier cure arranges things with his home and sector colleagues and is with them in permanent communication. Furthermore he ship with more speed and agility buy he be fight drones and equip out in the current sector. The courier cure gets 25 credits at a mizura flytime paid after every flight.
Freighter pilot 2nd class
The freighter pilot 2nd class worries not only about products and resources, separates also around the intermediate products of a complex. It can likewise buy and sell these. Furthermore he can use the modern jump propulsion technology. The freighter pilot 2nd class gets 30 credits at a mizura flytime paid off after every flight.
Freighter pilot 1st class
The freighter pilot 1st class gets information about the financial situation of the enterprise and therefore can carry out a clearing of the store at too low funds. Furthermore he takes more into account the trade radio traffic and does not approach any sectors in which was reported by enemy ships or pirates. The freighter pilot 1st class gets 35 credits at a mizura flytime paid off after every flight.
Freighter pilot
The freighter pilot already asks about new trade possibilities during the purchase or selling flight and takes care of these if possible in the current flight. Furthermore he keeps his ship in good condition and this flies in the need into a shipyard. The freighter pilot gets 40 credits at a mizura flytime paid off after every flight.


Equipment and requisites
  • A ship belonging to the small ship class (M5, M4, M3, TS, TP) or a ship of the corvette class (M6)
  • Boost Extension (optional: increase needed jumpdrive energy from 10% to 20% of cargospace)
  • Duplex- and Triplex-Scanner (optional: increase the minimum jump distance to one sector)
  • Trading System Extension (optional: if you wish a training session)
  • Trade Command Software MK1
  • Trade Command Software MK2
  • Fight Command Software MK1 (optional: change the behaviour at contact with the enemy)
  • Navigation Software MK1
  • Jump drive (optional: can use after a special training session)
Usage

The trade order is started over the trade menu. The command "Start Commercial representation" gets visible if the ship the Navigation Software MK1, the Trade Command Software MK1 and MK2 in the ship are installed as well as a station as a homebase is assigned to.

In principle, the pilot cares about the complete line of goods of the factory or the factory complex. However, single goods can be locked for the pilot. The block will executed with "Ware lock/unlock" about the command Slot of the ship. To the start of this command a product which shall be locked or unlocked still must be indicated.

The command "Configuration" which also can be found in the command slot offers another configuration possibility. With this order an overview can among others be requested. Here a list of all possible orders.

Input - {0} {0} {0}
The pilot sends an overview of his stored data. Also previous salary, flying time and income are obvious in the overview.
Input - {0} {1} {X}
The pilot adds additional information to the name of the ship. (X = 0 Informationservice deactivate; X = 1 additional Informations)
Input - {0} {4} {X}
The pilot transfers the transaction data of every transaction to the company server. (Logfile 8001). (X = 0 deactivate; X = 1 activate)
Input - {1} {0} {0}
The pilot deletes all his operating data.
Input - {1} {1} {0}
The pilot deletes his achievements overview.

With the command "Configuration" the sell and buy conditions also can be sent to the pilot. Here a list of all possible orders.

Input - {2} {0} {1}
The pilot doesn't fly to own factories and stations.
Input - {3} {0} {2}
The defaults are to the pilot sends.

A pilot of level apprentice buys resources at a stock level below A% (standard 80%) and a station bank balance of about B Credits (standard 30,000 credits). A pilot of level auxiliary courier otherwise skips the purchase and goes over to the sale. This also applies to the case that he cannot buy any resources in the surroundings.

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).

A pilot of level freighter pilot 2nd class buy intermediate products at a cargo storage below F% (standard 10%) and a station bank balance higher then B Credits (standard 30.000 credits). He otherwise skip to buy intermediate products.

A pilot of level freighter pilot sells intermediate products at a cargo storage higher G% (standard 80%).

Input - {3} {1} {A}
Input - {3} {2} {B}
Input - {3} {3} {C}
Input - {3} {4} {D}
Input - {3} {5} {E}
Input - {3} {6} {F}
Input - {3} {7} {G}

The pilot takes the jump radius fixed in the station for the aim determination. Of course the starting point is the sector of the homestation. This starting point can be moved.

Input - {4} {X} {Y}
The pilot takes the starting point with coordinates X; Y as jump radius. (Sectormap by Sveno)


Further information

Unusual Features: At the first start be no product on board except for the homeproducts, installed weapons and shields, rockets of all possible classes, fight drones and jump energy.

Jump drive: If a jump drive is used, then the pilot supplies himself even with jump energy from the homestation. He buys jump energy also outside. If both scanner (duplex/trip lex) installed the pilot undertakes a neighbour sector jump. Only a jump normally is undertaken if at least a sector lies between this. However, the scanner performance itself is not increased.

Enemy contact: If the freighter has the Fight Command Software MK1, then the pilot starts to make his ship more for certain. He buys fight drones in the current sector and equip his ship with more speed and agility. If the experienced pilot can in addition have a jump drive, then he ventures also into unsafe sectors.

Important: The pilot works for a complex and his complex is changed during his work, it then finishes his work and waits for perhaps new instructions.


Technical Data Commercial Agent

Language file
448001.xml (ID 8001)
498001.xml (ID 8001)

Command slot
COMMAND_TYPE_TRADE_03 (403)
COMMAND_TYPE_CUSTOM_00 (700)
COMMAND_TYPE_SHIP_03 (1203)
COMMAND_TYPE_SHIP_04 (1204)

Object task
Task 0 and 25

Official abbreviation
"die HVT"
"the CAG"

Translator
Blacky_BPG
Lucike

Many thanks to Blacky for the help to translated this description. :)


Changes Commercial Agent

Downloading

-> Commercial Agent (Version 3.2.00)
-> Commercial Agent (Version 3.1.12)
-> Commercial Agent (Version 3.1.11)
-> Commercial Agent (Version 3.1.10)
-> Commercial Agent (Version 3.1.09)


Changes

09.04.2006 (Version 3.1.10)
  • All goods, which the pilot cannot unload in the home station, are included now with the next route.
  • The pilot inserts information now in the ship name at the beginning of his route and after each flight.
  • Player-owned factories and stations can be locked for the pilot.
  • Some configuration attitudes changed.
17.04.2006 (Version 3.1.11)
  • Pilots flew to trade station, although there were no combat drones to buy there.
  • Errors in the flight routine and the pertinent jump energy procurement corrected.
24.04.2006 (Version 3.1.12)
  • There was a problem with the colleague routine.
  • With a large jump radius the computing time was simply too large.
03.06.2006 (Version 3.2.00)
  • Pilots stop, if the destination station were diminished during the flight.
  • Pilots want to buy fight drones, although no loading space is free.
  • In some cases pilots in complexes do not sell intermediate products.
14.07.2006 (Version 3.2.00 II)
  • Flight routine divides and into module way again together set.
  • Separated from reasons for performance some program segments from the main script.
  • In cases in those pilots their loaded sales commodity not to sell could do perhaps came it to hanging the game.
21.07.2006 (Version 3.2.00 III)
  • Purchase by fight drones improved and the selling of own fight drones prevented.
  • Colleague arrangement revises and refines.
  • At the performance screw turned.
06.08.2006 (Version 3.2.00 IV)
  • At the performance screw turned.

< Keywords: ScripterLucike, Script, Commercial Agent, Loop, Logistic, supply, automatic buy sell >
Last edited by Lucike on Mon, 21. Aug 06, 00:50, edited 1 time in total.

User avatar
DoHi
Posts: 279
Joined: Fri, 22. Apr 05, 02:37
x3tc

Post by DoHi » Wed, 5. Apr 06, 12:49

This seem to look a little difficult to use. I am using Naffarins Station Trader and don't like the pilots working for free. If someone could help explain it to me in slightly better, non-technical english I may trade in Naffarins script.
The Truth is Out of Style.

User avatar
Lucike
Posts: 12969
Joined: Sun, 9. May 04, 21:26
x4

Post by Lucike » Wed, 5. Apr 06, 13:49

Hi DoHi,

is completely simple and I am here. ;)
Quick start guide
  1. Equip a TS class transporter with Navigation Software MK1, Trading System Extension, Trade Command Software MK1 and MK2
  2. Assign a homebase
  3. Choose the command "Start Commercial representation"
That's all. In the first time the CAG buy resources. When the CAG learn the handling with goods then he can sell products. (~2h flight time)

Perhaps you can test that first times with one freighter.

Gruß
Lucike
Image

Lethal Mitch
Posts: 423
Joined: Sat, 27. Dec 03, 18:11
xr

Post by Lethal Mitch » Fri, 14. Apr 06, 01:43

Thinking of giving this one a try as well, I like the look of it.

Just a question if I may.........

Would the CAG also sell to Equipment docks, a weapon or shield, that the dock doesn't actually stock? i.e like the player can.

User avatar
Lucike
Posts: 12969
Joined: Sun, 9. May 04, 21:26
x4

Post by Lucike » Sat, 15. Apr 06, 07:55

Lethal Mitch wrote:Would the CAG also sell to Equipment docks, a weapon or shield, that the dock doesn't actually stock? i.e like the player can.
Yes, the player can, but only the player. Only the player should be able to do that.

Greets
Lucike
Image

Dropbear1967
Posts: 29
Joined: Sat, 27. May 06, 07:26
x3

Post by Dropbear1967 » Wed, 7. Jun 06, 06:55

Hello

When I install your script using the script installer package, I notice there is new software to be bought at the TERRACORP HQ called

SS_WARE_SW_NEW6
SS_WARE_SW_NEW7

Could you please let me know what the proper names for this software is, so I know which one to buy?

Thanks

Lethal Mitch
Posts: 423
Joined: Sat, 27. Dec 03, 18:11
xr

Post by Lethal Mitch » Wed, 7. Jun 06, 15:40

Hi Dropbear;

You have something wrong there. Did you install the 3 packages there is to install?

Also this doesn't sound like the Commercial Agent but the CLS script by the same author, which also has 3 packages to install. The software, libraries and shiptools.

The Commercial Agent doesn't have any software to buy IIRC.

Hope that helps.

Dropbear1967
Posts: 29
Joined: Sat, 27. May 06, 07:26
x3

Post by Dropbear1967 » Fri, 23. Jun 06, 13:37

Hi!

yes sorry my mistake..

I am testing this script and from the looks of it the pilot does not prefer player owned stations when purchasing resources. It would be good if this could be modified.

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Post by Hieronymos » Thu, 6. Jul 06, 23:08

Lucike,
will Commercial Agent work with the DDRS player shipyard (which needs specific resources/products to construct ships)?

Also, FYI, Naffarin--author of Station Trader v1.25a--has announced his withdrawl from the X3 community over the Starforce copy protection issue--but has endorsed your Commercial Agent software as "..the best trading script." This is why I'm going to load your script up tonight. Am very grateful you release it in .spk format.

Thanks,
Hieronymos

P.S. It is assumed that there is a correct order for installation of all three portions of the script?

And if so, why do you not bundle them all together in one package?
Last edited by Hieronymos on Fri, 7. Jul 06, 00:38, edited 1 time in total.

Emerald Flint
Posts: 2566
Joined: Wed, 1. Mar 06, 12:11
x3

Post by Emerald Flint » Thu, 6. Jul 06, 23:24

Commercial Agent may work, but i didn't test it, the logistic software of lucike works fine with DDRS ...

Greetz
EF
Only the dead ones have seen the end of war. Plato

"Warnung: Frachtraum enthält nun... Argon Eins" :gruebel:

Master! Apprentice!

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Post by Hieronymos » Fri, 7. Jul 06, 00:52

So Commercial Agent works well with Trading Stn's and Eq Docks?

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Can't Get Script to Work

Post by Hieronymos » Tue, 11. Jul 06, 05:25

Installed Commercial Agent over the weekend, all 3 parts (in German) in .spk format. Had been using Naffarin's Station Trader v1.25a, which I disabled before installing Lucike's script. In-game AL settings showed all 3 parts enabled, and freighters were loaded with all needed prerequisites + homebase---but nothing happened!! The complexes filled up with product, resources gradually emptied...the traders all showed 'commercial representation' as their current order, but they remained idle. Re-ordered the command, but nothing. Eventually went back to Naffarin's script.

So what am I doing wrong here? Anybody got any ideas?

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Tue, 11. Jul 06, 05:47

H, I have both running, but the problem I'm having, is out of my hundred or so transporters, I can't find the commercial agent ones... lol. I thought they would be identified in the Property manager. Any idea how to do that? Nafarrins is great, and I have not seen any conflict between the two, but likewise, I can't seem to notice if my commercial agents are doing anything.

xCav8r
Posts: 18
Joined: Tue, 6. Dec 05, 05:51
x3

Re: Can't Get Script to Work

Post by xCav8r » Mon, 14. Aug 06, 18:24

Hieronymos wrote:Installed Commercial Agent over the weekend, all 3 parts (in German) in .spk format. Had been using Naffarin's Station Trader v1.25a, which I disabled before installing Lucike's script. In-game AL settings showed all 3 parts enabled, and freighters were loaded with all needed prerequisites + homebase---but nothing happened!! The complexes filled up with product, resources gradually emptied...the traders all showed 'commercial representation' as their current order, but they remained idle. Re-ordered the command, but nothing. Eventually went back to Naffarin's script.

So what am I doing wrong here? Anybody got any ideas?
I'm in the same boat. I recently installed this script, but I've not been able to get my freighters to do anything. They don't move at all. When they're located somewhere other than the homebase, I see the homebase flash as the destination, but they don't actually go home or move anywhere.

Lucike, is it possible that some files could be missing from the library? I've seen references in the CLS thread to xml files that I didn't get. For example, I don't have anything that contains "move to" in the file name. (I've installed all three .spk files linked to from the first post in this thread.)

Anyway, what information can I provide to help troubleshoot this?

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Post by Hieronymos » Tue, 15. Aug 06, 02:34

Lucike no longer seems to be maintaining the script. I've heard from folks I trust that this script, or previous versions of it anyway--is simply the best. Unfortunately, I've had to fall back on Naffarin's excellent Station Trader v1.25a, also currently unsupported.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 15. Aug 06, 03:05

its because the newer version of it is currently getting signed

xCav8r
Posts: 18
Joined: Tue, 6. Dec 05, 05:51
x3

Post by xCav8r » Wed, 16. Aug 06, 00:36

Thanks for the reply then; I'll await a new release. In the meantime, the English description is a bit hard to understand. Can anyone who has used this shed any light on how it differs from Naf's Station Trader (besides the pilots being paid, of course)?

Hieronymos
Posts: 830
Joined: Fri, 30. Dec 05, 22:14
x3

Post by Hieronymos » Wed, 16. Aug 06, 02:10

I'm not sure, but it seems many if not most features are identical.

Burianek's and Aalaardb's "Station Manager" also has similar features, and may have superior pathfinding logic. But to my knowledge it doesn't equip station ships with and use J-drive.

Shanjaq
Posts: 353
Joined: Sat, 3. Apr 04, 09:47
x3

Post by Shanjaq » Wed, 16. Aug 06, 05:45

This sounds very useful, I'd love to use it but it looks like command SHIP_31 is in conflict with one of Anarkis Carrier Commands!
[ external image ]
SPACE HAS A TERRIBLE POWER

jumbled
Posts: 320
Joined: Mon, 28. Jun 04, 08:22
x4

Re: Can't Get Script to Work

Post by jumbled » Sun, 20. Aug 06, 03:59

xCav8r wrote:I'm in the same boat. I recently installed this script, but I've not been able to get my freighters to do anything. They don't move at all. When they're located somewhere other than the homebase, I see the homebase flash as the destination, but they don't actually go home or move anywhere.

Anyway, what information can I provide to help troubleshoot this?
What level are your freighter pilots at? Are they all 'newbie' pilots? If so, you'll need to level them up on a station that has resource import needs before they can go out to sell stuff. As they level up to max, they'll "learn" to sell things and later learn to buy/sell intermediate products as well as primaries.

When I start new pilots, I try to build them up by setting them to work on individual stations (usually buying energy or something) before moving them to complexes. But once they reach FP2 level, they'll show their usefulness with Jdrives and improved efficiency. A full ranked pilot also knows how to do several things at once on any single trip out. I've seen pilots come back with several resources at once after stopping at multiple stations along the way. :)

Locked

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