<RefObj> disable ship rebuild

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Locked
corbinbird
Posts: 49
Joined: Tue, 2. May 06, 18:58
x3tc

<RefObj> disable ship rebuild

Post by corbinbird » Sat, 8. Jan 11, 03:40

<RefObj> -> disable ship rebuild


<RefObj> = The 'Ship' that the script is to be run on.

The <RefObj> refers to a specific ship.

The purpose of this command was to prevent the Player from repairing Plot or Unique ships.
It was how, in X3R, the Player captured Kha'ak ships could not be repaired.


Example:

* test command 'disable rebuild'

* get current sector
$Sector = [PLAYERSHIP] -> get sector
* create the test ship
$Testee = create ship: type= Argon Aamon Prototype owner=Player addto=$Sector x=35000 y=35000 z=0
* get the undamged hull
$MaxHull = $Testee -> get max hull
* compute a damaged hull
$DamagedHull = $MaxHull / 2
* damage the hull
$Testee -> set hull to $DamagedHull

* disable the rebuild
$Testee -> disable ship rebuild

return null

Testing Result : An Argon shipyard let me repair it in standard fashion . (i.e. lots of credits)


Note:

Apparently this command is disabled/non functional in X3TC v3.0
Comments and/or corrections are very welcome.


Command Location:

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 294751

Post by X2-Illuminatus » Thu, 20. Jan 11, 19:15

<RefObj> -> disable ship rebuild


<RefObj> = Das Schiff, auf dem das Script laufen soll.

Das <RefObj> bezieht sich hierbei auf ein spezifisches Schiff.

Die Aufgabe dieses Befehls war es, den Spieler darin zu hindern, einzigartige Schiff oder solche aus Plots zu reparieren.
Auf diese Weise wurde in X3:R verhindert, dass durch den Spieler gekaperte Kha'ak Schiffe repariert werden konnten.


Beispiel:

* Testbefehl 'deaktiviere Nachbau'

* erhalte aktuellen Sektor
$Sector = [PLAYERSHIP] -> get sector
* erstelle Testschiff
$Testee = create ship: type= Argon Amun Prototyp owner=Player addto=$Sector x=35000 y=35000 z=0
* erhalte den unbeschädigten Hüllenwert
$MaxHull = $Testee -> get max hull
* errechne Hüllenschaden
$DamagedHull = $MaxHull / 2
* beschädige die Hülle
$Testee -> set hull to $DamagedHull

* deaktiviere Nachbau
$Testee -> disable ship rebuild

return null

Testergebnis: An einer Argonen Schiffswerft kann das Schiff auf die übliche Weise (mit vielen Credits) repariert werden.


Beachte:

Anscheinend hat dieser Befehl in X3:TC v3.0 keine Funktion.


Zu finden unter:

Locked

Return to “MSCI Reference”