[SCRIPT] Trading Distribution Network V1.01 : Update 04/10/2006
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
[SCRIPT] Trading Distribution Network V1.01 : Update 04/10/2006
===========================================
Name: X3 Trading Distribution Network
Version: V1.01
Author: Cycrow
Updated: 04/10/2006
===========================================
Download Package (spk): Download : Mirror 1
===========================================
This script allows you to distribute goods between trading stations in the universe.
The main advantage of this is that you can spread the wares you make all around the universe allow much better selling opurtunities
You can also use it to have refueling stations, filling it with energy sells will allow you to allows have a store of energy close by.
First you need to create a network, you can have any number of networks you wish.
1. Creating a Network
To create a network, you need to use the Create network command in one of your trading stations command consoles.
This will ask for a name for the network, this can be anything you like as long as its not bene used on your other networks.
Once entered, the network will be created and that station will be added to the network.
2. Adding station to a network
A trading network is only good if you have multiple trading stations conencted to the network. To assign more stations to the network, you use
the add/remove station command from the trading stations command console. Then you select one of the stations already in a network, and the current station
will be joined to that network. If the current station is already in a network, then it will be changed to the new network.
3. Removing station from a network
To remove a station from a network, you need to select the Add/Remove station command from the stations command console. Then select a station
that is in the same network as the current station, ie selecting the current station will remove it. Selecting a station thats in a different network
will cause it change networks rather than being removed complete.
4. Displaying Network Status
There is a station command to display the status of a network, this will display all the stations that are connected to the network, as well
as all the ships assigned to them.
5. Assigning Ships to a network
For a fully functional network, you need to assign at least 1 ship. The ships are used to transfer the goods between the stations. If you install
jumpdrives to the ships, they will take energy from thier current station to use to jump.
To assign the ship, you use the Add/Remove command from the ships command console, its found in the trade menu. You will need to select any station
in a network and the ship will be added to that network, Once added it will fly to one of
the closest stations in the network.
6. Removing Ships from a network
To remove the ship, you need to select the add/remove command from the ships trade menu to remove it from the network.
7. Distribute Goods
To distribute goods between sectors, simple dump them in one of the stations in the network and they will be distribute between the whole network.
8. Future Updates
* Add the ability to add stations and complexs to the network for ships to pick up goods from.
* Add selling ships to the trading stations to allow it to sell all the goods from the stations.
Name: X3 Trading Distribution Network
Version: V1.01
Author: Cycrow
Updated: 04/10/2006
===========================================
Download Package (spk): Download : Mirror 1
===========================================
This script allows you to distribute goods between trading stations in the universe.
The main advantage of this is that you can spread the wares you make all around the universe allow much better selling opurtunities
You can also use it to have refueling stations, filling it with energy sells will allow you to allows have a store of energy close by.
First you need to create a network, you can have any number of networks you wish.
1. Creating a Network
To create a network, you need to use the Create network command in one of your trading stations command consoles.
This will ask for a name for the network, this can be anything you like as long as its not bene used on your other networks.
Once entered, the network will be created and that station will be added to the network.
2. Adding station to a network
A trading network is only good if you have multiple trading stations conencted to the network. To assign more stations to the network, you use
the add/remove station command from the trading stations command console. Then you select one of the stations already in a network, and the current station
will be joined to that network. If the current station is already in a network, then it will be changed to the new network.
3. Removing station from a network
To remove a station from a network, you need to select the Add/Remove station command from the stations command console. Then select a station
that is in the same network as the current station, ie selecting the current station will remove it. Selecting a station thats in a different network
will cause it change networks rather than being removed complete.
4. Displaying Network Status
There is a station command to display the status of a network, this will display all the stations that are connected to the network, as well
as all the ships assigned to them.
5. Assigning Ships to a network
For a fully functional network, you need to assign at least 1 ship. The ships are used to transfer the goods between the stations. If you install
jumpdrives to the ships, they will take energy from thier current station to use to jump.
To assign the ship, you use the Add/Remove command from the ships command console, its found in the trade menu. You will need to select any station
in a network and the ship will be added to that network, Once added it will fly to one of
the closest stations in the network.
6. Removing Ships from a network
To remove the ship, you need to select the add/remove command from the ships trade menu to remove it from the network.
7. Distribute Goods
To distribute goods between sectors, simple dump them in one of the stations in the network and they will be distribute between the whole network.
8. Future Updates
* Add the ability to add stations and complexs to the network for ships to pick up goods from.
* Add selling ships to the trading stations to allow it to sell all the goods from the stations.
Last edited by Cycrow on Sun, 7. Sep 08, 23:58, edited 2 times in total.
if you dump some wares into one station, it works out the average that should be in all stations, then it calls in any free ships to send all the wares to different stations.
ie, say you have 3 trading stations, and you put 30 units of energy cells in one of them, then a ship is called to pick up 20 units and drop of 10 units at the other 2 stations
ie, say you have 3 trading stations, and you put 30 units of energy cells in one of them, then a ship is called to pick up 20 units and drop of 10 units at the other 2 stations
yeah you need to still put wares into one of the trading stations, but in the next version i will be adding the ability for ships to pick up wares from your stations and bring them to the trading stations.
but you dont need to have each of the wares on the list, if you put one ware in a station thats not even listed in the others, then it will still distribute them fine
but you dont need to have each of the wares on the list, if you put one ware in a station thats not even listed in the others, then it will still distribute them fine
Cheers for the answer bud, I'm just about to set up another network and this will make things a lot easier (no need for hundreds of m4's/m5',s flying about).
The selling ship would be a great idea if it can sell all of the wares from a certain station.
Might be a good idea to stop any of the ships being able to enter Xenon space if possible.
The selling ship would be a great idea if it can sell all of the wares from a certain station.
Might be a good idea to stop any of the ships being able to enter Xenon space if possible.
-
- Posts: 1406
- Joined: Wed, 6. Nov 02, 20:31
Hi Cycrow just started the trading network and have a bit of a problem
Right I bought 2 stations (Argon) and put one in Argon Prime and one in Light of Heart. Also a new Caimen SF (fully kitted with jump drive etc).
Created the network starting with the AP station and added the LoH, then added the Caimen which was parked at the AP EQ Dock (it jumped to the LoH station and docked).
Checked the Network status all looked fine. So I dumped some Space Fuel in the AP station. The Caimen sat around doing nothing .
So i stuck 1 unit of space fuel in the LoH station to see if that made a difference, nope Caimen stationary.
So I jumped him to AP Station to see if that would kick start him. Now he is sat in the AP station going between Idle and None and strangely his E-cells are increasing even though the Stations don't stock them.
I did reload and tried stocking Ecells then Space Fuel with much the same result.
Just wondered if you had any ideas, Cheers Bud
Right I bought 2 stations (Argon) and put one in Argon Prime and one in Light of Heart. Also a new Caimen SF (fully kitted with jump drive etc).
Created the network starting with the AP station and added the LoH, then added the Caimen which was parked at the AP EQ Dock (it jumped to the LoH station and docked).
Checked the Network status all looked fine. So I dumped some Space Fuel in the AP station. The Caimen sat around doing nothing .
So i stuck 1 unit of space fuel in the LoH station to see if that made a difference, nope Caimen stationary.
So I jumped him to AP Station to see if that would kick start him. Now he is sat in the AP station going between Idle and None and strangely his E-cells are increasing even though the Stations don't stock them.
I did reload and tried stocking Ecells then Space Fuel with much the same result.
Just wondered if you had any ideas, Cheers Bud
hmm, not sure whats going on there, check in the global script tasks, to c if, pluign.tdn.logic is running
ill have a look c if i can find any problems.
have you not been able to get it to work at all ?
u could also try removing the jumpdrive, c if that makes a difference, so at least ill know where to look
ill have a look c if i can find any problems.
have you not been able to get it to work at all ?
u could also try removing the jumpdrive, c if that makes a difference, so at least ill know where to look
No not had it working at all.
Looked for plugin.tdn.logic and it does run ocassionally but mostly the tdn.returnhome is spamming it.
Tried without the jump drive and the Caimen half filled with wares (as it should) went to the other station and stayed there with the wares in the cargobay. Didn't off load them.
So I'm guessing something to do with the jumpdrive and the Returnhome command maybe.
Cheers
Looked for plugin.tdn.logic and it does run ocassionally but mostly the tdn.returnhome is spamming it.
Tried without the jump drive and the Caimen half filled with wares (as it should) went to the other station and stayed there with the wares in the cargobay. Didn't off load them.
So I'm guessing something to do with the jumpdrive and the Returnhome command maybe.
Cheers
Don't know if this helps but if the ship is in the station that is set as the home base at that point it just keeps Looping the plugin.tdn.returnhome script. Either that or something keeps calling it.
If it is in the station that is not the homebase it gets stuck in plugin.tdn.shipdeliver script 'move to station' bit where ecells are checked and added.
I'm no scripter but I had a gander just to see if I could make sense of it and thats about as far as I got.
I'll have to do some homework
If it is in the station that is not the homebase it gets stuck in plugin.tdn.shipdeliver script 'move to station' bit where ecells are checked and added.
I'm no scripter but I had a gander just to see if I could make sense of it and thats about as far as I got.
I'll have to do some homework
I got to work a bit, using three trading stations, and a bunch of jumpdrive equipped Mako's. Just had the trading station nearest my factories buy stuff locally; the TDN assigned Mako's then just did their thing and tried to fill up the other trading stations. Only thing I did different, is I "added wares" to each of the other trading stations, not knowing that you don't have to do that, according to what Cycrow just said.
I'm just not having the best of luck here with the Mako's moving ALL of my wares around. I'll play with it a bit more.
Cycrow, if the transporters are jumpdrive equipped, will they automatically jump from one station to another, thus avoiding pirate sectors?
This is a great idea by the way.
I'm just not having the best of luck here with the Mako's moving ALL of my wares around. I'll play with it a bit more.
Cycrow, if the transporters are jumpdrive equipped, will they automatically jump from one station to another, thus avoiding pirate sectors?
This is a great idea by the way.
Cycrow I have been trying to work out whats going on which isn't easy when you know nothing about scripting . Anyway I checked the debug screen in the script editor and the ship seems to be stuck here :-
Thats from plugin.tdn.returnhome. The code in !move.movetostation that the debug shows is:-
I'm sure you will have more luck.
Cheers
Line 034 - 036 in an endless Loop.026 [THIS] -> set local variable: name='plugin.tdn.status' value='dock'
027
028 $homebase = [THIS] -> get homebase
029 if [THIS] -> get amount of ware Jumpdrive in cargo bay
030 @ = [THIS] -> call script 'lib.cycrow.jumptomax' : Station or sector=$homebase
031 else
032 [THIS] -> set destination to $homebase
033 [THIS] -> set command: COMMAND_DOCKAT
034 while not [THIS] -> is docked
035 @ = [THIS] -> call script '!move.movetostation' : station=$homebase
036 @ = wait 100 ms
037 end
Thats from plugin.tdn.returnhome. The code in !move.movetostation that the debug shows is:-
I haven't worked out why yet but thats not suprising as I have only read a couple of newbie guides.001 skip if $targetstation -> exists
002 return null
I'm sure you will have more luck.
Cheers
well, a simple check to c if the homebase exists should work, althou it should exist anyways
but it might be worth a try
ill add it in the next version, but u can add it the to current version and c if it fixes it.
also, is the return home script actually running in the global scripts ?
but it might be worth a try
Code: Select all
while not [THIS] -> is docked
... (move to station
....(wait)
skip if [THIS] -> exists
break
ship if $homebase -> exists
break
end
also, is the return home script actually running in the global scripts ?
Right gave it a try returnhome now reads:
The return home script is running multiple times in global scripts, at least a few pages full, this may have something to do with it.
But still getting the same result034 while not [THIS] -> is docked
035 @ = [THIS] -> call script '!move.movetostation' : station=$homebase
036 @ = wait 100 ms
037 skip if [THIS] -> exists
038 break
039 skip if $homebase -> exists
040 break
041 end
The return home script is running multiple times in global scripts, at least a few pages full, this may have something to do with it.