[SCRIPT] Trading Distribution Network V1.01 : Update 04/10/2006

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

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

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22248
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Fri, 6. Oct 06, 02:23

did you hcekc if the ship has the jumpdrive installed and has enough energy cells ?

Diesel309
Posts: 704
Joined: Sun, 11. Apr 04, 14:37
x3

Post by Diesel309 » Fri, 6. Oct 06, 13:55

Yep caimen has 1000 ecells and a jumpdrive.
-Add to network he jumps to LoH station. He docks at station (get ship added message).
-I add wares to the AP station he leaves and flys to AP station.
-Gets to AP station (after many minutes on SETA LOL) picks up wares.
-Flys back to LoH station.
-if I add more wares he will fly back and forth but no jumping.

So the only time he jumps is when added to the network.

SageQuertas
Posts: 3
Joined: Sat, 4. Nov 06, 06:53
x3

Post by SageQuertas » Thu, 9. Nov 06, 21:09

Great Script.
Could you make one or add to this one and add it so complexed hubs and or factories and other dockable/trading places can be connected? It would make it so far more easier to manage the factory complexes like this as well.
A "global" trade network to allow all types of docks in to easily manage trade ships.

thanxs
Sage Quertas
There is no I in Team..
- Well there is no U Either
Well if im not on the team
And your not on the team
The no on is on the goddamn friggin team!!!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22248
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Thu, 9. Nov 06, 21:29

well, i will be adding scripts to pick up wares from stations or complexes to drop them in the nearest trading station. But not had chance to do it yet.

but there might be some scripts already that will allow you to deleiver them

The_Sol
Posts: 6
Joined: Fri, 6. Jan 06, 07:52
x3

Post by The_Sol » Sat, 25. Nov 06, 07:40

outstanding, fantastic even, yes agreed a genius wow

does it help to eat shredded wheat in the morning.?

did shredded wheat have anything to do with you being so dam clever coming up with this excellent add-on to one of the best games around

umm I think it's called 4XXXX er umm x3!!!!

just asking because I'v been eating shredded wheat in the morning for the past two weeks,

it's taken me two weeks to put together a flat packed wardrobe together, umm is that good.? can I contribute it to my eating shredded wheat.?

but I also smoke space weed, especially when visiting argon prime, I have had some very near death experiences

so a warning to any space weed smokers, when you start seeing flashing coloured lights and big giant space flies flying around, then STOP your ship!!

making sure nothing is coming up your back passage, you wouldn't want to get rammed from behind eh

like I have so many times, my backend ( of the ship ) has been split right apart, very painful

just like my girlfriend, very painful, especially when it's raining for some unknown reason

sorry getting carried away there lol excellent, just amazing, Dam your hot

keep up the great work man
extreme, the only way

LIZERTECH
Posts: 35
Joined: Mon, 10. Apr 06, 15:12
x3ap

Post by LIZERTECH » Sun, 10. Dec 06, 20:01

how do you add a trading station to the network? does it has to be your own trading station or can also be others?

pmachin
Posts: 15
Joined: Mon, 25. Sep 06, 23:51
x3tc

Post by pmachin » Mon, 11. Dec 06, 11:44

I would suggest reading the instructions on the first page of this thread. That will then answer your second question...(But to save you the trouble) theanswer is no, because you are unable to issue commands to trading stations other than your own.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22248
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 11. Dec 06, 21:46

yea they can only be your own trading stations. As the idea is to distribute stock to your tradinig stations. to do that with NPC trading stations would be more like buying/selling to them not simply distributing them.

basically, it allows you to sell you goods throughout the universe, even if you produce everything on one side of the universe.

of course, u could also use them as a refueling station, fill them up with energy cells and have it distribute accorss your network, then where ever you are in the universe, u'll be fairly close to a station with plenty of energy cells in

User avatar
Die Wurst
Posts: 29
Joined: Fri, 28. Jul 06, 16:53

Post by Die Wurst » Sat, 16. Dec 06, 13:18

