[SCRIPT]Station Administrator-New Version v1.07c

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

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

siath70
Posts: 382
Joined: Sun, 11. Jan 04, 04:03
x4

[SCRIPT]Station Administrator-New Version v1.07c

Post by siath70 » Sun, 4. Feb 07, 22:34

Since I got the ok to use Naffarin's script as a base of mine, I'm letting out some of the details to see what people think.

FEATURES
Ability to set the maximum buying price and the minimum selling price.
Yes if you set energy to buy 14 and sell 17 the traders working for the Admin will only buy at 14 or below or sell at 17 or more.

Added dockware.manager to the script. I added it because, I added functions to it, ones I felt it was lacking. The traders pay attention to the settings set by dockware manager, or Station Admin (same variables, I just didn't want to hack apart the original so I used it for the base)

More features might be added, should say will...

All features of the original script are intact, traders use a jump drive, etc etc...

Command Slots
MENU_COMMAND_STATION_57
MENU_COMMAND_STATION_58

Text file 7529

WARNING YOU *MUST* UNINSTALL STATION TRADER. BEFORE INSTALLING THIS SCRIPT. THIS MEANS UNINSTALL COMPLETELY STOP ALL STATION TRADERS. BEFORE INSTALLING THIS SCRIPT. THIS SCRIPT INCLUDES STATION TRADER BUT THE VERSIONS ARE DIFFERENT FROM EACH OTHER.

Update Version see below for explanation.
Station Administrator v1.07c

UPDATE Version 1.07c
Minor buy routine fixes.
Some menu updates.

UPDATE Version 1.07b
Dummy me left some debug stuff on that prints to logbook. Turned off now.
Good news is this version also has the revamped buying routine. ;)

UPDATE Version 1.07
Added support back in for Trade Docks and EQ docks. Mainly for Trade Docks though.
Improved the Sell Products routine, it is now sorted to try to sell the Wares you have the most of. This should improve speed as I also slimmed the routine a bit.
Fixed a Small Bug pointed out to me by -Boron - Ol Fh'art

Added a new commands:
List JumpFuel Settings: All Stations This command will list JumpFuel Reserves for all stations.
List JumpFuel Settings: One Station This command will list JumpFuel Reserves for one station.
Set JumpFuel: All Stations This command will set JumpFuel Reserves for all stations you own. -1 will remove JumpFuel Setting, Traders will use default 15%.
Set JumpFuel: One Station This command will set JumpFuel Reserves for one station you own. -1 will remove JumpFuel Setting, Traders will use default 15%.
These commands do what they say, All Station Administrator Traders will use the settings to determine the amount of Energy they will stock. Useful if they're jumping far.
As a result of this I revamped the selection screen. Enjoy. :)

UPDATE Version 1.06b
Minor changes:
Lists will now display a-z and by types. -Thanks once again to Boron - Ol Fh'art, I was up for over 40 hours and couldn't think right. He helped me see the light. ;)

Didn't update the version on the file for download as this was a minor change and I just repacked the two files I changed.

UPDATE Version 1.06
Removed support of Cargo settings on EQ and Trade Docks. There are some problems with this, as Trade Docks and EQ Docks don't have Cargo settings. Next version will include support for these docks for sell percents and max buy max sell settings. Right now they function normally. I left the command remove all cargo command open so people can remove these settings if they wish as they mean nothing. It doesn't hurt to leave it on the station but they're not used for anything.

Cleaned up some small errors in buying and selling wares for PHQs.
Fixed a couple of messages that could get cut off if to long.
Added listings with ware types in List all prices command. Should make it even easier to find Wares.

Need to do:
Fix listings to go from a - z instead of z - a
Make the list all percents list by type.
Allow players to choose what type of wares are listed.
Make PHQ build and outfit escorts for Traders.

UPDATE Version 1.05
Added in support for Trade Docks and EQ docks, this should be complatable with mods.
Corrected some errors in the messages and reformatted messages for easier understanding.
Now sorts lists making it easier to find a ware in the list. -Thanks to Boron - Ol Fh'art and the use of his sort script.


New command Cargo set command
Set Cargo: All Wares by Type This command will set the cargo space based on the amount of wares you wish to store by TYPE of ware. This is done by selecting Station then amount for then amount for SHIELDS|LASERS|MISSILES|REST OF WARES. If you wish to skip a ware type and keep old values set amount to -1.

General improvments to some commands.

UPDATE Version 1.04

Ok, no more letters, versions will now be in the form of numbers. Yet again A friend pointed out that something wasn't right. Corrected a place I missed where the price was passed from PHQ to find out it if wanted to buy. It was causing ships to make dead runs, not causing loss of income, unless you count the cells for the jump.

