[BONUS Plug-In] Advanced Trade Command Software MK1

The place to discuss scripting and game modifications for X²: The Threat.

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

Post Reply
ticaki
Posts: 4861
Joined: Wed, 6. Nov 02, 20:31
x3

[BONUS Plug-In] Advanced Trade Command Software MK1

Post by ticaki » Tue, 10. Aug 04, 19:06

(note: this script used to be named BPH Upgrade Kit Mk1, so it will be referred to by this name throughout much of this thread)

Another signed script is ready for download!

Download: your personal downloadpage

Current: 1.40.04
Latest changes:
ship will now sell when trade with other races set to no
script now uses extended ship information add-on, details can be found here

added by Burianek:
[Link to unofficial BPH FAQ]
ReadMe wrote:BPH Upgrade Kit Mk1

How to Install:

Extract all scripts files into the scripts folder
Extract all the speech data (xx0943.pck) into the /t folder.
Extract the ReadMe to the Egosoft folder (eg c:\Program Files\Egosoft). You can create a shortcut to it on your desktop if you wish to review it regularly. We would strongly recommend you do this!

After installation, upon starting a new game or loading a saved game, a new item, BPH Upgrade Kit, will be available for purchase from all Boron equipment docks.

How and Why to Use BPH:

There are a number of reasons why I have created the BPH Upgrade Kit, the main one being that there are some things I feel are wrong with the EGOSOFT scripts (for example buy ware for best price) such as :

1. If you assign two freighters to transport the same product, they will both fly to the same target station.

2. Each freighter may only transport one resource or ware.

3. If two freighters are told to sell the station's product, they may both fly to the same target station. The first will sell for the correct price, but then the second will also sell at this station even though the price has now dropped.

4. You will only notice damaged freighters by accident or by checking your ships regularly.

5. Freighters will sometimes only buy 5 crystals and ignore a factory with 40 crystals in the same sector, because the price at the trading station was better.

6. You have to make a note of the products freighters are carrying incase you need to replace them (because of destruction by Khaak attacks or pirate attacks etc). This is because the message log only carries the name of the freighter and where it was killed.

Taking the above issues into account, I have created the BPH Upgrade Kit Mk1 to do the following :

1. BPH freighters check if the station is already targeted by another BPH freighter with the same homebase. If a factory is already being targeted by another freighter, it will choose another one. Two BPH freighters with the same homebase will never target and fly to the same factory.

2. BPH freighters may transport all of the possible wares at their homebase. They do not need to have individual wares assigned. However, if the player wants to prevent the freighter from trading in certain wares, individual wares can be prohibited. (this has been possible with the help of Gothik’s SDS script. If you find this to your liking, I can code further products based on this!)

3. BPH freighters will check if the ware is still available for the right price after entering each sector. If the ware is no longer available for the right price, they will choose another factory.

4. BPH freighters that have suffered damage during flight and have less than 85% hull will fly to the next Shipyard (Wharf, Showroom, Dockyard etc) and report to you from there.

5. If resources are rare, BPH freighters favour the factory with the greatest number of products. They will not start a trading run for anything less than 4 products available, the reason being by the time the Freighter gets there the factory will more than likely be sold out anyway.

Because of the points above, the freighter name and location/homebase in the Message Log are now enough.


What advantages will you have through using BPH? :

1) Less freighters have to be bought (eg a Mosquito Missile factory will go from using 3-4 to 1-2)

2) All freighters will stay in optimal condition ( No freighter flies around with 20% hull)

3) You always reach optimal profit! Because for example, now that the freighter can change destination mid-trip, EC's are more often sold for maximum.

4) All factories in the vicinity are emptied consistently, remain well stocked and so the demand also stays well balanced.

How to use the BPH extension:
1) Buy the BPH Upgrade Kit for your freighter,
2) Assign a homebase,
3) Open the trading menu,
4) Select (start) BPH extension,
5) Forget it.

