[SCRIPT] Salvage Network 2.8 [08.11.08]

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

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

Post Reply
User avatar
TECSG
Posts: 1604
Joined: Tue, 17. Feb 04, 22:06
x3tc

[SCRIPT] Salvage Network 2.8 [08.11.08]

Post by TECSG » Tue, 15. Nov 05, 00:16

SALVAGE NETWORK V2.8 by TECSG (08/11/2008)

UPDATE: 08/11/2008
Version 3 is soon to be released, it will be available in two versions, one for Terran Conflict and one for Reunion.

UPDATE: 18/09/2007
This script is now compatible with the XTended .7 Mod as of V2.7+


Get the script here:-
Version 2.8 (X3:Reunion)


What is it?
The Salvage Network script will scan the X-Universe for unclaimed ships (there are 12 'freebie' ships) and any ships you have fought and forced the pilot to eject but not yet claimed. It will also carry out a more detailed scan of the current sector for 'hidden' crates. (See Update Ino. at bottom of this post).

The 'theory' is that any sector that you have placed a Navigation, or Advanced Satellite in will become part of a surveillance network. Your ship accesses this network (via the Special Command software) and queries each sector in the network. Sectors with Advanced satellites will return more information about unclaimed ships than a sector with just a Navigation satellite.

How do I install it?
The file is now a .spk file that can be easily installed with Cycrow's Script Installer.

How do I access the Salvage Network?
Firstly, you need to activate the script editor. X3 will not allow 3rd Party scripts to run themselves, they must be activated from the script editor, or at least, have the script editor active.

