[SCRIPT] Salvage Command Suite V4.11 [29/12/2012]
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
-
- Posts: 159
- Joined: Mon, 27. Nov 06, 21:59
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
-
- Posts: 15
- Joined: Wed, 6. Nov 02, 20:31
Running this script in AP and have come across one bug. Player ship gets damaged when nearby rather than repaired..
Tracked the error down to the scs.mrs script line 46.. Every line below sets $hull.cur = $hull + <somevalue>
while line 46 is just $hull = $hull + $one.fifth
Once I'd change it to read $hull.cur = $ hull + $one.fifth it start to work.
Other that that I love this script.
EDIT. forget to mention it is version 4.07
Tracked the error down to the scs.mrs script line 46.. Every line below sets $hull.cur = $hull + <somevalue>
while line 46 is just $hull = $hull + $one.fifth
Once I'd change it to read $hull.cur = $ hull + $one.fifth it start to work.
Other that that I love this script.
EDIT. forget to mention it is version 4.07
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
-
- Posts: 279
- Joined: Sat, 24. Dec 11, 00:24
I was just coasting at 15m/s towards the x-shuttle when the message popped up... before i could hit enter twice i'd crashed into it and destroyed it -.- Any way that popup can be changed to a mail? Not the first time it's happened... maybe I should learn but i doubt that will happen anytime soon
45mins gone to waste... another thing i need to learn to do more, salvage insurance is 3k, save moarrrrrrrrrrr!

-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
Hi Erenar,
This is one instance where the autopilot could actually be your friend!
The autopilot should stop you just short of the XPS, or if your insistent on not using it (or for the last few hundred meters), don't aim directly for the ship!!!
The message could be changed to a message (rather than a pop-up) though, I've just restarted (again) to try out the fixes/features for 4.08, so if I find it to be a problem (or at least an annoyance) I will change it.
You could also use the 'Auto-buy Salvage Insurance' option, I think that's cheaper than 3K if you do that.
This is one instance where the autopilot could actually be your friend!
The autopilot should stop you just short of the XPS, or if your insistent on not using it (or for the last few hundred meters), don't aim directly for the ship!!!
The message could be changed to a message (rather than a pop-up) though, I've just restarted (again) to try out the fixes/features for 4.08, so if I find it to be a problem (or at least an annoyance) I will change it.
You could also use the 'Auto-buy Salvage Insurance' option, I think that's cheaper than 3K if you do that.
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
-
- Posts: 166
- Joined: Sun, 15. Aug 04, 12:21
Hi TECSG,
I need a clarification....
I recently installed Albion Prelude and I noticed that the vanilla files !fight*. * in the directory \addon\scripts are different in some parts of the code than those of the original version of TC.
Because the ones that you modified to use the variable "stealth" seems to me that come from TC (I looked in the files of version 407), I was wondering if there could be problems with using the same with AP.
Thanks and... sorry
if the topic has already been treated or if it is a false problem!
I need a clarification....
I recently installed Albion Prelude and I noticed that the vanilla files !fight*. * in the directory \addon\scripts are different in some parts of the code than those of the original version of TC.
Because the ones that you modified to use the variable "stealth" seems to me that come from TC (I looked in the files of version 407), I was wondering if there could be problems with using the same with AP.
Thanks and... sorry

-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
Hi Tiek,
The scripts included in the SCS package will work with AP, the scripts for AP and TC are identical except for the AP scipts now contain some 'plain text' version of the script file as well as the XML code.
Not sure why it was changed, but if you're in any doubt, backup the 5 original files and if you think there's a problem you can replace the new files with the old ones and all that will happen is you will lose 'stealth' capabilities on the satellites and XPS.
The scripts included in the SCS package will work with AP, the scripts for AP and TC are identical except for the AP scipts now contain some 'plain text' version of the script file as well as the XML code.
Not sure why it was changed, but if you're in any doubt, backup the 5 original files and if you think there's a problem you can replace the new files with the old ones and all that will happen is you will lose 'stealth' capabilities on the satellites and XPS.
-
- Posts: 166
- Joined: Sun, 15. Aug 04, 12:21
Thanks TECSG,TECSG wrote:Hi Tiek,
The scripts included in the SCS package will work with AP, the scripts for AP and TC are identical except for the AP scipts now contain some 'plain text' version of the script file as well as the XML code.
Not sure why it was changed, but if you're in any doubt, backup the 5 original files and if you think there's a problem you can replace the new files with the old ones and all that will happen is you will lose 'stealth' capabilities on the satellites and XPS.
I mean, for example, the file !fight.attack.object.sd; the initial part of the AP file contains instructions for, I think, the new integrated system of missile defense, and these instructions are missing in the TC version.
What do you think?
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
-
- Posts: 166
- Joined: Sun, 15. Aug 04, 12:21
From file !fight.attack.object.std:
From file !fight.attack.object
As you can see in the first instructions refer to the function missile defense, as I understand it, and in the second appears the variable Victim.MT
EDIT:
From file !fight.targeting:
Seems to have disappeared:
which is used in your edited file