Or
To prohibit the freighter from transporting certain wares:
1) Select the BPH - Goods Prohibited menu item.
2) Enter the total number of goods to prohibit this freighter from transporting (e.g. enter 2 if you want to stop the freighter from transporting both Ore and Energy Cells) The input help will read 'Anzahl der zusperrenden Waren' this is German for 'Number of prohibited wares'.
3) Choose the first type of product to prohibit. (e.g. first select Ore) the help line will read 'Gesperrte Ware' this is german for 'Prohibited ware'.
4) The command will finish, but you are not done yet!
5) Repeat several times to prohibit multiple wares (always enter the total number of prohibited wares first, and then choose the next ware to prohibit from the ware list)
6) After all wares to be prohibited are selected, Start the BPH extension

Specific example:
For a freighter assigned to a Mosquito missile factory, if we wanted to prohibit Ore and energy:
1) Select BPH - Goods Prohibited
2) Enter 2 to represent the total of two wares to be prohibited.
3) Select Ore as the first good to prohibit.
4) Reissue the BPH - Goods Prohibited command.
5) Again enter 2 to represent the total of two wares to be prohibited.
6) Select energy as the second and last good to prohibit.
7) Now issue the (start) BPH - extension command.

The freighter will now not attempt to transport ore or energy.

To clear the list of prohibited wares, and allow the freighter to trade all possible wares again:
1) Select the BPH - Goods Prohibited command.
2) Enter 0 to tell the freighter that 0 wares are to be prohibited.
3) Select any ware in the ware list that appears, it does not matter which.

Special Items:
BPH freighters may be assigned to trading stations / equipment docks once they reach experience level 4. They will never sell when working for a trading station / equipment dock, regardless of experience level.
It is advisable to pay attention to which sector the BPH has been activated in because different races pilots may behave differently when confronted with pirates and other enemy threats.
Your pilots are also quite particular about payment of pilots fees and expenses. If you don’t do so, your pilot will leave you after a period of time, which is understandable since he has to earn a living as much as you do.
Should you have no money in your factory account to pay the BPH Pilot, through lack of attention or simply lack of willingness to pay, your pilot will wait with his ship until funds have been deposited into the factory account, -ignoring any lucrative orders that may be available at that time. After payment your pilot will start immediately… well, he might finish drinking his coffee first, ok?
Pilots will not land in stations in sectors containing khaak fighters, except Khaak M5 vessels because these aren't really a threat to either your pilot or your freighter.

Please note:
- Because of the fact that player trading stations / equipment docks have only one price to set buying and selling prices, BPH frieghters will only purchase wares for (selected price - 1). For example, if you want your freighter to buy crystals for 1684, you must set the price on trading stations and equipment docks to 1685. This prevents the station from selling the goods for the same price that the freighter purchases them. This does not apply to regular factories.
- While in the process of a trading run to purchase a ware, the BPH freighter will find a new target station if the price of the ware at the current target rises more than 20% (even if it is still under the acceptable maximum price limit) This is done to insure that your BPH freighters are always seeking to purchase for the lowest possible prices.
- BPH Freighters will never target a factory that has no money or no free cargo space (when selling too that factory). This will usually apply to player owned Factories since stock levels and pricing works differently for the AI.
- BPH freighters will keep buying stock until the Factory has no credits left to buy goods with. At this time the Freighter will send the player a message informing him of the lack of credits in his factory. Once a factory is fully stocked the available credit ballance in the factory stabilizes and behaves normally.


The BPH freighter pilots charge the following for their services:
10cr + level *2 = cost per transit through each gate
50cr + level *4 = cost for each trading run
200cr = costs for each jump using the jumpdrive


Levelsystem

Level 1
The freighter checks all resources that he can buy. Before this, he only checks the resources which are running low in the factory.

Level 2
Prevents multiple BPH freighters with the same homebase from targeting and flying to the same station.
The cargo of all homebase freighters will be taken into account when determining how many wares are needed.
The pilot will respond to demand more urgently and hence a better supply will be provided when resources are rare.

Level 3
The freighter flies to the nearest shipyard if its hull is damaged and sends a message.

