Station StockPiler [4/7/05]

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

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

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Station StockPiler [4/7/05]

Post by Xenon_Slayer »

Station StockPiler Verson 0.7 *Merroc*

By OML

*Warning* This will only work with an altered economy as it relys on 1.4 factory data.

This trade script is to broarden station capacity by loading wares to ships during production. This includes Products and Reasources.
There are two settings. Product stockpile and Resource stockpile.

PRODUCT STOCKPILE
To keep the production going the station needs some space for new products.
Taking into account how many products are made each cycle the ship takes some wares away to make room.
If the station has to little products in stock, such as when some is bought. If the ship has any it will load them to the station.
This is the most useful setting.

RESOURCE STOCKPILE
This setting tries to keep resources to a bare minimum by taking all the resources except for the ones that are needed.
So far it does not destinguish between the different resources so it will most likely try to limit energy cells first.
Because of this it gets quite full at the start.
This setting is usefull if you want a station to gobble up surrounding resources so everyone else starves.
It may give unwanted results in loops.

ALERT WHEN FULL OF PRODUCTS
If the cargobay is filled by products and this setting as active a message will be sent to the player and the ship deactivated.
If you want your ship to move to its homebase after this then use my "Fill Bay and Return Home" script, also available.

*BPH COMPATABILITY*
Two new features have been added to the SSP if you have a BPH onboard. You can now easily check which wares are prohibited by a new command.
Just run the command on any ship with a BPH an a list will be sent to the player.
Also you can prohibit individual wares just like with a BPH.

*If you remove the BPH system, the wares will stay prohibited until you put it back.*
*If you prohibit wares during the SSP, you will need to restart it.*
Last edited by Xenon_Slayer on Sat, 25. Feb 06, 14:50, edited 5 times in total.
Come watch me on Twitch where I occasionally play several of the X games
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

I need to give the option of forsaking certain wares, such as resources you dont want to stockpile. There are two ways I can do this.

The argument way
I want to make the arguments like this:
Select how many wares you want maintained in the factory.
Select which wares.

So a SPP will have a maximum of 2 wares, crystals and Energy cells. If you only wanted to stockpile crystals, you would select <1> and then crystals, or select <2> and then crystals twice.

Or it could be like the BPH
Select which ones you dont want from a seperate script, or use the BPH prohibit script for the same thing.

I perfer using the BPH Prohibit, it is already there (but not named for the task). I just need to link it into my script as well.

How does that sound?
Come watch me on Twitch where I occasionally play several of the X games
Merroc
Posts: 5920
Joined: Mon, 16. Feb 04, 20:01
x3tc

Post by Merroc »

I would say indeed the prohibit BPH script, get one that checks the wares of the station then asks you which ones it shouldnt transfer, let that information go to your main script and with an if (or if not) with that ware you dont want to transport to skip it... shouldnt be too hard...
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Rather than creating a whole new SSP Prohibit command, I would perfer using the BPH prohibit but renaming it to something like "Ware Prohibit" or "BPH & SSP Ware Prohibit"
I will have a look at the BPH code and see how it all works, Is it an array containing the wares you cant trade with?
Come watch me on Twitch where I occasionally play several of the X games
User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Stockpiler

Post by Birdman »

Needed to modify the plugin.Products.Per.Cycle.List.xml file. Silicon was set at 1, some mines will produce 2 (yields 39-82). Checked for Ore, it's ok at 10 Yiels up to 119). Will update you when/if I find anything else.

This looks to be a good mod, awaiting furthur updates on FBRH in its thread.
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Thanks for that. I remembered that for Ore but not silicon.

As for the FBRH. Its coming along great. Im trying to add the functions of JD and Transporters. Updates soon.
Come watch me on Twitch where I occasionally play several of the X games
User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

SSP ? bug

Post by Birdman »

Seems that SSP will not operate without an assigned station or am I getting it confused with FBRH?

Also there is no command shown in operation ie: if you look at the ship running SSP, command operation is: none. It gets a bit confusing.

Anyway, seem to be missing a file, plugin.OML.SSP.select.init.xml is not in the zip.

Otherwise, it does what is advertised, which works for mt mining operations.

Thanks,

Birdman
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Thanks a lot for your feedback. I have fixed all of the problems. I still dont know where the missing script went so I made a new one. Cheers!!!
Come watch me on Twitch where I occasionally play several of the X games
User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Ver 0.6 failure

Post by Birdman »

Automatically goes into resource stockpile mode, no way to change to any other mode. Still does not show command in operation.

Noticed you added prohibit, not accessable.