This script doesn't seem to work properly in 2.0.02.
The ships assigned to the trading network don't use their jumpdrives to distribute the resources among the stations.
I bought three ships with jumpdrives, gave them 1000 Ecells for jumps, then assigned them to the network. They then jumped (somewhere, I don't know where), and I thought they would go about their business.
I had arranged one way deliveries to the trading stations in the network (with another script), so that there would be resources to distribute in each of the stations (one per station). I also had at least a few Ecells in each station. Furthermore I had made sure previously that each trade station had the resources to be distributed listed in their trade lists, just in case that this might have been needed to calculate the need for the distribution of a resource.
As time went on though, I noticed that they weren't being distributed at all. I checked up on the trade ships assigned to the network, and found out why.
The ships tried to reach one of the stations by flying towards it through regular space instead of using their jumpdrives.
I checked their cargo holds and they had each over 900 energy cells, plenty to jump from one end of the universe to the other.
Could you fix this?

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22248
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sat, 16. Dec 06, 22:20

i've been meaning to look into the jumpdrive problem, but had much time atm thou, but i will get round to it eventually

SaGa59
Posts: 14
Joined: Wed, 27. Dec 06, 09:59

Post by SaGa59 » Wed, 27. Dec 06, 10:34

Hi!

(first: sorry for my poor english!)

I play with v2.02. Downloaded "All scripts" package from Cycrow's page, and the Bonus Pack 3.1.04 from Egosoft.

Installed the Bonus Pack, and added the scripts with the Script Installer.

TDN not working (others yes). In the Command Console of my stations not "Creating a Network" command or other TDN commands. Only in the command console of ships, is the "Assign ship to network" and nothing in nowhere..

If I start the crate network command from Script editor, working.
Manually started the initial tdm plugin command in Script editor, but nothing not happen...

SaGa
SaGa

stuw2k
Posts: 6
Joined: Sat, 13. Jan 07, 21:36
x3ap

Post by stuw2k » Thu, 8. Feb 07, 17:42

i also have the same problem as saga.

i can manually start it up via script editor, however the command does not appear in my stations, but it appears for my ships to add a ship to the network.

suggestions please master cycrow

stuw2k

JBL
Posts: 234
Joined: Sat, 10. Mar 07, 20:51

Post by JBL » Wed, 4. Apr 07, 02:00

I maged to set up 1 trading distrubution centre between 2 stations (pretty much by accident) have 2 ships doing something between them (haven't figured that out yet)

Problem is I can't seem to set up a second network when I folow the instructions it keeps messaging me saying the station is not on the network but I know 3 stations have been accepted as G1?

Do I always have to point back to the first station I put on the network called G1?
Windows XP/Vista (Dual Boot)
Pentium 4 3.6
Memory 4 GB
Video ATI X1600 512
Dual LG 22" Monitors
Saitek X52

wanderer
Posts: 278
Joined: Wed, 6. Nov 02, 20:31
x3tc

no Teladi Tradestation in own sector

Post by wanderer » Sun, 20. May 07, 01:56

Hi Cycrow,

you've have a problem with the asignment of the Teladi Tradestation, when you own your own sector.
This station is given to you, after you successfully bought the sector.

Well, now, I was confused that this station cannot be used as a normal 'Trade Dock' class. I checked, and this station is of type 'Dock' only. This is a EGOSOFT error. I checked the trade docks of other races. They are all assigned correctly.
(This problem seems in a lot of other scripts as well...)

regard

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Sun, 20. May 07, 09:49

Ah, now that's what the Self Destruct feature is for!

Just build a new one that isn't bugged. Since you could afford the sector, that should be no problem at all. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

wanderer
Posts: 278
Joined: Wed, 6. Nov 02, 20:31
x3tc

Problems with the renaming scriptpart

Post by wanderer » Mon, 21. May 07, 02:09

Hi Cycrow,


well found another problem :(
While my TDN stations are quite working as they should, including the ship. I saw the names of them blinking like flashlights....

Problem:
You rename them inside 'plugin.tdn.checkname'. This script is an active task as long as the station is inside the network. Now, you set a 'tag' infront of the original station name.
While running this script loops and sets - resets - sets ... the station name. This is one heavy performance load, if you have a larger network. Also, under some rar circumstances, you may have 2 or more tags int the name - was quite impressing :D
You can see this 'switching' inside the station or enviroment overview. Also if you have other stations inside the same sector, you may see the possition of the entry moving. This while EGO sorts them alphabetically.
As I said - like a flash light...
Even if you set the tag behind, it flashes. And you should not do this with your routine to find the old name (the 'gosub' part).

So I changed the complete class, like this:

Code: Select all

001   infinite loop detection enabled=[TRUE]
002   
003   $page.id = get global variable: name='plugin.tdn.id'
004   $oldname = [THIS] -> get name
005   $pattern =  read text: page=$page.id id=7
006   
007   * In case of new start; save old Station name as local VAR
008   $Station.name = [THIS] -> get name
009   skip if [THIS] -> get local variable: name='Station.oldname'
010    [THIS] -> set local variable: name='Station.oldname' value=$Station.name
011   
012   * Check the naming, as long we are in a network:
013   while [THIS] -> get local variable: name='plugin.tdn.network'
014    $network = [THIS] -> get local variable: name='plugin.tdn.network'
015    $Station.oldname = [THIS] -> get local variable: name='Station.oldname'
016    if ( $Station.oldname == $Station.name ) OR ( $old.network != $network )
017     
018     $tag = sprintf: pageid=$page.id textid=3, $network, null, null, null, null
019     $name = $Station.name + ' ' + $tag
020     [THIS] -> set name to $name
021     
022   * Set the network to its actual name, so we lop until end or new network.
023     $old.network = $network
024     
025    end
026 @  = wait 1000 ms
027   end
028   
029   
030   * In case we stopped the TDN, return to old station name.
031   $name = [THIS] -> get local variable: name='Station.oldname'
032   
033   * DO RENAME
034   [THIS] -> set name to $name
035   
036   
037  return null
Hopefully you can use this as an improvement.
And by the way, you may now set the 'tag' about the network where you like it - I set it behind the Station name in above script.

regards

wanderer
Posts: 278
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by wanderer » Mon, 21. May 07, 02:12

Gazz wrote:Ah, now that's what the Self Destruct feature is for!

Just build a new one that isn't bugged. Since you could afford the sector, that should be no problem at all. =)
Ich bin Schwabe - do wird g'schpart ! ... :lol:

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

Re: Problems with the renaming scriptpart

Post by jlehtone » Mon, 21. May 07, 08:12

@wanderer:
Lines 004 and 005: $oldname and $pattern look like unused variables and thus unnecessary lines.

But, line 015 sets $Station.oldname, and that call does not seem to change within the loop, so I would rather assign $Station.oldname=$Station.name after line 010.

$Station.name does not seem to update within the loop, but I think it should.

Where is $$old.network initialized?
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22248
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 21. May 07, 11:51

well, the point about the gosub part was to check if the tag is already in the name, if it is, it shouldn't change it. The idea is that it only changes the name when the player edits the station name

the problem with the one u posted is that once u set the network, the name is fixed, so if the player tries to change it, it will always revert back to the original name.

whereas my, whats sposed to happen is if the player changes the name, the script adjusts to use the new name, and adds the tag if its not there

wanderer
Posts: 278
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by wanderer » Mon, 21. May 07, 15:16

Hi together,

@jlehtone:
Lines 004 & 005 correct - leftover from the old script. Kick them out.
Lines 009 & 010 check if this script is run the first time. If yes save the current station name. Ok. I forgot to del/reset the value after this script is finished, while station is no longer inside the TDN.
Line 015 - makes sense, its always the same - so move it before 013
$Station.name: Correct I only wanted to let it the name before TDN was started. In case you want to change the name after the TDN is started, we need another value. So we can check against original name. Also we then need a function to recocnise the TDN pattern.
$$old.network: set in Line 023 (yeap, unclean programmed while not defined :wink: ) after the renaming, so the 'If...' to rename (Line 016) is FALSE. In case we change the station to another network - the IF will be again used, and the station renamed.

@Cycrow
Wellll... but If you use other scripts for your station, like Station Management System (http://forum.egosoft.com/viewtopic.php?t=146574) or Ship/Station Names Managment http://forum.egosoft.com/viewtopic.php?t=155344; It becomes a serious problem. Not the flashing, but the performance will go down. Calculate: 1sec task, e.g. 10 Stations inside the TDN -> so, around every 10sec the game have to resort the tables, while the renaming is done.
Hm, Best way is to set an option to say 'Show Station Tags'. So you can toggle it. Maybe you can make a special 'setup.extendedTDM.option' script. Where settings can be centralized set/changed e.g....


regards

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