Bug with the BPH script

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

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

fchopin
Posts: 3625
Joined: Fri, 12. Mar 04, 13:38
x3

Bug with the BPH script

Post by fchopin » Fri, 27. Aug 04, 01:48

Bug with the BPH script.

BPH ships do not buy 125 MW shields, GPSGs, BPSGs and other weapons when home base is Equipment Dock or Trading Station.
When there are no more games it is time for music.

Hicky
Posts: 127
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Hicky » Fri, 27. Aug 04, 09:01

There was me just thinking they were lazy sods. I suffer with the same problem with 25MW, GPPC and GPSG.

fchopin
Posts: 3625
Joined: Fri, 12. Mar 04, 13:38
x3

Post by fchopin » Fri, 27. Aug 04, 10:37

I was testing my BPH last night and found that they buy food products but do not buy the big weapons like B and GPSGs and also 125 MW shields.
When there are no more games it is time for music.

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

Post by Spark » Fri, 27. Aug 04, 11:10

I suppose you checked the race settings?
Then maybe it has something to do with treshold percentages? Like with the SDS? With 2 weapons bought the cargohold is barely filled.
Just guessing.

fchopin
Posts: 3625
Joined: Fri, 12. Mar 04, 13:38
x3

Post by fchopin » Fri, 27. Aug 04, 11:40

Spark wrote:I suppose you checked the race settings?
Then maybe it has something to do with treshold percentages? Like with the SDS? With 2 weapons bought the cargohold is barely filled.
Just guessing.
I don't see what the race settings have to do with this, they buy food products from the same race so why should they not buy shields and Big weapons?

125MW Shields, BHEPTs, GHEPTs, BPSGs, GPSGs always come in 2s because thats the maximum hold.
When there are no more games it is time for music.

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

Post by Spark » Fri, 27. Aug 04, 11:55

Ok, just for the heck of it, why don't you set other races can trade(...) to "yes" and see what happens.....

And SDS has some algorithm - I think BPH has it too - which calculates if it's worthwhile to make the trip, calculated with cargohold, stock and a few other variabels.

fchopin
Posts: 3625
Joined: Fri, 12. Mar 04, 13:38
x3

Post by fchopin » Fri, 27. Aug 04, 12:03

I will have to try this tonight, i am working now.

But even if the AI do come and trade it is my own BPH ship that i want to see buying.
When there are no more games it is time for music.

KarlHemmings
Posts: 1940
Joined: Sun, 8. Feb 04, 19:04
x4

Post by KarlHemmings » Fri, 27. Aug 04, 12:17

From the BPH read me
"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."

If they will not start a run with less than 4 products available there are certain products they can never buy.....

thanakar
Posts: 364
Joined: Mon, 8. Mar 04, 20:36
x3

Post by thanakar » Fri, 27. Aug 04, 12:19

I have the same problems getting BPH traders to buy the high end goods. In my view the problem is the small stock number compared to the price of the item. The BPH trader doesn't feel the trade is worth the trip so they just don't go. I have no problem getting them to hunt down missiles and 1 mw shields.
Change is the only constant.

fchopin
Posts: 3625
Joined: Fri, 12. Mar 04, 13:38
x3

Post by fchopin » Fri, 27. Aug 04, 12:33

KarlHemmings wrote:If they will not start a run with less than 4 products available there are certain products they can never buy.....
But that meens they will never buy 125MW shields and other weapons because they only stock 2.
When there are no more games it is time for music.

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

Post by Spark » Fri, 27. Aug 04, 12:42

Thus a bug.
Can't try this out myself though, I don't have high end factories.
But I don't think it's a bug. It seems, that these scripts share the same libs, coming from the UT script. I suspect, that this specific behaviour is a part of these libs, which would make sense.
And if UT buys shields, so would BPH. That's why I stress you look at the race settings of your factories.
But.... You might be right!
Ok, back to work for me too. Till tonight.
Spark out.

fchopin
Posts: 3625
Joined: Fri, 12. Mar 04, 13:38
x3

Post by fchopin » Fri, 27. Aug 04, 12:43

Question for Developers and Dev people.
Is this the problem why the BPH ships do not buy 125MW shields and Weapons that stock only 2 per products?

Will the BPH ship buy a product with less than 4 in stock?
When there are no more games it is time for music.

