
[SCRIPT] Salvage Command Suite V4.11 [29/12/2012]
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 911
- Joined: Sun, 17. Jul 05, 14:43
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
-
- Posts: 911
- Joined: Sun, 17. Jul 05, 14:43
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
-
- Posts: 3206
- Joined: Thu, 16. Jul 09, 12:24
-
- Posts: 741
- Joined: Tue, 4. Jan 11, 22:03
I've done a lot of wreckage reclaiming and I was wondering if the payout could be adjusted a bit. E-Cells are easy to come by but when a wreck is reclaimed, that what you mostly get. One wreckage spit out about 287 Microchips, Computer Components, and etc, but it also shot out 35,000 energy cells. It would also be nice if you could reclaim a few weapons from the wrecks too. Like 1 PPC, assorted missiles, and etc. or something. You could even throw in a few random things. Reclaiming a Titan may yeild 6 Vaccum clears. 
What about rebuilding/restoring the wrecks too?

What about rebuilding/restoring the wrecks too?
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
Hi Osiris454,
I see your point about weapons/extra equipment, I might add that in!
The amount of ECells is proportional to the amount of other wares using the same formulae as is used for building ships at the PHQ.
At least ECells are easily sellable if not useable!
I would love to add in rebuilding/restoring wreckage, however the game doesn't support that, there is no 'create wreckage' command in the script editor
I see your point about weapons/extra equipment, I might add that in!
The amount of ECells is proportional to the amount of other wares using the same formulae as is used for building ships at the PHQ.
At least ECells are easily sellable if not useable!
I would love to add in rebuilding/restoring wreckage, however the game doesn't support that, there is no 'create wreckage' command in the script editor

-
- Posts: 741
- Joined: Tue, 4. Jan 11, 22:03
Actually there is a mod in the download library that can restore wrecks. I believe it's called "Debris Repair and Utilitzation". I'm not sure if it works, but I think it just destroys the wreck and spawns the ship in it's place for a fee and an elapsed time. It can also do stations too. I'm going to try it this weekend to see if it works.TECSG wrote:Hi Osiris454,
I see your point about weapons/extra equipment, I might add that in!
The amount of ECells is proportional to the amount of other wares using the same formulae as is used for building ships at the PHQ.
At least ECells are easily sellable if not useable!
I would love to add in rebuilding/restoring wreckage, however the game doesn't support that, there is no 'create wreckage' command in the script editor
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
I think that mod doesn't 'restore' wrecks as such, like you said it deletes the wreckage and creates a hard-coded ship in it's place.
Some of the wreckage is of ships that are not even in the game anymore (like the 'original' Split Dragon from X2 and the Argon Titan)
Let me know what the script does though!
Some of the wreckage is of ships that are not even in the game anymore (like the 'original' Split Dragon from X2 and the Argon Titan)
Let me know what the script does though!
-
- Posts: 741
- Joined: Tue, 4. Jan 11, 22:03
-
- Posts: 741
- Joined: Tue, 4. Jan 11, 22:03
OK. I tried the script and it works quite well except for 1 thing. It really was intended for a Vanilla install rather than one that adds additional ships. This is because it doesn't seem to properly recognize what type of ship wreckage it really is. A destroyed Titan from X2 shows up as a Valhalla on the menu. A destroyed Tiger shows up as a Sabre. A destroyed Thresher shows up as a Kestrel (talk about a let down
). The stations seem to be recognized correctly. I see a wheat farm and it say's it's a wheat farm.
My guess is with a little tweaking it could work.
EDIT: There maybe some limited ship wrecks in the some file like TShips. Not every capital ship has a wreck model associated with it, so it would just be a matter of 'linking' this existing wrecks with the actual ship's ID (since the ship's internal ID won't change no matter what mod you have installed, I think) and BOOM! Ship repaired.
EDIT2: Yup, I seem to be correct. Here is a ship's wreck ID: SS_SH_A_TS_2_WRECK
Here is the actual ship ID: SS_SH_A_TS_2.
This is for a Mercury Hauler. The wreckage of a ship just seems to have "_WRECK" appended to the actual ship's ID. This is for all ships in TShipsWrecks. Just remove the appended "_WRECK" and spawn the ship, A script could easily do that I think. There are 368 ship wrecks in TShipsWrecks.

My guess is with a little tweaking it could work.

EDIT: There maybe some limited ship wrecks in the some file like TShips. Not every capital ship has a wreck model associated with it, so it would just be a matter of 'linking' this existing wrecks with the actual ship's ID (since the ship's internal ID won't change no matter what mod you have installed, I think) and BOOM! Ship repaired.
EDIT2: Yup, I seem to be correct. Here is a ship's wreck ID: SS_SH_A_TS_2_WRECK
Here is the actual ship ID: SS_SH_A_TS_2.
This is for a Mercury Hauler. The wreckage of a ship just seems to have "_WRECK" appended to the actual ship's ID. This is for all ships in TShipsWrecks. Just remove the appended "_WRECK" and spawn the ship, A script could easily do that I think. There are 368 ship wrecks in TShipsWrecks.
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
Hi Osiris454,
I think the "Debris Repair and Utilitzation" script may have been for X3R originally and has simply been ported to X3TC without updating the Ship ID's in the hard-coded list of ships.
I don't think there's any way for a script to access the information stored in the TShips file (other than through a ship itself by the 'get number of shield bays' for example).
I did look into this a while back, as I originally intended to have my scripts be able to 'restore' a wreck to a re-usable ship, but the two problems I found were that some of the wrecks are of ships that are no longer in the game (the Titan wrecks for example are the 'original' Titans from X3R, not the new one from X3TC) and secondly (and perhaps more importantly) there was no way I could see to identify the ship/station type from the wreckage. The script engine has no commands for ship/station debris at all, the only 'debris' commands refer to rocks/asteroid debris.
The script you are trying presumably has an internal list of the wreckages in the game and an associated value of what the scripter thought they were and, although this works to some level, like you said it does not take into account any mods or TCs that alter the TShips file.
Unless people are willing to overlook the fact that the ship they would ultimately get may not resemble the wreckage, there will always be complaints about the script!
Perhaps it can have a disclaimer: 'The actual vessel you receive may not be identical to the wreckage viewed. The wreckage is for demonstration purposes only.'...

