Looking for script to keep my factories running

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

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

gtfouts
Posts: 25
Joined: Fri, 19. Mar 04, 00:32
x3

Looking for script to keep my factories running

Post by gtfouts »

Here's what I am trying to find. I own a 25MW shield factory. I want to be able to have a ship parked there and have a script keep the factory empty of shields so it is constantly building them AND is also stockpiling them for me so when I start other things I will have the shields I need for my ships. Is there one out there that does this?

I would actually like that for many other factories, such as Drones, weapons, sat's and so forth when I start those factories going. Having to keep an eye out and do it all manually doesn't work to well when you are sleeping or working. And having a factory sitting idle cause it has a whopping 2 shields in it is such a waste....a little help!!...anyone?

GTFouts
gtfouts
Posts: 25
Joined: Fri, 19. Mar 04, 00:32
x3

Post by gtfouts »

Hmmm...and I was told this is the place to get an answer on this....oh well... :(
wwwolf
Posts: 102
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by wwwolf »

It might be easier to mod the factory and specify how much of a product could be in-stock before production stops.
User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 »

I've heard mention of this script several times, but not actually seen it.

maybe I should just write it :roll:
User avatar
M.Kessel
Posts: 1460
Joined: Wed, 13. Nov 02, 11:49
xr

Re: Looking for script to keep my factories running

Post by M.Kessel »

gtfouts wrote:Here's what I am trying to find. I own a 25MW shield factory. I want to be able to have a ship parked there and have a script keep the factory empty of shields so it is constantly building them AND is also stockpiling them for me so when I start other things I will have the shields I need for my ships. Is there one out there that does this?

I would actually like that for many other factories, such as Drones, weapons, sat's and so forth when I start those factories going. Having to keep an eye out and do it all manually doesn't work to well when you are sleeping or working. And having a factory sitting idle cause it has a whopping 2 shields in it is such a waste....a little help!!...anyone?

GTFouts
Simple scripting trick, easy to Programm.

Place an ship, that can transport the ware into the factory, running a script on the ship, that tries to fetch half of the produced ware all N minutes with load ware into his own cargo space.

Half of the ware, if you sell these things to externals. You can even unload the ware into the factory, if an defined minimum amount is not reached, so that your factory will be never empty for buyers. If you work with % it will fit on most of the factories, except the facztories with only 1 Space left.

In script lines, you will need only some lines of code for it, including the neccessary wait statement.

This is a nice scripting exercise even for scripting n00bs.

You will need the Wait command -> general section.
the load ware and unlaod -> trade section
Get true amount of Ware -> trade section -> ships and stations.
Get max. amount of ware -> trade section (Gives maximum possible Cargo space)

and some basic math from general section.

To bind that command into the menus, you should read the tutorials. :D

Greetings Mike.

P.S. I find this "trick" totaly normal, because I cannot understand, why an simple 125 MW shield would fit several times into an TS, but only 1 time into the cargo hold of an factory. Has high chances, to be an "official" script. Maybe someone can make a special ship -- 3000 Cargo space, 10 Speed, 5Mw Shield, 10000 Hull, no weapons -- for it.
I'm depressed

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