Firedancer
Posts: 632
Joined: Wed, 13. Aug 03, 15:45
x3

Post by Firedancer » Fri, 27. Aug 04, 12:50

Spark wrote:Thus a bug.
Can't try this out myself though, I don't have high end factories.
But I don't think it's a bug. It seems, that these scripts share the same libs, coming from the UT script. I suspect, that this specific behaviour is a part of these libs, which would make sense.
And if UT buys shields, so would BPH. That's why I stress you look at the race settings of your factories.
But.... You might be right!
Ok, back to work for me too. Till tonight.
Spark out.

should be fairly easy to fix.... I guess the solution would be to script them use variable thresholds, based on default price of a ware.... e.g. I'd not be happy if my merchant ship heads out to buy 4 energy cells either.... it should be like a small table... default price 1-20.... buy 100 minimum, price 21-50... buy 50 minimum.....etc... and at prices >100000 it might also go for a single one.... I guess a simple if/elseif with 3-4 ranges should be plenty.

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

Post by ticaki » Fri, 27. Aug 04, 13:26

fchopin wrote:Question for Developers and Dev people.
Is this the problem why the BPH ships do not buy 125MW shields and Weapons that stock only 2 per products?

Will the BPH ship buy a product with less than 4 in stock?
Answer for the ppl

1.Yes 2.No :D
i will see, what i can do ;)
mhm... add a

Code: Select all

minValue = 0
skip if 5 < (max_cargo_space / 2) 
 minValue = 5
will do it

Greets ticaki
Zur Zeit nicht aktiv

thanakar
Posts: 364
Joined: Mon, 8. Mar 04, 20:36
x3

Post by thanakar » Fri, 27. Aug 04, 13:38

Well, something just happened that make me think there was no bug. One of my BPH Traders is going after a BPPC! I just hope he can get to the station before it is sold. The equipment dock is two sectors away and he is only level 4 :(
Change is the only constant.

fchopin
Posts: 3625
Joined: Fri, 12. Mar 04, 13:38
x3

Post by fchopin » Fri, 27. Aug 04, 13:53

ticaki wrote:
fchopin wrote:Question for Developers and Dev people.
Is this the problem why the BPH ships do not buy 125MW shields and Weapons that stock only 2 per products?

Will the BPH ship buy a product with less than 4 in stock?
Answer for the ppl

1.Yes 2.No :D
i will see, what i can do ;)
mhm... add a

Code: Select all

minValue = 0
skip if 5 < (max_cargo_space / 2) 
 minValue = 5
will do it

Greets ticaki
Thank's ticaki, I will wait for further developments.
When there are no more games it is time for music.

thanakar
Posts: 364
Joined: Mon, 8. Mar 04, 20:36
x3

Post by thanakar » Fri, 27. Aug 04, 15:02

fchopin wrote:
ticaki wrote:
fchopin wrote:Question for Developers and Dev people.
Is this the problem why the BPH ships do not buy 125MW shields and Weapons that stock only 2 per products?

Will the BPH ship buy a product with less than 4 in stock?
Answer for the ppl

1.Yes 2.No :D
i will see, what i can do ;)
mhm... add a

Code: Select all

minValue = 0
skip if 5 < (max_cargo_space / 2) 
 minValue = 5
will do it

Greets ticaki
Thank's ticaki, I will wait for further developments.
Are we supposed to add this ourselves to the script (if so which file) or is this a future planned update?
Change is the only constant.

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

Post by Spark » Fri, 27. Aug 04, 15:22

Back from work.
Fchopin, I certainly am glad, I left the possibility open, that you were right :D

fchopin
Posts: 3625
Joined: Fri, 12. Mar 04, 13:38
x3

Post by fchopin » Fri, 27. Aug 04, 15:26

Spark wrote:Back from work.
Fchopin, I certainly am glad, I left the possibility open, that you were right :D
Thank's Spark but i wish i ws wrong. :roll:
When there are no more games it is time for music.

fchopin
Posts: 3625
Joined: Fri, 12. Mar 04, 13:38
x3

Post by fchopin » Fri, 27. Aug 04, 15:28

thanakar wrote:Are we supposed to add this ourselves to the script (if so which file) or is this a future planned update?
I think there will be a future update!
When there are no more games it is time for music.

Post Reply

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