I think the "Debris Repair and Utilitzation" script may have been for X3R originally and has simply been ported to X3TC without updating the Ship ID's in the hard-coded list of ships.
I don't think there's any way for a script to access the information stored in the TShips file (other than through a ship itself by the 'get number of shield bays' for example).
I did look into this a while back, as I originally intended to have my scripts be able to 'restore' a wreck to a re-usable ship, but the two problems I found were that some of the wrecks are of ships that are no longer in the game (the Titan wrecks for example are the 'original' Titans from X3R, not the new one from X3TC) and secondly (and perhaps more importantly) there was no way I could see to identify the ship/station type from the wreckage. The script engine has no commands for ship/station debris at all, the only 'debris' commands refer to rocks/asteroid debris.
The script you are trying presumably has an internal list of the wreckages in the game and an associated value of what the scripter thought they were and, although this works to some level, like you said it does not take into account any mods or TCs that alter the TShips file.
Unless people are willing to overlook the fact that the ship they would ultimately get may not resemble the wreckage, there will always be complaints about the script!
Perhaps it can have a disclaimer: 'The actual vessel you receive may not be identical to the wreckage viewed. The wreckage is for demonstration purposes only.'...

-
- Posts: 741
- Joined: Tue, 4. Jan 11, 22:03
I don't think it would really need to read anything. If a script can get the wreckage ID of the wreck selected then all it would have to do is just ignore the _WRECK appended at the end and spawn the remaining ID. Although this would be done on blind faith that the original ship's ID even exists in the TShips file and it matches. I guess if it receives a 'null' then it could tell you that no ship exists or rather that it could not even give you the option to repair the debris at all. Just salvage it.
This is all just me guessing though. My script abilities are non-existent.
EDIT: Actually I think the Debris really isn't debris at all. More like a non-movable ship. Perhaps "get ship ID" could work?
This is all just me guessing though. My script abilities are non-existent.

EDIT: Actually I think the Debris really isn't debris at all. More like a non-movable ship. Perhaps "get ship ID" could work?
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
That's the problem, there is no way to get the wreckage ID, the only value you can get is using the 'get ware type' commands (which usually return a maintype of 15 if I remember correctly) and that can't be correlated to a corresponding TShip entry.
Even if you could get a valid ID (like 'SS_SH_A_TS_2_WRECK', you can't compare it to the other TShip ID's because you can't read the TShips file!
The only way would be to find every bit of wreckage in the game, identify it manually and then write into the script what type of wreckage it should be, but as I said, this would still screw up for ships/stations that are no longer in the game or have been replaced by a mod.
Even if you could get a valid ID (like 'SS_SH_A_TS_2_WRECK', you can't compare it to the other TShip ID's because you can't read the TShips file!
The only way would be to find every bit of wreckage in the game, identify it manually and then write into the script what type of wreckage it should be, but as I said, this would still screw up for ships/stations that are no longer in the game or have been replaced by a mod.
-
- Posts: 741
- Joined: Tue, 4. Jan 11, 22:03
Well, dang. Ugh, so close yet so far. Oh, well. I guess I'll just settle for a free PPC or 2 with every scrap cleanup.TECSG wrote:That's the problem, there is no way to get the wreckage ID, the only value you can get is using the 'get ware type' commands (which usually return a maintype of 15 if I remember correctly) and that can't be correlated to a corresponding TShip entry.
Even if you could get a valid ID (like 'SS_SH_A_TS_2_WRECK', you can't compare it to the other TShip ID's because you can't read the TShips file!
The only way would be to find every bit of wreckage in the game, identify it manually and then write into the script what type of wreckage it should be, but as I said, this would still screw up for ships/stations that are no longer in the game or have been replaced by a mod.

Thanks for trying anyway.

-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
Okay, quick update!
My PC is up and running again (after a week of stripping down, upgrading, rebuilding and reinstalling), so I will be back to work on the scripts.
However, I've got quite a bit of work on, so don't expect miracles!
I'm going to concentrate on any bug-fixes/changes for now and continue with the new features when I get more time.
So if you have a bug or error in your version, please post (or even re-post) me a description of what it is, when it appears, etc. and I'll get on to them all as soon as possible.
My PC is up and running again (after a week of stripping down, upgrading, rebuilding and reinstalling), so I will be back to work on the scripts.
However, I've got quite a bit of work on, so don't expect miracles!
I'm going to concentrate on any bug-fixes/changes for now and continue with the new features when I get more time.
So if you have a bug or error in your version, please post (or even re-post) me a description of what it is, when it appears, etc. and I'll get on to them all as soon as possible.
-
- Posts: 2035
- Joined: Wed, 18. Aug 10, 14:28