Xai Autotrader problem

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

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

User avatar
3iff
Posts: 1085
Joined: Thu, 23. Oct 03, 09:52
x2

Xai Autotrader problem

Post by 3iff » Wed, 28. Jan 04, 09:13

The autotrader does not like my Paranid 5Mw shield factory.

When ordered to autobuy, then ship just sits there. I don't think it will buy energy unless it offers to pay more than the selling price (not 100% sure about this).

I'll start at the beginning. I have a growing empire in Unknown Sector east of Wastelands. I sell energy to myself only for 13 credits. The shield factory does not seem to want to buy unless I set its buying price to 14.

BUT, it will not buy Sojahusk at all. Ore is delivered by the ore mine so the factory just sits there waiting for sojahusk (which is in short supply - but there is some available). The ship sits in the factory on command "Xai Auto Buy" (or something similar). I've tried auto buy/sell and auto buy options to no effect.

The script is working fine in all my other stations. This is the only one what won't play...

Any ideas? I'm currently using the default 'buy wares' which is an inconvenience as I need more ships but I can live with it...

User avatar
Faze
Posts: 1409
Joined: Wed, 6. Nov 02, 20:31
x2

Post by Faze » Wed, 28. Jan 04, 11:34

I think theres a glitch in some of the sectors so that ships cant seem to see a good trade.

Having same problem in Light Water.

:p
:p
:p
No point in running.
You will just DIE tired!


Light travels faster than sound. This is why some people appear bright until you hear them speak !

User avatar
3iff
Posts: 1085
Joined: Thu, 23. Oct 03, 09:52
x2

Post by 3iff » Wed, 28. Jan 04, 12:39

This is not autotrading, this is supplying my factories with goods.

I do have autotrading problems (in Resv of Tranquility where a ship picks up silicon and can't sell it all) but those are not relevant here.

astroturf
Posts: 26
Joined: Wed, 26. Nov 03, 00:12
x2

Post by astroturf » Wed, 28. Jan 04, 16:58

I have a case with Xai auto buy/sell that never starts buying when my spp has no energy or crystals in Herons, the north sector of argon prime. The strange thing is that it works great for the silicon mine in the same sector...

User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV » Wed, 28. Jan 04, 18:09

the issue is around foodstuffs mainly.


all my crystal fabs keep running out of foodstuffs


example :-

4890 energy
1 nos oil
203 silicon

the ship just tries to either fetch energy or silicon.

or the ship tries to sell ware when the factory is out of energy :)




save game available to author if he wants a look :)
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses

User avatar
Rakeris
Posts: 407
Joined: Wed, 31. Dec 03, 04:25
x4

Post by Rakeris » Thu, 29. Jan 04, 03:15

I'm having a few problems with it to I have 32 factories and only 3 will not work the transports just sits there and do nothing even when there are pleanty of good trades around.

I hope Xia Corp fixes this soon.

mr_south
Posts: 35
Joined: Wed, 31. Dec 03, 19:00
x2

Post by mr_south » Thu, 29. Jan 04, 03:30

Sorry for the late response. I was out of town and haven't been able to access Internet. Thanks for xSiNx to notify me about this thread.

And thank you for the feedback. They seem pretty weird to me, as I haven't had a single similar problem so far. I will definitely want to find out the cause. A game save would be a perfect help. If you can provide a save with the exact moment those problems occurs, please PM me. Don't send the file via email. My box is way too small to hold such a huge game save.

I would still be pretty busy the coming days, so please bear with me if I cannot response quickly. Thanks a lot!

User avatar
Rakeris
Posts: 407
Joined: Wed, 31. Dec 03, 04:25
x4

Post by Rakeris » Thu, 29. Jan 04, 03:41

I have had the problems with a Split 1 MW shield fact. a Paranin crystal fab. and a Argon SPP
hope this helps. What I think is strange is only 3 out of all of my factories do it. I tryed to change ships price and nothing worked.

Hope you get it fixed.