Level 4
The pilot will not land at stations in sectors where Khaak are currently active. (excluding M5s)
Can be assigned to a player owned Trading Station or Equipment Dock.
The freighter may make multiple purchases before returning to the homebase.

Level 5
On the way home, stations on the way are visited as well.

Level 6
The freighter will now also try to sell the station's product.
Note: It is possible to use the goods prohibited command to prevent a level 6 BPH freighter from selling the station's product. Simply select the station's product as the ware to be prohibited. This may be useful if you are making weapons, etc. to supply your own fleet and do not want the BPH freighter to sell them!

Level 7
The pilot will respond to more urgent demands with the use of the jumpdrive (if installed).

Level 8
The Pilot will always use a Jump Drive (if installed) when he has to travel distances greater than 1 sector.
Please note: If you would prefer your freighters do not use a Jump Drive then please do not fit one to your freighters.
The cost to use a Jump drive may make some factories unprofitable.

(c) by Ticaki
Original German translation by Ruwen
English revised edition by IvanT, Burianek & giskard
Last edited by ticaki on Tue, 4. Jan 05, 22:26, edited 9 times in total.

Pollo Loco
Posts: 188
Joined: Thu, 26. Feb 04, 19:02
x2

Post by Pollo Loco » Tue, 10. Aug 04, 19:09

looks alright but can you explain basically what it does in simple English, for me at least, please?!?
Laptop Restart (At Uni): X-treme Difficulty.
Status: .
Trade: %
Combat: %

Back to basics.

Asfaloth[D6a]
Posts: 22
Joined: Tue, 28. Jan 03, 21:26
x2

Post by Asfaloth[D6a] » Tue, 10. Aug 04, 19:14

it develops your freighter AI, just like the Gala Trader but this script is for factory freighters :)
"Nicht aus jedem Affen hat ein Mensch werden können." - Branca Crncevic

brohawk
Posts: 63
Joined: Sat, 24. Apr 04, 23:04
x3

Post by brohawk » Tue, 10. Aug 04, 19:15

How does the pilot gain levels?

Pollo Loco
Posts: 188
Joined: Thu, 26. Feb 04, 19:02
x2

Post by Pollo Loco » Tue, 10. Aug 04, 19:16

Asfaloth wrote:it develops your freighter AI, just like the Gala Trader but this script is for factory freighters :)
Ah, thanks. I just can't cope with really long posts. :)
Laptop Restart (At Uni): X-treme Difficulty.
Status: .
Trade: %
Combat: %

Back to basics.

ouch
Posts: 462
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by ouch » Tue, 10. Aug 04, 19:22

sounds cool but I would like to protest the exclusion of khaak m5's.

simply because they have numbers for for what they lack in thier firepower and strength.

sometimes my frighters get attacked by 10 or more of these things. a lowly GIRE is not going to save him. (my 5 ody's will though :) )

also it would be cool if they stocked up on fighter drones like the sector trader scripts.
Please fix the AI Egosoft! I'm sick of losing ships(doesn't matter what class) when they fly into what they are attacking! This occurs even if the object is stationary and doesn't have any protrusions.(Like a pirate base) It's just sad, and it totally ruins the entire concept of the series!

Asfaloth[D6a]
Posts: 22
Joined: Tue, 28. Jan 03, 21:26
x2

Post by Asfaloth[D6a] » Tue, 10. Aug 04, 19:24

the pilots lvl increases while hes making profit, no profit no lvl :wink:
"Nicht aus jedem Affen hat ein Mensch werden können." - Branca Crncevic

Greyhawk1
Posts: 5331
Joined: Mon, 22. Mar 04, 20:21
x3tc

Post by Greyhawk1 » Tue, 10. Aug 04, 19:27

Kinda takes the fun out of trading for me. But anyway I'm sure someone out there would appreciate this script. Pity none of the AI facts can use these scripts.

khanis
Posts: 703
Joined: Tue, 3. Feb 04, 23:49
x2

Post by khanis » Tue, 10. Aug 04, 19:35

