[SCRIPT] BenCo Factory Warehouses v. 2.00 updated: 3/27/2007

The place to discuss scripting and game modifications for X³: Reunion.

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

Ben2006
Posts: 145
Joined: Sun, 1. Oct 06, 01:19
x3

[SCRIPT] BenCo Factory Warehouses v. 2.00 updated: 3/27/2007

Post by Ben2006 »

Script Name: BenCo Factory Warehouse
Version : 2.00
Author : Benco Industries
Released : 3/19/2007
Updated : 3/27/2007
For Game : X3 ReUnion v. 2.0.02
Packaged : WinRar v3.2 and X3 Script Installer SPK v1.86.
# of Files : 11 =

X:\Program Files\EGOSOFT\X3 REUNION\t\448340.pck
X:\Program Files\EGOSOFT\X3 REUNION\readme\al.benco.warehouse.readme.txt
X:\Program Files\EGOSOFT\X3 REUNION\scripts\al.benco.warehouse.buy.pck
X:\Program Files\EGOSOFT\X3 REUNION\scripts\al.benco.warehouse.buy.check.pck
X:\Program Files\EGOSOFT\X3 REUNION\scripts\al.benco.warehouse.eventhandler.pck
X:\Program Files\EGOSOFT\X3 REUNION\scripts\al.benco.warehouse.report.pck
X:\Program Files\EGOSOFT\X3 REUNION\scripts\al.benco.warehouse.report.check.pck
X:\Program Files\EGOSOFT\X3 REUNION\scripts\al.benco.warehouse.shipping.pck
X:\Program Files\EGOSOFT\X3 REUNION\scripts\al.benco.warehouse.uninstall.pck
X:\Program Files\EGOSOFT\X3 REUNION\scripts\al.plugin.benco.warehouse.reg.pck
X:\Program Files\EGOSOFT\X3 REUNION\scripts\setup.benco.warehouse.pck

Download the latest WinRar version here:

BenCo Factory Warehouse v. 2.00 "RAR"

Download the latest X3 Script Installer version here:

BenCo Factory Warehouse v. 2.00 "SPK"


What is it:

BenCo Industries has developed a new technology called the Cargo Compression Module (CCM). It is the same technology used for ship cargo bay extensions, but has now been adapted for individual Factories that only have one Product. The CCM provides an unlimited amount of warehouse space to store your individual factories finished product. ie: your Ore Mine or Teladium Factory can now store billions of units. Every 60 seconds, the warehouse shippers will evaluate your "stock-on-hand" and either top it up or transfer the excess over to the CCM. The "stock-on-hand" level will be maintained at your Factories maximum storage capacity minus one production batch. This allows your Factory to be able to produce product virtually non-stop (no bottle-necks). The warehouse crew can only carry one production batch at a time going to/from Factory.

It is probably better suited for slow selling stuff that you are producing tons of, rather than a high turnover factory. In other words, there is no point in installing a CCM on a Space Fuel/Weed plant, but you might want to install it on an Ammunition Fab, Mosquito Missle, Ore or Silicon mine that isn't selling well at it's current location but is producing nicely and the product could be transferred over to a sector that has a high demand for it. Once you buy a CCM for your factory, the name of the factory will be changed to indicate that this factory has a warehouse. ie: "Your Teladi Teladianium Factory M Alpha" will now be named "Teladi Teladianim Factory M CCM-Installed".

How to Use it:

X3 Script Installer: See instructions for using the X3 Script Installer.

WinRar Version:
Unrar the files into your X3 Reunion subfolder. The rar uses relational paths, so it should extract into the folders properly.

Two new "Station Commands" will show up ie: Buy BenCo Factory Warehouse and another one for Warehouse Report. The report can be generated any time and will tell you exactly how much Product is stored in your CCM. It will cost 1,000,000 credits for the CCM module. (They are on sale now)

These CCM's are meant soley for individual Factories that have one Product. The ability to install the CCM into a "Complex" has been disabled. WARNING, do NOT combine any individual factories that have been converted to CCM into a "Complex". Also, Do not add a CCM converted factory to an existing "Complex". You will not be able to produce reports for the fab if contained within a Complex and it produces a corrupt report. You have been WARNED.

This is an "Artificial Life" script package, so you will also see "BenCo Factory Warhouse shipping crew" in the AL. You can turn off Product transfers to/from Factory with this.

1a)X3 Script Editor must be activated.
1) Install the script package.
2) Load your save game, wait 1 minute, save your game
3) Reload your game
4) Buy CCM's for your individual Factories


How to uninstall:

Make sure to empty your warehouses first (if you want to). However, this is not a necessity, as if you forget or miss one, it's ok, the uninstall script will take stock of every Warehouse and sell any stored product you still have in there and pay you the market value of the Product stored in the Warehouse. The uninstall script will then rename all of your ex-CCM installed factories to their default names again. Just the way it was before you installed the CCM.