You shouldn't have to stop the traders for this to take affect. Just remove the previous files and slap the new ones in. If you see a Trader acting strange that is under the control of Admin then just stop and restart it.

UPDATE Version 1c

Located an error that didn't calculate the PHQ avalible space correctly. This would stop you from setting individual cargo spaces. Fixed remove and install newer version. No need to stop the traders as nothing on them has changed, just update the script.

Version 1.0 BETA please test and look for bugs. -02/08/07


I have ran this for the past two days and have had no problems. But I'm not perfect. So please report any problems.

WARNING YOU *MUST* UNINSTALL STATION TRADER.

Make sure you uninstall Station Trader if you're useing it. Stop all the process on the ships using it. This replaces some of the files. You can restart the traders once you get Station Administrator installed.

BEFORE you start the traders on your PHQ (more support for other docks later). Set all setting as you want them, if you don't you can and will loose money and ware you might not want traded.

This script is menu driven, Yes a pain, but for how I wanted this set up I found in easier for people. Just pick the command Station Administrator from the stations menu and select what you want from the menu that pops up. This causes the Stations Setting button to function differently.

Read the menu people, for the love of God. It will explain most of it. If all else fails read the readme, I have included the Station Trader and Station Administrator readmes.

No, I didn't put the 49 language files in because I had to change somethings and I only speak english. By all means if someone wants to translate the two text files and readmes do so and email them to me.

One more thing, A warning. Using these command on anything else than a PHQ right now might get unexpected results. They will NOT work on a regular station. They MIGHT work half way on one of the docks. By commands I mean the price settings and such, not the import, export and maintain commands from the Station Trader Scripts.

Let me know if something isn't clear or needs a better explanation.

Siath
Last edited by siath70 on Sun, 18. Feb 07, 23:43, edited 23 times in total.

Vinco
Posts: 19
Joined: Wed, 31. Mar 04, 03:56
x3tc

Post by Vinco » Tue, 6. Feb 07, 14:49

Looking forward to it.

Puruco
Posts: 527
Joined: Tue, 6. Dec 05, 01:09
x3

Post by Puruco » Tue, 6. Feb 07, 16:15

Hi siath, nice to see you scripting again...Does this is goig to be part of naffarin's script or a standalone script?

collins50
Posts: 196
Joined: Sun, 25. Dec 05, 20:51
x3

Post by collins50 » Tue, 6. Feb 07, 17:19

Sounds greate :D Looking forward to trying it out

siath70
Posts: 382
Joined: Sun, 11. Jan 04, 04:03
x4

Post by siath70 » Tue, 6. Feb 07, 20:14

Another script because his script had to be modified a lot to get it to work with the PHQ. I haven't added in the trade stations and eq docks YET. I figured once I get the PHQ to work right, which I am just about there, I'll add the docks and such. You won't need, naffarin's script when using this because this is the same script modified. I'll be supporting his updates and changes. When it grows past his then I'll split it off and make it it's own.

I added a block for wares so you can trade/block/import/export it, this way I can free up two of his command slots for other commands ;). Like Ore and such for the PHQ could be set to only import and to never trade it. I am also adding the ability for you to set the amount (%) you want it maintained at (20%, 30%, etc etc).

I tweaked the Cargo size so that you specify how many wares you want and it sets the correct amount of cargo for all of them. Then all you have to do is go through and manually adjust the ones that need it.

There are other things I have that I want to do.
Possible additions-
-Auto ship scrapping.
-Administrator will replace his own ships that get distroyed.
-If a station is set to be monitored by the Admin he will replace their ships and send emergency supplies when needed.
-A couple other ideas, this is the main ideas.

If you have ideas spill them and I'll see what I can do.

I'll be trying to get this out by Friday (at least a beta so people can help bug shoot.) I need to refine the input screens.
;)

Command slots used:
COMMAND_STATION_57
COMMAND_STATION_58

Of course all of naffarin's command slots for his code.

