[Script] Dock Manager 1.02

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
User avatar
Khaakbuster
Posts: 393
Joined: Sun, 8. Jan 06, 18:43
x3tc

[Script] Dock Manager 1.02

Post by Khaakbuster » Tue, 15. Feb 11, 00:35

Dock Manager 1.02


[ external image ]
Dock Manager 1.02 ZIP



This script will install another command to your Trading-/Equipment Docks and the HQ - the "Dock Manager". This will allow two things:


1. View/Add/Remove ware transfer jobs for your dock (Trading Station/Equipment Dock/HQ):

These jobs will allow your dock to automatically transfer wares from another station in the same sector (only player owned stations) up to a defined limit on that dock using transporter technology. With this you can virtually link your dock to a complex or station.

Each job costs an initial fee of 500.000 credits for setting up the transporter. You can add multiple jobs for a station or ware. You can even add multiple jobs for the same ware and station. Just remember that every new transfer costs credits.


2. View/Add/Remove ship upgrades on docks (Equipment Docks only):

This will allow you to outfit your ships in your own docks. You can select upgrades to install on any one of your equipment docks for a license fee. This fee is twice the average price of the upgrade and is just for a license to produce the ware on that dock. It doesn't include any actual upgrade.

Adding the upgrade itself is done by a task that runs on the dock and adds each licensed upgrade for its average price. The task will make sure that at least one unit of an upgrade is available (if the player has enough money to afford it ;) ).
If you want you can even store spare upgrades from your ships in the equipment dock.


Hints:
  • You can exit all menus with the ESC key. That's why I didn't add any "Quit" buttons.
  • All costs will be payed from the player account.
  • This script will NOT run on the Xenon Hub.
  • It is possible to transfer upgrades to your ship even if it already has that upgrade. This is a game engine limitation. The upgrade will vanish and a new one will be installed on the dock. So if you like to waste money... ;)
  • I strongly recommend a mod which increases cargo capacity for all docks.

Installing:

Just copy the scripts and t folder from the ZIP archive to your X3:TC directory. The new command will be installed the next time you start X3:TC.


Uninstalling:

Open the script editor and run the script "plugin.kb.dock.manager.uninstall". It will stop the tasks and remove the transfer jobs and upgrades.
For every upgrade that is stored on your docks you will get the average price transfered to your player account.
If you want to keep some of the upgrades for later use move them to ships before running the uninstaller!
After that save and exit the game. Remove the script files.


Usage of Dock Manager:

1. Choose the "Dock Manager" using the command console of your dock.

The Main Menu:
[ external image ]


2. First you have to add a transfer job so choose "Manage Dock Settings" and then "Add Transfer".

The Settings Menu:
[ external image ]


3. You will be presented a list of your own stations from this sector. Choose one as the source for the transfer.

4. Select a ware from that station.

5. Select the limit. This means the maximum amount of that ware that you want to store on your dock. You don't have to consider the volume for this ware as the script does this automatically. The maximum amount that you can select is shown in the upper right corner.

6. Repeat steps 2 to 5 if you want to add more wares to your dock.

Active transfers on my HQ:
[ external image ]


7. Exit the settings menu and select "Start Dock Manager"

This will start a task that will cycle through all the configured transfer jobs (one every 5 seconds) and transfer the wares to the dock. After each cycle there will be a delay of 60s.



Usage of Ship Upgrades:

1. Choose the "Dock Manager" using the command console of your dock.

2. You will first have to add at least one new licensed ship upgrade to your Equipment Dock. Select "Manage Dock Upgrades" and then "Add Upgrades".

Add Upgrades Screen:
[ external image ]


Once you have selected all the upgrades that you like choose "Install Upgrades". Now you will be charged the license fee.
A task will automatically start on that dock to keep the stock at a minimum of 1 unit per upgrade.

Equipment Dock with the selected upgrades:
[ external image ]



I have worked and tested as carefully as I could but please report any bugs that you find.



Used resources:
Text page: 8040
Station Command slot: 1145


Version History
1.0 Initial Version
1.01 Bug fix for Upgrade Removal
1.02 Bug fix for transfer problem with certain ware capacities - Please restart the Dock Manager command on your docks or do a "reinit script cache" in the script editor.
Last edited by Khaakbuster on Mon, 21. Feb 11, 23:51, edited 1 time in total.

User avatar
Khaakbuster
Posts: 393
Joined: Sun, 8. Jan 06, 18:43
x3tc

Post by Khaakbuster » Sun, 20. Feb 11, 23:24

*new version 1.01 available*

It could happen when removing an upgrade from an equipment dock that the task was not updated properly. This has been fixed.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”