[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 »

@Andyrids,

Yeah, the MRS can dock 30 ships internally, but only has one external dock for the larger ships. Any ships that can't dock should go into a holding pattern though...
honza-l
Posts: 159
Joined: Mon, 27. Nov 06, 21:59
x3tc

Post by honza-l »

Hi, I read in readme that czech translation is comming soon. Can you tell me, who is working on it
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Hi honza-l,

I was contacted by someone on the forum going by the username 'Oslik' who said they could do the Czech Translation, but I never heard back from them.

It is most likely the Czech version is postponed indefinitely unfortunately (unless you know of someone who could do it?).
madprof
Posts: 15
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by madprof »

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

Post by TECSG »

Thanks madprof, I'll fix that for 4.08.

Incidentally, what sort of ship were you in at the time?

I did find a similar bug previously that happened with ships with low (max) hull points (like an M5).
madprof
Posts: 15
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by madprof »

It was an M1, jumped down from 83% to 11%.
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Ouch! :oops:

Definitely have to sort that out!
User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar »

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 :P 45mins gone to waste... another thing i need to learn to do more, salvage insurance is 3k, save moarrrrrrrrrrr!
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

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.
User avatar
Erenar
Posts: 279
Joined: Sat, 24. Dec 11, 00:24
x4

Post by Erenar »

Auto-pilot... friend????

That's a first!
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Yeah, usually it's got suicidal tendencies, but the XPS should be well out of the way of anything else, so hopefully it would be safe to use!
User avatar
Tiek
Posts: 166
Joined: Sun, 15. Aug 04, 12:21
x3tc

Post by Tiek »

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 :oops: if the topic has already been treated or if it is a false problem!
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

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.
User avatar
Tiek
Posts: 166
Joined: Sun, 15. Aug 04, 12:21
x3tc

Post by Tiek »

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

Post by TECSG »

Hi Tiek,

When I view the AP scripts alongside the TC scripts they are identical. Can you provide a code sample of the part in question?
User avatar
Tiek
Posts: 166
Joined: Sun, 15. Aug 04, 12:21
x3tc

Post by Tiek »

From file !fight.attack.object.std:

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:
...............
From file !fight.attack.object

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] 
which is used in your edited file :? :?
Last edited by Tiek on Tue, 28. Feb 12, 23:47, edited 1 time in total.
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

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!
User avatar
Tiek
Posts: 166
Joined: Sun, 15. Aug 04, 12:21
x3tc

Post by Tiek »

Another question to be profane...sorry if it's stupid :oops: .... because when you enter the variable "stealth" consider only the file !turret.killenemies.adv.main and not the file !turret.killenemies.std.main?
What is the difference between the two? Just a curiosity :)
Thanks!
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

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.
User avatar
Tiek
Posts: 166
Joined: Sun, 15. Aug 04, 12:21
x3tc

Post by Tiek »

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 :wink: , given the speed with which problems tend to occur when scripting :lol:

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

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