I have never had to look up and find avalible command slots. So if 10 and 11 conflict with something let me know and I'll move them. I swear there was a thread somewhere that said what command slots were free. I can't find it :(.

Siath
Last edited by siath70 on Wed, 7. Feb 07, 21:54, edited 2 times in total.

Vinco
Posts: 19
Joined: Wed, 31. Mar 04, 03:56
x3tc

Post by Vinco » Tue, 6. Feb 07, 20:41

Well, since you want suggestions...
How about a command for the PHQ which will direct managed ships to acquire any resources still needed for construction of a known blueprint (or multiples of that blueprint)? Say Ship A costs 1k ecells, 50tubes, 500 ore, 20 chips. You have 20k ecells, 23 tubes, no ore, and 17 chips. Your ships will head out to buy 27 tubes, 500 ore, and 3 chips.

And when you say replace ships, do you mean purchase, build, or transfer?

siath70
Posts: 382
Joined: Sun, 11. Jan 04, 04:03
x4

Post by siath70 » Tue, 6. Feb 07, 20:51

Vinco wrote:Well, since you want suggestions...
How about a command for the PHQ which will direct managed ships to acquire any resources still needed for construction of a known blueprint (or multiples of that blueprint)? Say Ship A costs 1k ecells, 50tubes, 500 ore, 20 chips. You have 20k ecells, 23 tubes, no ore, and 17 chips. Your ships will head out to buy 27 tubes, 500 ore, and 3 chips.

And when you say replace ships, do you mean purchase, build, or transfer?
I planned on that, having it look at building ques.- On list, will be after I get the main stuff done.

It will build if it can, or buy if it can't. I could also have it buy the ship it needs and then make a blueprint and then build it. Only problem with that will be the length of time... I still have to figure out a charge for the whole thing.

Yes, please give some suggestions, they will be put into play once I get the base ironed out and working right. I will need some help, beta testing, I hope people will be willing to lend a hand. Right now it's very complex, so I'm trying to refine the commands and check to make sure everything is working as should.

Siath

User avatar
Klyith
Posts: 575
Joined: Fri, 6. Jan 06, 02:38
x3

Post by Klyith » Tue, 6. Feb 07, 20:51

siath70 wrote:Command slots used:
COMMAND_STATION_10
COMMAND_STATION_11

Of course all of naffarin's command slots for his code.

I have never had to look up and find avalible command slots. So if 10 and 11 conflict with something let me know and I'll move them. I swear there was a thread somewhere that said what command slots were free. I can't find it :(.
The Community Script & Mod Download Library, stickied at the very top of the page?

Slots 10 & 11 are used by Commodity Logistics in the bonus pack. Additionally everything 16 and below are "reserved" for egosoft, so if you want to be listed in the library you would need to choose something else.

siath70
Posts: 382
Joined: Sun, 11. Jan 04, 04:03
x4

Post by siath70 » Thu, 8. Feb 07, 10:18

I have a couple things to brush up and add then I hope to get this out tomorrow. It will be a BETA. You WILL have to remove Naffarin's script for this to work...

Siath

siath70
Posts: 382
Joined: Sun, 11. Jan 04, 04:03
x4

Post by siath70 » Fri, 9. Feb 07, 05:23

Ok it's uploaded try it out let me know how it works.

One more time it is only for the PHQ right now. I will add EQ and Trade docks later. Complexs and station are supported by the Station Traders but not the commands I have added.

Thanks,
Siath

siath70
Posts: 382
Joined: Sun, 11. Jan 04, 04:03
x4

Post by siath70 » Fri, 9. Feb 07, 08:27

Uploaded version 1b

An error on my part allowed traders to sell from PHQ no matter what you set the levels at. Should be fixed.

I didn't update the version in the script so remove the other spk and put this on in. The changes were nothing major so over writing the older files is ok too.

One thing I forgot to mention is you can OVERSTOCK your PHQ and allow your admin traders to sell off the extra ;). I have my jumps set to 20 and haven't lost one trader yet.

I'll be adding the ability for the Admin to set escorts with the traders. Jump capable escorts, and if it can be done I'll have the admin build them and outfit them from the stock on the station. Then send them to buy a jumpdrive Blah Blah...

Also a tip: Set all wares needed to build to 100% to sell. If you supply the station and over stock it. The traders will sell the wares off based on the prices you set.

Another thing is remember the traders are working with a lot of variables. So it is quite common to see them not having anything to do. Esp if you're not overstocking the PHQ and they're just keeping he station stocked. I usually set mine to sell at 80% all but the required for building ships. This keeps the wares moving through the station. Remember to keep you weapons and shields high so it doesn't run out and sell them all off. The % max buy and min sell setting is very useful, 20% is what I used and then tweaked, leaving the weapons and shield alone. Eventually the admin will look at all player stations and start bringing in supplies it needs (short of).

Siath

Khaak_Slayer
Posts: 388
Joined: Sun, 18. Apr 04, 17:04
x4

Post by Khaak_Slayer » Fri, 9. Feb 07, 09:38

You say we should disable Station Trader, but what about Station Manager? would that be ok to be left running then? just to clarify.

The upcoming plans for this sound very excellent, i especially like the sound of the automated escort creation/outfitting!

Thanks a lot for this, i look forward to testing it out tomorrow (if i can figure out a way to move/relocate my PHQ :\)

Note: Placing it in President's End is not such a great idea, despite what people tell you.

siath70
Posts: 382
Joined: Sun, 11. Jan 04, 04:03
x4

Post by siath70 » Fri, 9. Feb 07, 11:51

Don't disable Station Trader, stop all the ships attached to it and just remove it with the script manager. DON'T uninstall it with the uninstall feature.

This script is based around Station Trader, so it uses the same files. I just had to modify some of them, well a lot of them. ;) Just like Station Trader it uses part of the station manager, so yes you have to have that it. It will not work with out it.