To activate the editor, start the game, and load in your last game/select a new game. Once in the game, press 'p' to bring up the player options, select the 'rename' icon and enter the name 'Thereshallbewings' (that's 'There shall be wings', with a capital 'T' and no spaces). This will NOT rename your player, just enable the script editor. If it works, there will be a short pause (about 3 seconds where the game appears to lock-up), and the 'rename player' box will dissappear.

Most scripts with setup or init scripts will automatically run themselves the next time the game is saved and reloaded, so you can just save and then load (you will receive a message from the script in your log telling you it's been activated)

To activate the script without saving and reloading, press 'SHIFT+c' to bring up the ship's command interface (if you are docked, go to 'player options' and 'global commands'). Press 's', or select 'script editor' option.
Run the script 'setup.TECSG.salvage' to add the commands to the menu. You may additionally need to save and then reload your game for the changes to take effect. Sorry for all the fuss, it's X3, not me!

You need the Special Command Software Mk. 1 (available from most equipment docks for a small fee) to add the command to your ship's menu. Once the software is installed, go to your ship's command interface and select 'Salvage Network' from the 'special' menu.

What will it tell me?
When you activate the command, you will receive a message from the software. In sectors with a Navigation Satellite, it will just tell you there is a ship in that sector. In sectors with an Advanced Satellite, it will also give you the coordinates for the ship. You current ship will be treated as an Advanced Satellite, so you will ALWAYS get detailed information on any ships in your current sector.

UPDATE: As of V2.6, there is also a 'Detect Crates' command, this will (if activated) send you a message if you enter a sector with 'Hidden Crates' or wares' in it.

I do not know if this is standard for every game, but mine had 20 'hidden' crates, with a value of over 11,000,000. There were 24 Concussion Impulse Generators amongst other things!

How do I find the ship?
If you only got the sector information, it's a case of searching the entire sector (and quite possibly beyond!). With the Advanced Satellite, you will receive the ships coordinates too. With these coordinates, the easiest way is to select 'move to position' from the menu, and select the sector, then use the arrow keys on the numeric pad to move the cursor to the coordinates. Press INS to change axis to alter the Z position. When you press ENTER, you will then move to the exact position of the unclaimed ship.

WARNING!
If you tell your ship to move to the EXACT coordinates, you may crash into the unclaimed ship, as long as you move to within a few km, you can target the ship and fly in manually.


What is Network Coverage?
Network coverage is the percentage of X3 universe sectors that have a satellite in them. It is unlikely that you will ever gain 100% coverage, as the Xenon don't particularly like you placing satellites in their sectors. Pirates are also rather inclined to keep their business to themselves without having people setting up spy networks in their midst, so don't expect all your satellites to be safe!

Do I have to put a satellite in every sector?
No, chances are you couldn't anyway! You can get away without satellites if you really want to, although I find it easier to place a satellite in as many sectors as possible, however, as your ship is treated as a satellite, you can fly to each sector in turn and access the network before moving onto the next sector.

Are there any tips/tricks to using the Salvage Network?
The best way to utilise the network it to place one Nav. Satellite in as many sectors as possible and then query the network. Then fly to sectors with an unclaimed ship and query the network again to get the exact coordinates. Claim the ship before moving on to the next ship found.

Anything else?
Yep! Just to make your life a little easier if you do decide to put satellites in loads of sectors, you will find in the Navigation menu (if you have Navigation Software Mk. 1 installed) a command 'Move to centre of sector'. I think the title is fairly explainatory! I have never had it crash me into anything, but as it uses the X3 autopilot, there's no guarantees it won't!

Terminating Deployment of Satellites
Once the Satellite Deployment Service is started, it will run forever. If no Satellites need to be replaced, it will not cost you anything, however, it can be a constant drain if you have a lot of enemies out there!

If you wish to terminate the deployment of Satellites, you can run the script 'A1.SatelliteNetworkTERM', this will instruct the script to cancel further deployment of satellites.

EDIT: IMPORTED FROM POST ON PAGE 3!

UPDATE: VERSION 2.1

I've just completed an 'add-on' to the Salvage Network script. This new routine will (attempt to) create a random ship in a random sector every 6 (game time) hours (providing certain random criteria are met).

I've used 115 of the pre-defined ships as possibles to be created, they are M5, M4, M3, TS and some 'specials' (Arrow, StarBurst and Xperimental Shuttle to name but a few), also now included are some of the new M3+ and M7's!

I've tried hard to keep the generation routine balanced, ie, not too many free ships too often, but basically the format is this...

Every 6 hours the routine will decide whether or not to create a ship. There is a 50% chance it won't.

If it does decide to create one, it will pick a random sector. If the sector is a 'null' sector, ie, not used in the game, the routine will not create a ship, thereby reducing the posibillity to about 25%.

Of that 25%, the following probabilities apply:

Creating an M5 (40%)
Creating an M4 (20%)
Creating an M3 (10%)
Creating a TS (15%)
Creating a 'special' (5%)
Not creating anything (10%)

The chance of getting an ship is about 1 in 5 every 6 hours (so 1 ship every 30 game hours), and the ships will be randomly damaged and have random amounts of Engine Tunings, Rudder Optimisations, Cargo bay Extensions, Shields installed, software and other 'goodies'.

I may also include weapons later!

UPDATE: VERSION 2.2


The Salvage Network script now comes with an additional product available at all good equipment docks, and, no doubt, some bad ones too. The 'Salvage Claim Software Mk. 1' will transmit a control virus from your ship to a targetted derelict ship, and, if the ship is within 1,000m, the virus will take over the ships systems and bring it under your control.

You should only use this software on derelict/emepty ships though, the owners may not appreciate you trying to steal their ship whilst they are still in it!

Once claimed, the ship will automatically fly to the nearest (friendly) shipyard and dock there.


-- Future features --

:arrow: Attempting to claim a ship that's not empty will make that ship an enemy. [DONE: As of V2.5]

:arrow: Constantly trying to claim ships that aren't empty will turn that race against you. [DONE: As of V2.5]

:arrow: More ship types will be included in the random generator, (as you don't need to claim them in the original way, several more ships that you couldn't claim before (like Military Transport) can be added and claimed with the Claim Salvage Software Mk. 1) [DONE: As of V2.5]

:arrow: Self-replicating Satellite Network (Will slowly spread out over the universe, and automatically replace any lost satellites) [DONE: As of V2.4]

:arrow: Maybe including weapons on randomly generated ships.

:arrow: Maybe have random cargo still in cargo bay of randomly generated ships [DONE: As of V2.5]


UPDATE: VERSION 2.4

The Satellite Network is now finished and included in the Salvage Network script, this will allow you to create universe-wide networks of various types of satellites. See the included readme for full details. All of the above 'future features' are also included except weapons and cargo, which I will work on next.



UPDATE: VERSION 2.5
More improvements have been made, and this version is compatible with X3 2.0.02


UPDATE: VERSION 2.51
One of the scripts (CMD:Move_Centre) was missing from 2.5, sorry about that!
Altered the script so that any ships captured in Loomankstrat's Legacy won't fly off to the nearest shipyard... Good old AP had a tendancy to fly them into squash mines. You can claim the ships there as before, but you'll have to fly them yourself!



UPDATE: VERSION 2.6
Added the 'Detect Crates' command. Go to your ships 'Additional Commands' and select 'Detect Crates' and you will receive a message everytime you enter a sector with 'hidden' crates (or wares) in it. Check out the message, and then go get those freebies!

To facilitate collection of the crates, there is also a new 'MoveToPos' command that will move you to within 50m of the specified coordinates. The 'hidden' crates do not show up until you're within about 300m of them. This command will be at the bottom of the Navigation Menu, if you have the Navigation Mk. 1 Software installed that is!

The 'Detect Crates' command will only run on the player's current ship, (i.e. the ship you are flying about in) and will automatically disengage if you switch ships, so you will have to activate it again on the new ship. The command will run until you change to another ship or run the command 'None' in the slot that the 'Detect Crates' command is using.

Added the 'TERMINATE' script to about the Satellite Network', as several people had asked how to cancel deployment of the Satellites.


If you are installing this over a previous version of the Salvage Network script, please remember to select the 'reinit script cache' option in the script editor, this should re-run the init files and make sure all the files in memory are up to date.

UPDATE: VERSION 2.7
The script is now compatible with the XTended .7 Mod
The ship claiming range has been increased to 1km (from 250m) because of the bigger ships in XTM.
If a crate is detected (upon entering a sector) it will be automatically targetted.
Added the 'Move to crate' command.


UPDATE: VERSION 2.8
Added additional checks that should prevent satellites being deployed in sectors where there are already satellites.
Thanks to Trokhon for posting that bug! :wink:

Changed the Termination script, you can now run the script A1.SatelliteNetworkTERM manually to terminate deployment of the Satellites.


Any problems, comments or suggestions, please let me know!
Last edited by TECSG on Sun, 20. Dec 15, 10:18, edited 30 times in total.

Galaxy613
Posts: 3285
Joined: Tue, 28. Dec 04, 02:19
x4

Re: [SCRIPT] Salvage Network

Post by Galaxy613 » Tue, 15. Nov 05, 00:47

TECSG wrote: Firstly, you need to activate the script editor. X3 will not allow 3rd Party scripts to run themselves, they must be activated from the script editor.
Sense when?
10,000 Lightyears of awesomeness

User avatar
TECSG
Posts: 1604
Joined: Tue, 17. Feb 04, 22:06
x3tc

Re: [SCRIPT] Salvage Network

Post by TECSG » Tue, 15. Nov 05, 00:59

Galaxy613 wrote:
TECSG wrote: Firstly, you need to activate the script editor. X3 will not allow 3rd Party scripts to run themselves, they must be activated from the script editor.
Sense when?
Burianek wrote:No unsigned scripts will run without the script editor enabled.
The script editor is never enabled on new games.
Your setup script will run just fine once you:
  • start your game
    enable the script editor
    save the game
    reload the saved game (this is the first time on game load the script editor has been enabled, thus your script will run)
You can, of course, run it manually after enabling the script editor without saving and reloading.
Since now apparently...

User avatar
DeadlyDa
Posts: 1882
Joined: Mon, 5. Jan 04, 04:46
x4

Post by DeadlyDa » Tue, 15. Nov 05, 02:05

I have several scripts that are run when a new game is started or a saved game loaded...no need to start the SE to get them to work.

One of them, "!setup.Deadly.Salvage.Pump" (which keeps your stash of salvage insurance topped to 100) has been shared with a couple of other players, and it works for them as well.

EDIT: There is an issue if you are running the plot. If you start a new plot game, the setup script won't have run when you are first turned lose in your ship. If you immediately dock at a station, save (or let the autosave run), quite the game and reload, your setup script will run.
EDIT #2: I also run Xai Trade Commands 1 & 2, along with the old Bounty Hunters scripts by MQ (modified for X3 by myself). They all use either init or setup scripts, and all work fine. Of course, you do get the "modified" indicator if you scroll down to the bottom of your personal information :roll:

The reason I run my own setup scripts is so I don't have to turn on the SE...since if it is enabled I can't trust myself not to pop over to the SE and script myself a fresh hull after a particularly disastrous combat encounter :oops:

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Tue, 15. Nov 05, 03:15

just a suggestion

it's nice if the directories are included in the zip so when you extract it the files automatically go to the correct places.

Kamenjar
Posts: 349
Joined: Wed, 3. Dec 03, 00:40
x3tc

Post by Kamenjar » Tue, 15. Nov 05, 03:32

Do salvageable ships actually appear out of "NPC" combats? I thought pilots would eject only if if the non-NPC initiates combat with them. Basiclaly in order to get them to eject, you gotta pound on them pretty hard at first and then you gotta poke them a couple of times to make them eject. From what i've seen NPC will never pound "hard" and they will miss often.

I'm just trying to find justification to run for this script and for buying advanced satelites, cause normally I see that I have made the pilot eject and I can easily find the ship after in the sector menu.

Have you actually made any profit to justify the cost of advanced satelites?

User avatar
TECSG
Posts: 1604
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG » Tue, 15. Nov 05, 06:21

DeadlyDa,

The script "!setup.Deadly.Salvage.Pump" will run because of the "!" at the start, this indicates to X3 that the script is signed, (ie, has been approved by Egosoft).

If you have named this script yourself, it may be wise to check first, I'm not sure if people would appreciate unsigned scripts using the "!" prefix.

Signed scripts will run without the SE, otherwise everyone would have to enable the script editor just to play the game!

Kamenjar,

Salvageable ships (aside from the 12 'freebies') only come from player combat as far as I know.

I, personally, wouldn't set up an entire network of Advanced satellites, far too expensive! However, many people set up Satellite networks (using standard Sats.), for monitoring pirate activity, remote trading, etc., and this script will work find with that.

if you know there's a ship in a certain sector, fly there and drop an Advanced Sat. then run the script again, with the Advanced Sat. there, it will give you the coords. too. Hell, you might even be able to locate it yourself, then you wouldn't need any Advanced Satellites! :D

As for profit, the 12 'freebie' ships are worth 4-5 million... Is that enough profit for you?
:lol:

Seriously though, like I said in the readme, I'd just carry one Advanced satellite about and deploy it, scan the network, pick up the satellite again and grab any ships.

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Wed, 16. Nov 05, 02:43

TECSG wrote:DeadlyDa,

The script "!setup.Deadly.Salvage.Pump" will run because of the "!" at the start, this indicates to X3 that the script is signed, (ie, has been approved by Egosoft).
It takes more to sign a script than simply putting a ! in front of it.
User created scripts with the ! in front of them will not run unless the script editor has been activated, just the same as those without a !.
There's a different mechanic to signing.
"Nature's first green is gold" . . . stay golden.

User avatar
DeadlyDa
Posts: 1882
Joined: Mon, 5. Jan 04, 04:46
x4

Post by DeadlyDa » Wed, 16. Nov 05, 03:07

TECSG,

The only reason I put the "!" in front is to keep the script from showing up in the SE. It has no other effect. As Burianek said, the "!" does not indicate a signed script. Take a look at one of the signed X2 scripts, and at the bottom you will see the word "signed" at the bottom. I would imagine there is some form of hash total being imbeded into the script.

I have no interest in trying to "fool" anyone into thinking anything I write has been signed...I'm not that good :roll:

Burianek: Quick question for you. You say that no unsigned script will run without first activating the script editor. That is most definitely not the case...at least on my machine. I just verified this by starting a new game, and my setup script ran just fine (as did the Xai Trade Command 1 & 2). The script editor had not been run...in fact, as soon as I was placed in control of my ship, the first (and only) thing I did was to look in the player log to see if the startup messages were there from the various setup scripts...and they were.

This was also the same way that X2 behaved...was this supposed to change in X3?

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Wed, 16. Nov 05, 03:16

@Deadly, When beginning custom games, unsigned scripts WILL load automagically without the script editor. This is definately NOT the case for a plot game though...

User avatar
DeadlyDa
Posts: 1882
Joined: Mon, 5. Jan 04, 04:46
x4

Post by DeadlyDa » Wed, 16. Nov 05, 03:49

Nuke,

Not quite. Just to make sure I wasn't going crazy...I just retested.

Here is how it works (I posted this somewhere, but I don't remember where):
  • 1. Start a normal plot game.
    2. As soon as you receive control of your ship, immediately dock at a nearby station, allowing it to auto save (or save manually).
    3. Exit X2.
    4. Restart X2, and load the save game.
    5. Your setup and init scripts will have been run.
As you can see, at no time do I start the SE. Using this method, I am running Xai MTC, Trade Commands 1 & 2, Bounty Hunter 2.0 (from MQ), Xai FSUP, AS Buy Rare Goods, AS Turret Guard, Xai PRS, and InfoWares. They all initialize and run just fine without my ever activating the SE.

Mr. K
Posts: 102
Joined: Sun, 29. May 05, 21:36
x3tc

Re: [SCRIPT] Salvage Network

Post by Mr. K » Thu, 17. Nov 05, 22:24

TECSG wrote: How do I install it?
Copy the file 445556.xml into the 't' folder in your X3 folder
Erroneous install instructions, it's actually 447074.xml

Please update the initial post and the included readme.

User avatar
TECSG
Posts: 1604
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG » Thu, 17. Nov 05, 22:42

Apologies Mr. K,

You appear to have an older version. I've just checked, the text file on the current version does say 447074.

However, the initial release did use 445556, this had to be changed to be compatible with other released scripts.

Please download the file again. It also included instructions for replacing on older version.

Let me know if you have any problems, and thank you for your vigilance.

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Fri, 18. Nov 05, 02:06

DeadlyDa wrote: Burianek: Quick question for you. You say that no unsigned script will run without first activating the script editor. That is most definitely not the case...at least on my machine. I just verified this by starting a new game, and my setup script ran just fine (as did the Xai Trade Command 1 & 2). The script editor had not been run...in fact, as soon as I was placed in control of my ship, the first (and only) thing I did was to look in the player log to see if the startup messages were there from the various setup scripts...and they were.

This was also the same way that X2 behaved...was this supposed to change in X3?
You're running some sort of mod then. Something has happened to put your game into modified mode. In an unmodified game, unsigned scripts are not run. The only way they can be run is if they are called from signed scripts. Unsigned setup scripts should not be running by themselves. If they are, it's a bug (or you're missing something)
"Nature's first green is gold" . . . stay golden.

Mr. K
Posts: 102
Joined: Sun, 29. May 05, 21:36
x3tc

Post by Mr. K » Fri, 18. Nov 05, 02:41

Odd.. very odd.

Especially since I used the download link in this thread, and I only downloaded it ~5 minutes before posting.

Re-downloaded, instructions are now correct, but you still need to edit the first post of this thread ;)

User avatar
TECSG
Posts: 1604
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG » Fri, 18. Nov 05, 07:23

Thank you for noticing the out of date info at the start of the thread too, I've ammended that now.

I hope it works okay for you now.

Lothmorg
Posts: 662
Joined: Tue, 11. Nov 03, 19:48
x3

Post by Lothmorg » Fri, 18. Nov 05, 07:42

Burianek wrote:In an unmodified game, unsigned scripts are not run. The only way they can be run is if they are called from signed scripts. Unsigned setup scripts should not be running by themselves. If they are, it's a bug (or you're missing something)
I too, have to report that unsigned scripts run in new games.
I've restarted quite a few times now, and every time, I get an incoming message from LV's cheat script. I then have to enable the script editor to run my scripts.
There are 10 kinds of people in the world.
Those who understand binary and those who don't.

Mr. K
Posts: 102
Joined: Sun, 29. May 05, 21:36
x3tc

Post by Mr. K » Fri, 18. Nov 05, 11:33

Oh, the script worked fine regardless, I just like to nitpick :D

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sat, 19. Nov 05, 01:10

Lothmorg wrote: I too, have to report that unsigned scripts run in new games.
I've restarted quite a few times now, and every time, I get an incoming message from LV's cheat script. I then have to enable the script editor to run my scripts.
You get the incoming message but none of the cheat commands appear in the command console?

That's really strange, since it suggests that only partial areas of scripts are being run. (the exact same file that sends the initial message also puts the commands in the menu). That's very odd.
"Nature's first green is gold" . . . stay golden.

User avatar
DeadlyDa
Posts: 1882
Joined: Mon, 5. Jan 04, 04:46
x4

Post by DeadlyDa » Sat, 19. Nov 05, 01:42

Burianek,

The scripts are fully functional.

With the Xai scripts that I am running (as well as others), everything works as expected:
  • -- I get incoming messages from Xai that a particular piece of software has been loaded (Trade MK1 & 2, FSUP, etc.).
    -- The software is available for purchase from the various equipment docks.
    -- Once purchased, the respective commands are properly implemented into the ships menu.
    -- When commands are executed, they work properly.
I am not running a modded game, just the base DVD patched to 1.2.01 (now testing the next patch, but it works the same).

At least on my machine, the init and setup scripts do not work on a plot game without a bit of effort. As stated earlier, I dock at a station shortly after the opening plot cut scene. I exit the game, and rename/edit my setup script to use the "!" as a prefix. (I doubt that the "!" is needed, since the Xai init & setup scripts run fine without it.) When I restart from the saved game...the script(s) work exactly as they do in a non-plot game.

If this is not the expected behavior, let me know and I will report it over on the beta testing forum.

Post Reply

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