Code: Select all
$time = get script priority
skip if $time > 98
= [THIS]->call script '!lib.ai.ammo.supply' : Ship=[THIS] Victim=$victim
$Fightskill = [THIS]->get pilot fightskill
if not random value from zero to $Fightskill - 1
inc $Fightskill =
[THIS]->set pilot fightskill to $Fightskill
end
$Next.M.Defense.Check = 2147000100
if not [THIS]->is missile boat
$Countermissile = [THIS]->call script '!lib.get.best.missile.fortarget' : Target='counter.missile' Set.Launch.Time.diff=null
do if $Countermissile
$Countermissile.Range = get range of missile type $Countermissile
$Next.M.Defense.Check = 0
end
restart:
...............
Code: Select all
skip if $victim->exists
return null
$Victim.MT = $victim->get maintype
if not $victim->is of class {Nave}
if not $victim->is of class {Stazione}
skip if $Victim.MT == 10
return null
end
end
...............
As you can see in the first instructions refer to the function missile defense, as I understand it, and in the second appears the variable Victim.MT

EDIT:
From file !fight.targeting:
Code: Select all
$flags = [Find.Enemy] | [Find.Nearest]
if is datatyp[ $arefpos ] == {DATATYPE_ARRAY}
$i = size of array $arefpos
if $i < 3
$arefpos = null
else if $i == 3
append [SECTOR] to array $arefpos
$flags = $flags | [Find.ForceUsePos]
else
$flags = $flags | [Find.ForceUsePos]
end
end
* **could vary close.range by shiptype or race
skip if $maxrange
$maxrange = [THIS]->get scanner range
...................................................
Seems to have disappeared:
Code: Select all
$flags2 = $flags | [Find.Multiple]


Last edited by Tiek on Tue, 28. Feb 12, 23:47, edited 1 time in total.
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
I think I see what's happened, for some reason (even on my 'clean' install) the TC scripts have overwritten the AP scripts...
I will have to look at the 5 files (although I may leave out earth.defend.torus.xml in future versions) and see if I can implement both versions in one file...
I would suggest backing up the 5 original files and restoring them after the SCS scripts have been installed, you will lose the 'stealth' functionality for a while until I can modify the new files/package.
Thanks for identifying that... Could have been even more confusing later on!
I will have to look at the 5 files (although I may leave out earth.defend.torus.xml in future versions) and see if I can implement both versions in one file...
I would suggest backing up the 5 original files and restoring them after the SCS scripts have been installed, you will lose the 'stealth' functionality for a while until I can modify the new files/package.
Thanks for identifying that... Could have been even more confusing later on!
-
- Posts: 166
- Joined: Sun, 15. Aug 04, 12:21
-
- Posts: 1610
- Joined: Tue, 17. Feb 04, 22:06
Hi Tiek,
I'm not entirely sure now what the difference is as it was quite a while ago I modified them, but I found that only modifying the one worked and I didn't want to modify too many in-game scripts as it would only lead to more problems!
It may well be that one is for NPC and one for player's ships, I'd have to look through the two files again to be sure though.
I'm not entirely sure now what the difference is as it was quite a while ago I modified them, but I found that only modifying the one worked and I didn't want to modify too many in-game scripts as it would only lead to more problems!
It may well be that one is for NPC and one for player's ships, I'd have to look through the two files again to be sure though.
-
- Posts: 166
- Joined: Sun, 15. Aug 04, 12:21
TECSG wrote:
......I found that only modifying the one worked and I didn't want to modify too many in-game scripts as it would only lead to more problems!
......
Hi TECSG,
Thanks again for the fast answers!
If this is so I would say that your decision is widely shared


As I said I am an amateur in the field of scripts and when I try some experiments...... well......... the headache is assured