If you simply use the script installer and unistall then reinstall this and start all the traders up again it will keep all of their settings. I didn't change any of that, Yet.

So, basically all Station Traders work just like they used to and there are two new commands. Pick your PHQ (please don't use it on Docks or anything else right now, I'm not taking resposibility if your empired dies in flames ;) ) Then go into the commands menu and start by using the Station Administrator button. Then look at menu and READ it ;) choose and off you go. Once you have the PHQ set up how you want it. Start all traders like you normally would using Station Trader and off you go.

Remember to block AI traders and Lock UT's and Commodity Logistics guys.

I at one time thought it would be a good idea to set the actualy PHQ slider high, yeah stupid, as the AI's started running to sell me products! So that is why I suggest no on allowing AI and UTs to trade with the PHQ.

It will be a bit to set up, but once it is set you may only have to tweak it. I tried to make it as friendly as possible. Let me know if I can make it friendlier.

I haven't added the Import/Export/Block ware commands yet. I would like to make sure everything is working ok before I start adding a ton of things to it.

SO the more BETA testing and problems I hear about the faster I can get on to adding all Docks and extra features to it.

Cargo Delivery service works well with this as you can have all your Stations ran by one trader. Run to PHQ drop a load pick up a resourse and run back. I would suggest though you make sure you have enough running around to keep Stations in needed resourses.

SPPs are a perfect example of a one ship operation with cargo delivery. Set it to trade with AI set the price to whatever or use XAI software to manage the prices. Set the crystals high so no AIs try to sell you those. Then the AI can buy from you at your price and then set up a Cargo Delivery Transport to shuttle energy to the PHQ and bring back Crystals. The energy that is extra will be sold off at the price you set for the PHQ. Say you have the cargo space of Energy set to 100000 (mine is) the ware is 1 volume so that 100000 energy cells (and yes my PHQ traders raped every SPP around them when the prices got low enough). Then your SPPs bring in their Energy and you find yourself with 150000 energy. Set the max sell percent to 100% and your export or maintainer transports (Station Trader ships) will sell off anything above 100000. ;)

I set all my building ware to 90% and set all prices on everything to 30%. My PHQ is never without resourses. Jump range is 20. They sell off 10% of all my wares, only thing they don't sell are weapons, because I have the prices set high to prevent it. I have a constant supply of shields (all types) weapons Beta and Alpha cannons (all types) 1500 wares of mass driver ammo. I could go on by this is long winded enough. If you have questions ask and I will try to answer in away that helps. If you see traders doing something you think is wrong let me know.

Siath

siath70
Posts: 382
Joined: Sun, 11. Jan 04, 04:03
x4

Post by siath70 » Fri, 9. Feb 07, 12:05

Khaak_Slayer wrote:You say we should disable Station Trader, but what about Station Manager? would that be ok to be left running then? just to clarify.

The upcoming plans for this sound very excellent, i especially like the sound of the automated escort creation/outfitting!

Thanks a lot for this, i look forward to testing it out tomorrow (if i can figure out a way to move/relocate my PHQ :\)

Note: Placing it in President's End is not such a great idea, despite what people tell you.
Presidents end is ok, theres a solution called LASERTOWERS! :)

Siath

Khaak_Slayer
Posts: 388
Joined: Sun, 18. Apr 04, 17:04
x4

Post by Khaak_Slayer » Fri, 9. Feb 07, 17:29

siath70 wrote:
Khaak_Slayer wrote:You say we should disable Station Trader, but what about Station Manager? would that be ok to be left running then? just to clarify.

The upcoming plans for this sound very excellent, i especially like the sound of the automated escort creation/outfitting!

Thanks a lot for this, i look forward to testing it out tomorrow (if i can figure out a way to move/relocate my PHQ :\)

Note: Placing it in President's End is not such a great idea, despite what people tell you.
Presidents end is ok, theres a solution called LASERTOWERS! :)

Siath
I find the music in there depressing ;P

Post Reply

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