It isnt showing up in the Kingdom End equipment dock. Found it in Rolk's Fate though.

Tyepo
Posts: 352
Joined: Sun, 25. Jul 04, 20:57
x2

Post by Tyepo » Tue, 10. Aug 04, 19:35

Soooo, its kinda like a beefed up SDS that costs you money per run?

LoneNomad
Posts: 82
Joined: Sun, 7. Mar 04, 14:23
x2

Post by LoneNomad » Tue, 10. Aug 04, 19:36

Would this script then solve the problem of two ships selling your stations product to the same station? Would it make them go to separate stations?

Or is it obly for buying resources for your station?

khanis
Posts: 703
Joined: Tue, 3. Feb 04, 23:49
x2

Re: [SIGNED] BPH Upgrade Kit MK1

Post by khanis » Tue, 10. Aug 04, 19:50

ticaki wrote: After installation, upon starting a new game or loading a saved game, a new item, BPH Upgrade Kit, will be available for purchase from all Boron equipment docks.
This is not true. I have thus far found that both Kingdom End and Great Trench do not have the software. Havent checked the far south sectors yet.

EDIT: I withdraw my comments: apperently the software had not come in stock yet in those docks.

Spark
Posts: 504
Joined: Sat, 27. Mar 04, 20:47
x2

Post by Spark » Tue, 10. Aug 04, 19:58

*.pck? Speechdata in /t folder? No such thing in this file. You mean menu text or some such?
What are you saying, Ticaki?

ticaki
Posts: 4861
Joined: Wed, 6. Nov 02, 20:31
x3

Post by ticaki » Tue, 10. Aug 04, 20:00

LoneNomad wrote:Would this script then solve the problem of two ships selling your stations product to the same station? Would it make them go to separate stations?
yes
Spark wrote:*.pck? Speechdata in /t folder? No such thing in this file. You mean menu text or some such?
What are you saying, Ticaki?
*ups* I mean the 440943.xml, sry

Greets ticaki
Last edited by ticaki on Tue, 10. Aug 04, 20:06, edited 1 time in total.

Jha'dur
Posts: 1211
Joined: Sun, 21. Mar 04, 17:13
x2

Post by Jha'dur » Tue, 10. Aug 04, 20:02

Does BPH freighters both buy and sell resources then, except in the case of trading stations\equipmnet docks?

Soundes like a godsend for my trading station, I'll have to try it. Problem being to get the traders to lvl 4, snce I only have one factory, a certain wheat farm.
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Tue, 10. Aug 04, 20:23

Jha'dur wrote:Does BPH freighters both buy and sell resources then, except in the case of trading stations\equipmnet docks?

Soundes like a godsend for my trading station, I'll have to try it. Problem being to get the traders to lvl 4, snce I only have one factory, a certain wheat farm.
Is it in a GOOD location though :)
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

Thermopylae
Posts: 217
Joined: Tue, 13. Jan 04, 16:07
x2

Post by Thermopylae » Tue, 10. Aug 04, 21:29

christ...you can virtually choose the location :P

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Tue, 10. Aug 04, 21:39

Thermopylae wrote:christ...you can virtually choose the location :P
Yeah, if you buy one :)
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

Jha'dur
Posts: 1211
Joined: Sun, 21. Mar 04, 17:13
x2

Post by Jha'dur » Tue, 10. Aug 04, 21:59

Roger L.S. Griffiths wrote:Is it in a GOOD location though :)
Not really. The wheat sells at top prize, but the ecells aren't as cheap as I'd like them to be. At least not in the sector, and I don't want the transport to leave, it'll only get lost. But still:

Does BPH freighters both buy and sell resources then, except in the case of trading stations\equipmnet docks?
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++

veelad
Posts: 1747
Joined: Wed, 5. Nov 03, 11:16
x3tc

Post by veelad » Tue, 10. Aug 04, 22:36

ooops nearly missed it, another signed script to play with :D

nice one :thumb_up:

Post Reply

Return to “X²: The Threat - Scripts and Modding”