User avatar
3iff
Posts: 1085
Joined: Thu, 23. Oct 03, 09:52
x2

Post by 3iff » Thu, 29. Jan 04, 09:07

Further investigation...same problems as LV.

Started a new factory (a shield factory I think) and the first thing a transport wanted to do was sell shields. Fortunately, ships from the supply factories were able to sell stuff to this factory.

Another thing. An SPP was loaded with energy (4500) and cash and out of crystals so it wanted to sell energy. In this situation it should be buying crystals in preference to selling energy.

Apart from these niggles it's still a great script.

User avatar
rhohltjr
Posts: 310
Joined: Sat, 13. Dec 03, 21:27
x3tc

Xai problem of mine.

Post by rhohltjr » Thu, 29. Jan 04, 18:24

My Xai Trading problem: The menu has the first 2 items displayed normally. The 3rd and 4th menu items,
the ones where you can install remote and uninstall remotely show: Display_Text.?.?. I think maybe I am
overwriting the scripts?

I am attempting to use 1. XaiCorp Trade
2. Station Accountant 3.?
3. Modified XaiCorp Jumpdrive 2.0
4. Patrol 2.0

Thought I placed everything in the right script or 't' folder. :?

Ideas? :?
Didn't we used to have the ability to block people on this forum that annoy us?

mr_south
Posts: 35
Joined: Wed, 31. Dec 03, 19:00
x2

Post by mr_south » Fri, 30. Jan 04, 00:53

I am starting to see a potential problem now. The shield factories seem to be the most problematic ones. My quick guess is that the ships get confused by their own shields and the factory product. I will look into it.

But, I don't have a clue on the SPPs yet. I have one in Herran's Nebula and it's making me good money...

About the missing menu items, it's probably caused by the conflict with Station Accountant 3.0. Since 3.5 is out and saying it will work with Xai.TMK1 now. So, I suppose 3.0 didn't. :wink: Please try the 3.5 and let me know if the problem is solved. In the mean time, I would like to dig into the lazy TP problem first. Thanks.

xSiNx
Posts: 114
Joined: Wed, 3. Dec 03, 18:37
x3

Post by xSiNx » Fri, 30. Jan 04, 02:59

3iff wrote:Another thing. An SPP was loaded with energy (4500) and cash and out of crystals so it wanted to sell energy. In this situation it should be buying crystals in preference to selling energy.
Don't forget the script takes available buyers and sellers into account.. In the case you're mentionning here, perhaps nobody was willing to buy your energy cells at the price you set so it went to crystals...

Alex.

mr_south
Posts: 35
Joined: Wed, 31. Dec 03, 19:00
x2

Post by mr_south » Fri, 30. Jan 04, 04:11

OK, I interrogated those pilots that work for the shield factories, and they confessed they tried to get some quick cash by secretly selling their TP's own shields... :D

Now, seriously, it's my bad that I used the wrong command from two really confusing ones. If a ship has the same kind of shield as the factory, it will treat it as the product as well and try to sell it immediately.

As for the real lazy TP problem, I still cannot find anything wrong with the script on that. Yet I do have a theory here. But before I explain, please try the following experiment on your problematic factories:

If the factory doesn't buy a particular resource,
1) Set the not-buying-resource price to min.
2) Set all other resources price to max.
3) Set the product selling price to max.

If the factory doesn't sell the product,
1) Set all resources price to max.
2) Set the product price to min.

Wait for a while and see if the lazy TPs are still sitting.

My thoery is:
A new feature in Xai.TMK1 is to let a ship buy other resources or sell product, if no buyer can be found for the most needy resource. Once a decision is made, the ship will not have second thought until it reaches the destination, even if during that time, some stations start selling the most needy resource.

