Buy from a Specified factory script.

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

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

Tudders
Posts: 408
Joined: Tue, 6. Apr 04, 10:58
x3

Buy from a Specified factory script.

Post by Tudders »

I want to be able to tell my ships to buy from a SPECIFIC factory of my own to ensure my transports don't buy from one factory only when theirs two in that sector.

For example, in Ore Belt i have two silicon mines to provide silicon for two crystal fabs but as one of the silicon mines is closer to thenorth gate they only ever buy from that mine, even if it is empty and the other is full.
User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek »

look on the external scripting sites for raskor's buy ware replacement script.
that's what you want.
"Nature's first green is gold" . . . stay golden.
Torzi
Posts: 25
Joined: Thu, 29. Apr 04, 21:44
x2

Post by Torzi »

the problem is with the "find station: product" command. First off, it seems to disregard the amount parameter, so even if your factory is empty, it'll still return it if it has the lowest price around. Second, it'll only return one result, no matter how many times you call it. I'm pretty sure it just gives up as soon as it finds one, even if it wasn't the best.

you could always just bump up the price on the empty mine a few credits, and leave the price on the full one lower. but i agree, a replactment would be a better solution (and less bothersome).

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