[SCRIPT] Salvage Command Suite V4.11 [29/12/2012]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

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

Post by TECSG »

Okay, I'll add it to the 'to-do' list! :wink:
garrry34
Posts: 911
Joined: Sun, 17. Jul 05, 14:43
x3tc

Post by garrry34 »

ha that just made me giggle seeing the acronym for the asteroid relocation service...
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

I'm not sure what you mean... :wink:

But congratulations on being the first to mention it!
garrry34
Posts: 911
Joined: Sun, 17. Jul 05, 14:43
x3tc

Post by garrry34 »

are you from the Uk, from the way I was looking at it we had arse and then ol, so it was like employing an a**eh**e to move stuff for you lol
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Yes, I'm from the UK.

Some of those arses can move quite large 'roids...

Although not sure I should use arse and 'roid in the same sentence... :oops:

The name Emma comes to mind though, if you get the reference.
:lol:
Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang »

automated upgrade system for the stealth sats, sorta instead of the manual one.

It would make use of the Hyperion Service ships. If you understood the rest of that besides my confusion way of writing it down :?
Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 22:03
x3tc

Post by Osiris454 »

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. :D

What about rebuilding/restoring the wrecks too?
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

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 :cry:
Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 22:03
x3tc

Post by Osiris454 »

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 :cry:
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.
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

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!
Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 22:03
x3tc

Post by Osiris454 »

Sure thing.

I have the SRM mod installed so the X2 ships are there to use. I mostly want to use is because of the few wrecks about that are of X3 ships. Like the Xenon K (?) in Hatikvah's Faith.
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Oooohhh, a free 'K', that'd be nice! :D
Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 22:03
x3tc

Post by Osiris454 »

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 :P ). 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. :D

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.
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

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.'...
:lol:
Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 22:03
x3tc

Post by Osiris454 »

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. :roll:

EDIT: Actually I think the Debris really isn't debris at all. More like a non-movable ship. Perhaps "get ship ID" could work?
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

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.
Osiris454
Posts: 741
Joined: Tue, 4. Jan 11, 22:03
x3tc

Post by Osiris454 »

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.
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. :lol:
Thanks for trying anyway. :D
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Yeah, unfortunately, the script commands for wreckage are *literally* non-existent.

I guess the DEVS didn't think anyone would ever want to do anything with them!

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

Post by TECSG »

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.
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

Don't trust him he's Scottish :lol:
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”