[SCRIPT] Remote Docked Freight Transfer V3.07 now available - 2007/04/13

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

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

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15

[SCRIPT] Remote Docked Freight Transfer V3.07 now available - 2007/04/13

Post by B-O'F » Sun, 22. Oct 06, 18:33

Updated 2007-04-13
Changes:-

2007-04-13
3.07 - Single upgrade was not being transferred - fixed
- Cargo bay extensions in use were being transferred - fixed

*NOTE* If you SCRAP a ship, check that all cargo bay extensions have been transferred, if not just use the SCRAP SID command.

2007-04-06
3.06 - Command is greyed out when not applicable - added by halo112358

2007-01-22
3.05 - Mode change now in correct place - thanks to Maian for finding the error

2007-01-20
3.04 - Added option to limit transferrable upgrades - as requested by Maian

2007-01-19
3.03 - Corrected handling of built-in equipment - thanks to Maian for finding it.

2007-01-15
3.02 - Corrected error with transferred value
- Removed script from fighter drone

2007-01-13
3.01 - Now transfers Cargo bay extensions first - as suggested by neumanf15

2007-01-06
3.00 - Transfers Upgrades and Equipment as well as tradeable wares

Uses the same command slot and id as the previous versions.

Version 3.07 is now available:-
3.07 Zip includes .spk
Courtesy of Xai Corporation.

This package was written and worked at 1.403, has been tested with 2.02 - currently working at this level.

What's new - a lot.
- you can now transfer upgrades to another ship - apart from those built-in
- upgrades are selected by a pick list - you can select as many as you like
- the receiving ship can be specified by ship ID, by SID (Same ID as last transfer), or by a pick list
- you can transfer standard wares to multiple ships - by class, by selecting all docked, or by selecting them from a pick list
- there is a new option SCRAP which will try to transfer ALL tradeable wares and upgrades to a selected ship
- plus more.

It is really simple to use, and is based on two rules:-
1: If there is a choice - you choose.
2: If there is no choice - the computer chooses.


Now you can enter "100 E M3" to transfer 100 energy cells to each of your docked M3's.

Or "5 S 1" to transfer 5 shields of your choice to whichever ships you choose.

It also has full built in help by entering "H" or "?" - the help information is also in the package as Help.rtf.

The .zip file has the .spk package and the .xml files if you want to copy them across by hand (or read or modify them).

The Readme has more information, but this package is easier to use than it is to explain....

Enjoy,

Boron - Ol Fh'art

------------ Old Text -------------------------------------------------
This is an updated version of the previous Docked Freight Transfer issued 2006/08/04.

It is using the same command slot and page ids.

This script allows you to remotely transfer freight between docked ships.

- It runs as a Custom command on the ship you wish to transfer from.
- Pressing 'i' with the command highlighted will give information.
- You select the ware and the amount.
- You can then enter the ship ID (e.g. YM5ZZ-88) you wish to transfer the freight to (the ID is NOT case-sensitive).
- If there are only two of your ships docked, you can just hit Enter.
- The freight is transferred, and a message is sent.

You are still limited to standard wares - you cannot exchange jumpdrives (jumpdrive kits are O.K.) or Trade/Fight command wares - but see Readme.

There are two lib files in the package - one will convert a string to upper or lower case as you wish, the other formats large numbers with a delimiter of your choice - if no delimeter is entered, then a comma is used.

The package is a .zip file containing the .spk version, and all the .xml files for those that want to peruse them or install them by hand.

Zip includes .spk

As ever, all the files are provided for you to use, misuse, adapt or whatever you want - you do not have to ask permission, it is already granted.

Main thing, is to enjoy.

Boron - Ol Fh'art
Last edited by B-O'F on Fri, 13. Apr 07, 16:11, edited 10 times in total.
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

User avatar
Graxster
Posts: 814
Joined: Sat, 14. Oct 06, 01:01

Post by Graxster » Mon, 23. Oct 06, 00:03