This may look strange, but I would consider it better than it was in FATE, because in FATE, the ship will just sit still until the most needy resource is available. (It's very arguable though.)

An ultimate solution for this is to re-evaluate the situation frequently when it's flying. We are actually working on this now, but there's a big technical issue: balancing between the AI and the game performance. We don't want to consume too much processing power for this.

Please let me know if any of these info help. Thanks.

User avatar
3iff
Posts: 1085
Joined: Thu, 23. Oct 03, 09:52
x2

Post by 3iff » Fri, 30. Jan 04, 09:29

Mr_South

You could be right about the shields thing as the ship servicing my 5Mw factory has a 5Mw shield on it. I shall try to experiment with the problem. I'm sure there's a spare 25Mw shield somewhere that I can substitute. I could even remove the shields completely.

You're right to be worried about decreasing performance by making the script do more checking. I have about 90 ships using the Xai auto buy/sell and the system can get very slow at times (not due to the script) so I wouldn't want it any slower...

Thanks again for all your efforts.

xSiNx
Posts: 114
Joined: Wed, 3. Dec 03, 18:37
x3

Post by xSiNx » Fri, 30. Jan 04, 10:04

mr_south wrote:An ultimate solution for this is to re-evaluate the situation frequently when it's flying. We are actually working on this now, but there's a big technical issue: balancing between the AI and the game performance. We don't want to consume too much processing power for this.
If it comes to that adding a couple if carefully placed waits should fix any problem...

Alex.

mr_south
Posts: 35
Joined: Wed, 31. Dec 03, 19:00
x2

Post by mr_south » Sat, 31. Jan 04, 05:33

Anyone has tried the experiment?

I have fixed the shield fact problem, and also added the mass remote install on all TP/TS command. So, if there's no more nasty bugs found yet, I would like to release a minor update this weekend.

astroturf
Posts: 26
Joined: Wed, 26. Nov 03, 00:12
x2

Post by astroturf » Sun, 1. Feb 04, 05:16

I figured the problem out, the buy portion of the script only appears to look in the current sector for prices. So, if it should be buying and not selling and there are no sources of in the current sector at or below your current buy maximum, it stalls when it should travel to other sectors.

mr_south
Posts: 35
Joined: Wed, 31. Dec 03, 19:00
x2

Post by mr_south » Sun, 1. Feb 04, 06:35

astroturf wrote:I figured the problem out, the buy portion of the script only appears to look in the current sector for prices. So, if it should be buying and not selling and there are no sources of in the current sector at or below your current buy maximum, it stalls when it should travel to other sectors.
Oh? I will appreciate it if you would tell me where exactly (line number) does it do that? Because as I can see, it's actually trying to buy from close station first(yet within price range); if it's not successful, it will try to buy from further station until it reaches the max jumps limit.

astroturf
Posts: 26
Joined: Wed, 26. Nov 03, 00:12
x2

Post by astroturf » Sun, 1. Feb 04, 22:53

didn't look at the script, only the behavior, when using the script, if a spp has no energy sells and no crystals, with crystal price set at 1684, it will sit idol when 1 sector away there are crystals for that price.

Side note, all crystal sources in the current sector are more than the max price.

Last but not least, my max jumps are set to 1 which, do they need to be set at 2 to get 1 sector away? I am not sure as the max jump doesn't seem to ever behave like I think it should....

Something else that is strange, if I set max jumps to 4, then it will work and go 1 sector away and get crystals.
[EDIT] Never mind on the last sentence, my transport is stuck in the station wanting to sell again, I have jumps set to 6 and 1 sector away there is a station with 15 crystals @ 1684 when my max is 1800.

mr_south
Posts: 35
Joined: Wed, 31. Dec 03, 19:00
x2

Post by mr_south » Mon, 2. Feb 04, 03:23

Hi, astroturf. From what you have described, it really doesn't make any sense, yet I am completely unable to reproduce the similar problem. So, would you be kind enough to send me your game save so that I can have something to work on? Otherwise I'm completely lost.

Also please check out the following thread, to see you have seen the same behaviour.
http://www.egosoft.com/x2/forum/viewtopic.php?t=22501

Post Reply

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