1) Go to the "Artificial Life" menu and turn it off I mean make it say "No".
2) Wait one minute
3) Save your game
4) Exit the X3 game.
5a)If X3 Script Installer was used, use that to uninstall script files, then do step 6 below.
5b)If WinRar package was used, delete the files shown above (except the "al.benco.warehouse.uninstall" file.
6) Go back into the X3 game and load your saved game, now, go to Script Editor and list the scripts. Find the script named "al.benco.warehouse.uninstall" and highlight it. Now, press your [R] key and then press [ENTER] two times.
7)Save your game again to lock in the uninstall
8a)If using X3 Script Installer, load that up again, you will be asked if you want to delete the uninstal, answer yes.
8b)If using WinRar, delete the al.benco.warehouse.uninstall.pck file from your "scripts" directory.

Version History:

3/27/2007 v.2.00 (This version is NOT compatible with previous version) uninstall v1.

Complete re-write of the code. Optimized. Now uses Local Variable Arrays. Added grey-out of commands if Player has no credits or Factory already bought or a Complex is trying to buy a CCM. Increased "stock-on-hand" quantity. Added an uninstall to automatically sell any forgotten product left in warehouses and to reset Factory names back to defaults. Reduced the cost.

3/19/2007 v.1.00 Initial Release

Other Info:

Text File Used: 44-8340
Station Command Slots Used: 1144 and 1145 same as some other guys scripts. Confict pending of course.
Last edited by Ben2006 on Wed, 28. Mar 07, 13:17, edited 4 times in total.
RaGodofTehSun
Posts: 417
Joined: Thu, 23. Dec 04, 03:02
x3

Post by RaGodofTehSun »

Ben, could you pack your scripts into Spk files for those of us who use the script installer? it would be of GREAT use ^^ thanks!
reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken »

Wow, you're just poping out scripts, one at a day!

Don't mean to bust your chops though, but there's already a script that does pretty much the same thing and has the same restrictions - the STATION-EXTERIOR WAREHOUSE; though that one has to wait for 3 minutes. I think most people would much prefer instant restock though.

http://forum.egosoft.com/viewtopic.php? ... sc&start=0

Just thought you might be interested to know.

Love the other scripts.
Ben2006
Posts: 145
Joined: Sun, 1. Oct 06, 01:19
x3

Post by Ben2006 »

reinhart_menken wrote:Wow, you're just poping out scripts, one at a day!

Don't mean to bust your chops though, but there's already a script that does pretty much the same thing and has the same restrictions - the STATION-EXTERIOR WAREHOUSE; though that one has to wait for 3 minutes. I think most people would much prefer instant restock though.

http://forum.egosoft.com/viewtopic.php? ... sc&start=0

Just thought you might be interested to know.

Love the other scripts.
Hi Reinhart,
No the Station Exterior Warehouse is nothing like my AL package whatsoever. That other script only works on Docks while mine will work on any Factory but DOESN'T work on DOCKS. There is a big dif. between the two wouldn't you say!
Ben2006
Posts: 145
Joined: Sun, 1. Oct 06, 01:19
x3

Post by Ben2006 »

RaGodofTehSun wrote:Ben, could you pack your scripts into Spk files for those of us who use the script installer? it would be of GREAT use ^^ thanks!
No, I don't use program as it is not working properly. It has a problem including the Readme text files and pretends to place them but puts an html bold command in front of the txt file and temporarily shows, but it is not there and when you press the view readme button it says there is none. Until that program is bug free, I am not going to use it. Many of the other scripts from other people that I install also are missing their readme txt too for some reason.

EDITED/UPDATED:

OK, I downloaded the latest version of v1.86 and it is working good now.
Will package up all my scripts for the "SPK" format.
Last edited by Ben2006 on Wed, 21. Mar 07, 11:14, edited 1 time in total.
reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken »

Ben2006 wrote:Hi Reinhart,
No the Station Exterior Warehouse is nothing like my AL package whatsoever. That other script only works on Docks while mine will work on any Factory but DOESN'T work on DOCKS. There is a big dif. between the two wouldn't you say!
Well, in that case I guess it is very different indeed! I never used the actual script and I only got the general idea of both of yours scripts. Guess that's how I got them mixed up!
It has a problem including the Readme text files and pretends to place them but puts an html bold command in front of the txt file and temporarily shows, but it is not there and when you press the view readme button it says there is none. Until that program is bug free, I am not going to use it.
Oh? I never had a problem with the packager, it included the readme file just fine and also place them just fine. Might want to try a newer version? (Cycrow updated it recently) Anyhow, I always manage to pack the files myself with no problem. After all, it's just adding files to the program and have it pack them, simple enough; so I won't be requesting you to provide a spk version.
Ben2006
Posts: 145
Joined: Sun, 1. Oct 06, 01:19
x3

Post by Ben2006 »