Awesome! Been wanting this for a long time. Great for moving stuff from capped ships that you plan on selling to "storage" ships, and prevents having to actually go there and do stuff yourself. Also great for transferring shields between the ship that buys them and the ones that need them, as well as many other uses. Thanks! :)

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15

Post by B-O'F » Mon, 23. Oct 06, 00:10

Wow, one happy user (apart from me!!) - so it was worth doing.

Have fun,

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

User avatar
Graxster
Posts: 814
Joined: Sat, 14. Oct 06, 01:01

Post by Graxster » Mon, 23. Oct 06, 00:47

Works great except for the following:

I changed argument 1 from Var/Ware of Ship to Var/Ware, quit the game and restarted, and still get the same equipment list to transfer (ie: I con't transfer a Duplex Scanner, just "cargo". Did I do something wrong, or is there something I may have missed?

EDIT: Well, there's another problem I found... I tried (twice) to transfer 3 Hornet missiles to another ship, and the receiving ship only got 1 missile, but the original ship had all 3 missing. Losing goods is not good. :)

Edit 2: Nevermind, I was looking at Volume, not Amount. Could you possibly change that display to add Amount also? When you choose RFT it comes up with a list of cargo, and shows Volume, but not Amount, so unless you keep checking your ship for how many it has of each item, you're forced to move one at a time.

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15

Post by B-O'F » Mon, 23. Oct 06, 14:21

Hi Graxster,

I cannot change the informations shown on the screen, as it is hard-coded that when you display the Ware select from Var/Wares of Ship it always puts up standard information - Goods Vol TC (warename, volume, trading class). Unfortunately there is no way of changing this information when asking for an input - I wish there was.

The intent was that you would check the freight bay to see current cargo levels, as there is no way (that I know of) of displaying such information during the argument input phase of a script. If you ask it to transfer more than you have, it checks the quantity in the cargo bay, and uses that amount if less than requested. If the To ship cannot take the full amount, it takes only what it can, and only that amount is transferred.

As mentioned in the Readme, argument 1 can be changed to Var/Ware - but doing so requires other changes in the script, my apologies, I did not explain that in the Readme. If this input selection is used it gives the full list of ALL the wares in your game (including all the useless ones - it depends on which scripts and mods are installed) which is one of the reasons I did not use it.

Until there are more 'kits' - like the jumpdrive kit - for Transporter device, Fight or Trade command kits etc. then we are stuck with whatever exists (will have to investigate this).

As issued, this is a working script to transfer the 'transferrable' wares between ships, anything else will require more investigation.

Sorry, working to the limits set by the current Scripting Engine.

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

User avatar
Graxster
Posts: 814
Joined: Sat, 14. Oct 06, 01:01

Post by Graxster » Mon, 23. Oct 06, 18:36

Thanks for the reply. I have noticed something like a bug when using this script. It only happens when I transfer shield from one ship to another. try this:

Dock 2 ships in the same factory while you yourself are out of the sector. Make sure both of them have at least 1 shield. Now transfer the shield(s) from one ship to the other. In my game, the ship with no shields left is still displaying as having shields (the blue segmented bar above the green segmented hull bar). I then transferred weapons to the other ship. When I pressed R and looked at the "stripped" ship, not only did it appear (graphically) to have a shield, but when I checked "Details" it still said it had the shields and weapons. I then flew to the sector myself to make sure it wasn't duplicating items, and sure enough the items had been transferred, but apparently the game itself wasn't "aware" that the items were missing.

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15

Post by B-O'F » Mon, 23. Oct 06, 20:59

Hi Graxster,

Sorry, you are right about the shields, I checked and it also happens with lasers. They are not fitted and are not in the cargo bay, but the ship information at the top, and the Ship Details, still shows the previous shields and lasers properties.

Changing the weapons loses the lasers, so it recognises that they are not available - eventually.

As some of the software companies say 'this is a minor cosmetic error, the program is working - it just doesn't look quite right' - yeah, but I have still got to fix it, as it is not correct - and I don't like it.

Thank you for pointing out the bug, I will fix it as soon as I can.

Boron - Ol Fh'art.
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

eladan
Posts: 5309
Joined: Sat, 7. Jan 06, 17:01

Post by eladan » Tue, 24. Oct 06, 00:31

Looks good B-O'F! I'm still using the first version of your script. I'll upgrade to using this one once I get a chance to actually play the game again... :roll: (Too much scripting makes you not play X3...)

I've been searching for a way to transfer upgrades, but no luck so far. Any way I think of is just too cumbersome to be of use. If I do come up with any bright ideas, I'll let you know!

jlehtone
Posts: 17092
Joined: Sat, 23. Apr 05, 21:42

Post by jlehtone » Tue, 24. Oct 06, 08:16

B-O'F wrote:Thank you for pointing out the bug, I will fix it as soon as I can.
Do you use the same commands as the RTD script for add/remove? Or is this a side-effect of the ship being docked? Ie do ships recheck their state upon undock?


And check the FSUP script too. That can transfer upgrades too, although the ware selection is daunting. (RTD and FSUP are from Xai Corp, ie moggy2).

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15

Post by B-O'F » Thu, 4. Jan 07, 19:29

Hi all,
I am sorry to have been away for so long, but my ISP upgraded my line to a rock steady 0 kbs - for the last ten weeks, and they have lost all my e-mails as well.

I have a new version of the transfer available - it does standard cargo and upgrade transfers. You can pick any other docked ship, and there is an option to transfer standard wares to any number of docked ships.

I have had this working for a while, but I am not going to make it available for general release just yet - I have just downloaded X3 version 2.02, and want to test with this.

I will make the new version available after further testing (if my ISP keeps the line working).
Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15

Post by B-O'F » Sun, 7. Jan 07, 00:32

OK,
Version 3.0 is now available - with all its new bells and whistles.

@ jlehtone
Sorry for the late reply, but as I said above, my ISP has not been very kind to me....
I am not sure of the reason for the shields and lasers still showing up, but I had a fix ready to upload on the 24th October - the day my ISP struck...
I have added extra code to check that they really are uninstalled.

As I have had a lot of time forcibly offline, I have been playing with this script - hopefully improving it..

If you want daunting ware selection - look at this script package - it is using 2d-arrays, three linked arrays, improved shell sort, and two different ways of using incoming questions - and all the required data is kept in an array. I have commented the code as well as I could to help me keep track of what I was doing.. I will check RTD and FSUP to see how they do it - might be easier... Though this was great fun learning...

Enjoy,
Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

neumanf15
Posts: 257
Joined: Mon, 26. Dec 05, 20:55

Post by neumanf15 » Sun, 7. Jan 07, 06:16

I downloaded version 3.0, but when I installed the SPK, it says version 2.01. I checked the dates of the non-spk files and they match the date of the SPK (29 Nov 2006). The readme is also 2.01. Is this the correct version?

CAN'T wait to try it!

Neuman

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15

Post by B-O'F » Sun, 7. Jan 07, 13:57

Hi neumanf15,

I am sorry I uploaded the wrong version yesterday - it is now corrected.

I have no excuse such as it being late, or anything like that - all I can plead is the truth, it was due to my incompetence.

My apologies, and thanks for pointing out my error.

I hope that the script package will live up to your expectations, if not, then I expect that you let me know.

Enjoy,
Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

neumanf15
Posts: 257
Joined: Mon, 26. Dec 05, 20:55

Post by neumanf15 » Sun, 7. Jan 07, 21:12

Thanks. I figured it was something like that (Not incompetence - an honest mistake!). I WILL let you know what I think.

B-O'F
Posts: 719
Joined: Sat, 21. Feb 04, 03:15

Post by B-O'F » Sun, 7. Jan 07, 21:57

Posted: Sun Jan 07, 2007 11:57 am Post subject:

--------------------------------------------------------------------------------

Hi neumanf15,

I AM right - it was incompetence....

Boron - Ol Fh'art
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.

Post Reply

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