:(
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Hmm. Did you try stoping the old command and then running it again?

Edit: Balls!

Re Edit: Ok

I never updated the readme bacause I forgot I made those major changes. A total c**k up on my part. This is the new situation.

You can use the BPH goods prohibit script to stop the transfer of any goods.

I am now wondering either I should make this commnd a BPH upgrade.

I will work on a way to get the products prohibited displayed though.

Sorry for the confusion, especialy if your ships dont have BPH's.

Perhaps I could add the old system too, so you can still choose if you transfer products or resources.
Last edited by Xenon_Slayer on Sun, 3. Jul 05, 02:58, edited 1 time in total.
Come watch me on Twitch where I occasionally play several of the X games
User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Post by Birdman »

OML wrote:Hmm. Did you try stoping the old command and then running it again?

Edit: Balls!
Yup! First thing I did.

Also, shouldn't the prohibit section go into the resource section? Rather than be at the start of the script? Also don't see a prohibited count entry variable.

EDIT: Um, Start SSP, then go to the BPH section for prohibit? True, no BPH installed. Does the level system also kick in?

When running in the product mode, would it be possible to add an alert (incoming message) when the cargobay is full? (cargobay - 1 product volume)
Last edited by Birdman on Sun, 3. Jul 05, 03:27, edited 1 time in total.
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

I have just polished off a new version. Im fully testing it now. So sorry about this, I just rushed it stupidly.

The way it works now is:
With the SSP starting you get 2 options, the original ones.
1. Transfer Products
2. Transfer Resources

If you select "1" for either of them, it will activate those wares to be transfered.

Additionaly, if you have a BPH installed you can additionaly choose which resources it doesnt transfer.
And the new command is added also, the BPH Prohibited list. It will send a list of the wares currently prohibited. God knows why this wasnt added anyway. Its 3 lines of code!!!

If you want it tonight you will need to PM me and ask me to E-mail it for you as Merroc has gone sleepy Bye Byes.

Thanks again for your input.
Also, the jumpdrive for the FBRH is working. I just need to add some logic of whether you want it to use the JD, buy energy cells e.t.c.
Come watch me on Twitch where I occasionally play several of the X games
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Updated!
Come watch me on Twitch where I occasionally play several of the X games
opa
Posts: 122
Joined: Tue, 25. May 04, 17:26
x2

Post by opa »

great if it works!

Does it work with more ships? I have one loop bluilding support fab, an SPP, and i want to stockpile ecells there. I parked 20 dolphins, can it work with all them together (of the first is full, fill up the next one, etc.)?
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Yes, but it would be a mess. It wont go one by one. They will all try and get them when every they can. If that doesnt bother you then go for it.
Come watch me on Twitch where I occasionally play several of the X games
User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Post by Birdman »

OML wrote:Yes, but it would be a mess. It wont go one by one. They will all try and get them when every they can. If that doesnt bother you then go for it.
I have 4 running on a Silicon mine, and they seem to alternate... ship1 and 3 had silicon, 2 and 4 didn't.

But so long as you are using othet ships to dock qand get the products, it shouldn't matter. :lol:

I'm in the process of a MASSIVE build in Reservoir of Tranquility, so mine haven't had a chance to hit the overflow point yet-- 84 total between RT and Great Reef (1 SPP loop plus 9 mines there) -- that doesn't include the 18 I already had running in Baren Shores for silicon support. This will have only 15 open to sales, but all at max price-- I figure that they will NOT have much stock as they are all high demand items.

The 10 ore using, 5 silicon using, and all the Crystal Fabs are/ will be running SSP in the resource mode with BPH Prohibit for E-cells and Food2. :D
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Is it working good?
Come watch me on Twitch where I occasionally play several of the X games
User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Post by Birdman »

Yes :)
User avatar
Birdman
Posts: 508
Joined: Sat, 10. Jan 04, 09:07
x3

Post by Birdman »

Back again, new glitch found. Running SSP 0.7

While running resource stockpile, prohibit mode, ships will stockpile items on the prohibited list (Prohibit list verified correct in players log). This happens only occasionally, still trying to figure out how often, but hard to tell.

What happens is any empty capacity get filled by the prohibited items (usually E-Cells, but for my BPPC and GPPC fabs, ore also; and Cahoonas or Rastar for my Crystal fabs). Weapon fabs: BPPC has 2 Ore and 8 Cahoona; GPPC has 4 0re and 16 Rastar, Crystal fabs have 2-3 Silicon. This is especially bad for the PPC fabs due to the sheer numbers of ships involved, and quantity of wares required by the fabs. The BPPC fabs are the worst, because the supplying SP's have SSP running on 3-4 maxed Dolphins for surge supply when the BPPC fab cycles and to absorb excess E-Cells due to other fabs in-sector being full. This also happens with "full" ships, but they still have a few spaces open (1-4 capacity). The stations also have a SSP ship for product, and these have never had prohibited wares show up.

This has happened at several different fab types, so it doesn't seem to be related to fab type. Not sure if it's strictly time related (every x minutes), cycle related (each time a product is produced, this option is unlikely unless it's a multiple cycle period), or random. Will investigate further for strict/cycle times, and let you know.

Any ideas? Please let me know.

PS. This has happened both before and after the Bonus Pack update.

Thanks,

Birdman
Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 13126
Joined: Sat, 9. Nov 02, 11:45
x4

Post by Xenon_Slayer »

Does the problem solve itself if you start the command again? If I remember my code I made it so the prohibited wares are detected at the start of the command so if you prohibited the wares after the first command was given it may not prohibit what you want. I'll check the code in a bit. If I find I am wrong I will search for the problem.
Come watch me on Twitch where I occasionally play several of the X games

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