Ok, I downloaded the latest version of X3 Script Packager and it seems to be working good now. So I will package up all my various scripts into "spk" format files.
Ben2006
Posts: 145
Joined: Sun, 1. Oct 06, 01:19
x3

New Version 2 available

Post by Ben2006 »

Ok, I have made alot of changes to this package. Rewrote it completely. Changed the way it handles and stores data. Added "grey-out" scripts to when the commands are available and by what kind of Factory ie: prevented Complex from trying to buy a warehouse, by simple greying out the commands for them. Also, if you don't have enough credits to buy, then the commands are also greyed out, that sort of thing. Reduces the amount of text messages, size of code scripts and increases "control".
Also, reduced the cost of installing a CCM from 5 million down to only 1 million. Also added an uninstall script that will automatically sell any stock remaining in warehouse at the time of uninstall and give you the credits. Uninstall will also rename your Factories back to their original default names too.

Hope you like this one.
User avatar
KanineLupus
Posts: 591
Joined: Tue, 8. Mar 05, 07:47
x2

Post by KanineLupus »

OK - just a quick question. Is there any particular reason why you chose to disable this plugin's ability to function on complexes. It makes this plugin very limited in its uasge. Perhaps there could be two 'grades' of the BenCo product - the current 'single-station-only' version, and a more costly 'complex-grade' CCM module.

WOuld certainly expand the usefulness of such product :)
Ben2006
Posts: 145
Joined: Sun, 1. Oct 06, 01:19
x3

Post by Ben2006 »

crayolakidd wrote:OK - just a quick question. Is there any particular reason why you chose to disable this plugin's ability to function on complexes. It makes this plugin very limited in its uasge. Perhaps there could be two 'grades' of the BenCo product - the current 'single-station-only' version, and a more costly 'complex-grade' CCM module.

WOuld certainly expand the usefulness of such product :)
Yes there is a reason. The current approach uses a unique local variable, which points to and array, which holds the unique Factory ID number, which is used to store the product quantity and serves to identify which Factories actually have a CCM installed. Now, when a factory is connected to a "complex", it looses its destinctiveness and the complex takes over as the controlling Complex ID, which prevents the Player from using the Factory Warehouse Report, which uses the original Factories unique ID, which has now been lost or replaced by the "complex" ID. So, you would have no idea of how much stock is in the original Factory.

I am sure there is a way of managing this when a Factory is connected to a Complex, but I have no idea how to do it. All I have is a rediculous copy of X2 MSCI code book for ref. How we manage to do any scripts for X3 is a miracle in itself. If EGOSOFT really cared about us Scripters, they would produce a proper X3 scripters and modders ref guide.

Hmmm, did this answer your question or .....
User avatar
KanineLupus
Posts: 591
Joined: Tue, 8. Mar 05, 07:47
x2

Post by KanineLupus »

Don't worry - can understand your sentiments. Do keep in mind that the MCSI guide was not written by ES themselves, but by a fellow scripter/modder if I remember correctly. ES have never officially suported the modding/scripting side of things. They simply opened the doors, handed over the tools and let the community take things from there. That being said, there is a massive wealth of knoweldge around here to tap into ...have benifited greatly from it myself many a time :)

Personally I've never found much enjoyment in scripting - one of those things I write when I really have to. Much prefer the modelling side of things
Anubis_xian
Posts: 85
Joined: Mon, 29. Jan 07, 23:55
x3

Post by Anubis_xian »

Is there any way this script can allow a existing "warehouse" to receive the same good from outside sources? I have a good ore mine in Antigone's Memorial with the CCM running, and I'd like to stockpile ore from two other nearby mines there... I 'd rather not fork out another million per factory, when a given CCM factory has unlimited storage space.
dterror
Posts: 154
Joined: Fri, 22. Sep 06, 10:39

Post by dterror »

Suggestion:
Change the stock check so that it only transfers into the warehouse when your stock is over max - 1 prod run, and have it transfer 50% of the available stock into the warehouse, but only pull out of the warehouse when stock falls below 30-40%. This would leave room for you to move some stock from elsewhere into the warehouse via CLS like the previous poster wanted.

Alternately, perhaps have a config command for the factory to allow the player to set their min/max stock amounts? Min being the level stock has to drop below before stock is pulled from the warehouse, max being the most stock on hand allowed before stock is moved into the warehouse.
Moejoe07
Posts: 1
Joined: Wed, 12. Mar 08, 02:42

Post by Moejoe07 »

I realize that Ben vanished and that this topic is absurdly old, but I have looked around (half a dozen searches, many topics) and have not found anyone who has this script available at present. If anyone has this script, and/or his X-Treme Cargo script, I'd greatly appreciate it being uploaded or sent to me, provided it is not against the expressed will of the author. They sound like great scripts, and I’ve found others of his from various sources and have greatly enjoyed using them, but I’m having a trouble finding these.

(Again, I know this topic is old, but it's better than making a new one, no?)

Thanks.
:)

Return to “X³: Reunion - Scripts and Modding”