The problem when the UT (universe trader) cannot find fuel within 1 jump. It's questionable if they should search within 1 jump only - but I decided not to change this.
Instead - when the UT cannot find fuel it's supposed to order a fuel delivery. And it does. The exception happens when the "wanted amount" of fuel is larger than the amount allowed to be delivered.
The largest amount allowed to be delivered is hardcoded into the script - and is 500 units of cargo.
This code is within the file "plugin.autotrade.delivery.pck"
So I've added a little exception within the exception - saying that if the delivery is Energy Cells, go ahead with the delivery anyway - but deliver only 500 units.
-----------------------------
Update 20.12.2005
I've got a PM from CBJ giving me permission to allow the file to be downloaded.
DOWNLOAD: Download the file here
Instructions:
1. Download the file.
2. Make a copy (backup) of the file \scripts\plugin.autotrade.delivery.pck
You may need the original file during patching to 1.3 and such.
3. Extract the ZIP file
4. Place it in the "\scripts" directory - overwrite if the old if you made a copy if it.
Now comes the tricky part - which Im not 100% sure of:
5. Enable the script Editor.
6. Open the Script Editor - and use "Reinit script cache".
Now this part should be simple:
7. When a UT is out of fuel - just use "Start Universe Trader" and it will use the new version of the file. Even if it's out of fuel it will order a delivery of fuelcells and start up again.
Point 5 & 6 - Im not sure if you really need to enable the script editor for the new version of the file to be loaded. Can someone without the script editor enabled try this? Feedback please.
-----------------------------
OP - not needed if you downloaded the file.
If you want to see the change however, here's the original post:
Since the code is copyright protected I wont add a file for download - you need to edit this yourself. (Unless someone gives me permission to put a link to the new version here of course.)
Please use the instruction in the sticky how to enable the builtin Script Editor (SE).
You need to download X2 Modder to extract the PCK file.
1. Extract the "\scripts\plugin.autotrade.delivery.pck" into "\scripts\plugin.autotrade.delivery.xml" using X2 Modder.
2. Start X3 and enable the scripteditor.
3. Open and edit the "plugin.autotrade.delivery" script.
4. In the header change version number fom 2 to 3.
5. Go down to line 36 where it reads:
Code: Select all
036 $upgrade.volume = get volume of ware $upgrade
037 if ( $upgrade.volume * $amount ) > $maxamount
038 $exception = 36
039 goto label failure
040 end
Code: Select all
036 $upgrade.volume = get volume of ware $upgrade
037 if ( $upgrade.volume * $amount ) > $maxamount
038 * -
039 * We need to make an exception if we are talking about fuel delivery
040 * lets reduce the amount wanted so we can 'properly' use the delivery
041 * -
042 if not $upgrade == Energy Cells
043 $exception = 36
044 goto label failure
045 end
046 $amount = $maxamount
047 end
8. Exit X3 and rerun X2 Modder. Compress the file you modified. delete the XML file.
9. Start up X3 again.
Important - use the "Reinit Script Cache" when you get back to the SE menu.
The NEXT time you start up the UT again the fix will work.
All UT's will may at least once unless you re-use the "Start Universe Trader" - just tell them "Start Universe Trader" again - and the fixed script will be loaded for that UT.
Now you can sit back and relax, and watch a transport arrive at the station delivering 500 units of Energy Cells for your UT.
Cheers
EDIT: Added the version number change in step 2.