[Script][V1.1] Self Destruction / Suicide command

The place to discuss scripting and game modifications for X³: Reunion.

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

User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

[Script][V1.1] Self Destruction / Suicide command

Post by SymTec ltd. » Wed, 2. May 07, 11:33

This (very tiny) script adds two command to a ship's command console, "Piracy"-section:
  • Self Destruction: Activate: This command activates self destruction. The ship will explode almost immediately and kill every ship ~2km around it. All followers within a close distance will do so as well. The ship needs SQUASH-mines in the cargo bay to increase destructive impact on surroundings.
  • Self Destruction: Follow: Ship will follow its target (ship or station) and explode as soon as it is in range.
The explosion impact and need of SQUASH mines can be changed in the textfile, instructions see readme.

Download V1.1:
[ external image ]


Resources:
Textfile: 8767
Textpage: 8767
Commands: 629, 630 (Piracy)
Task: 8767

DE
Last edited by SymTec ltd. on Sat, 4. Oct 08, 21:58, edited 1 time in total.

russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo » Wed, 2. May 07, 12:09

What a concept.

Not exactly politically correct, but impressive nonetheless. I'll find a use for this...

fredmxm354
Posts: 99
Joined: Fri, 29. Apr 05, 16:32
x4

Post by fredmxm354 » Wed, 2. May 07, 14:10

cool idea...

could use being in a SPK though, then i would use it..

Fred

User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Wed, 2. May 07, 20:10

fredmxm354 wrote:cool idea...

could use being in a SPK though, then i would use it..

Fred
It is now ;)

User avatar
Matt Armada
Posts: 205
Joined: Mon, 21. Mar 05, 13:46
x4

Post by Matt Armada » Wed, 2. May 07, 20:54

hehehe....now i can make ke my war against the split a little more...volitile :D

matches
Posts: 202
Joined: Thu, 4. Jan 07, 22:47
x3

Post by matches » Wed, 2. May 07, 21:21

BRILLIANT! Do you get more devistation and/or range with more mines on-board? :twisted:
"Didn't your mother ever tell you not to play with matches?"



Realspace Backgrounds http://forum.egosoft.com/viewtopic.php?t=180848

User avatar
SymTec ltd.
Posts: 5285
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Wed, 2. May 07, 21:27

matches wrote:BRILLIANT! Do you get more devistation and/or range with more mines on-board? :twisted:
Could say so - but if the ship's shields are too weak, they won't all be started... yet ;)

User avatar
Flybye
Posts: 1400
Joined: Fri, 9. Feb 07, 04:46
x3tc

Post by Flybye » Wed, 2. May 07, 21:44

What if you have 20 Hammerheads in the cargo bay :fg: :twisted: :fg:

matches
Posts: 202
Joined: Thu, 4. Jan 07, 22:47
x3

Post by matches » Wed, 2. May 07, 22:36

"Sir, we're being followed!"

"Ah, it's just a couple of freighters.......My their flying kinda close.."
"Didn't your mother ever tell you not to play with matches?"



Realspace Backgrounds http://forum.egosoft.com/viewtopic.php?t=180848

Realspace
Posts: 1410
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Script][V1.1] Self Destruction / Suicide command

Post by Realspace » Tue, 5. Jun 07, 20:50

SymTec ltd. wrote:This (very tiny) script adds two command to a ship's command console, "Piracy"-section:
These are the little tiny things that make life much more enjoyble ... and games too :mrgreen: ... thanks for the script! :wink:

jumbled
Posts: 320
Joined: Mon, 28. Jun 04, 08:22
x4

Post by jumbled » Wed, 6. Jun 07, 03:57

I would imagine you wouldn't want to be *in* the ship when it blows.... 8)

reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken » Wed, 6. Jun 07, 07:40

Just wondering, does the suicide bombers cause rep reduction?

Yellowman
Posts: 627
Joined: Mon, 3. May 04, 12:54
x4

Post by Yellowman » Wed, 6. Jun 07, 11:12

Nice script!! w000000tt..

I'm gonna buy myself a fleet of M5's and let them suicide m2's wh0000tt :lol:

xxx73
Posts: 170
Joined: Wed, 10. Mar 04, 22:16
x3tc

Post by xxx73 » Mon, 16. Dec 13, 07:10

I cant get this to work fully.

The command "Self destruction: Activate" work fine.

The command "Self-destruct: Follow dont work. Tested it on a TS, TP and M4. They just continue to fly around target with cargo full of squash mines.

When I opened plugin.stl.selfdestruct.xml in exscriptor and tried to save it I get this message:
Save failed because of compilation errors - please compile again
Save failed due to compilation errors!
- Error on line 44 - Incorrect parameter; expected: Var/Array (parameter #9)

Warnings:
Variable var2 is being used on line 27 before being assigned to.
Variable station is being used on line 45 before being assigned to.
This from plugin.stl.selfdestruct.xml:

Code: Select all

0024  end
0025
0026  $var1 = read text: page=8767 id=2
0027  $var2 = string $var2 to integer
0028
0029  $i = [THIS]->get cargo bay size
0030  $i = $i / $var2
0031  skip if is datatyp[ $i ] == {DATATYP_INT}
0032    $i = 1
0033  skip if $i
0034    $i = 1
0035
0036  while $i
0037    dec $i =
0038    $var1 = [THIS]->get x position
0039    $var2 = [THIS]->get y position
0040    $var3 = [THIS]->get z position
0041    $sec = [THIS]->get sector
0042    $squash = create ship: type={Argon SQUASH Mine 3851} owner={Player} addto=$sec x=$var1 y=$var2 z=$var3
0043  
0044    $station = find station: sector=[SECTOR] class or type={Station} race=null flags=[Find.Random] refobj=[THIS] maxdist=3000 maxnum=null refpos=[THIS]
0045    skip if not $station
0046      gosub SubStation
0047  
0048    = wait 10 ms
0049    skip if not $i MOD 10 == 0 AND !$nosound
0050      play sample 924
0051    $squash->destruct: show no explosion=null
0052  end
So there is something wrong with line 27, 44 and 45..any idea?

Also I have no other scripts/mods installed.

Anyone that can help....thanks :)

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

Post by X2-Illuminatus » Fri, 20. Dec 13, 00:54

In line 27, the second $var2 should be $var1.
In line 44, set refpos=null.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

xxx73
Posts: 170
Joined: Wed, 10. Mar 04, 22:16
x3tc

Post by xxx73 » Fri, 20. Dec 13, 03:07

X2-Illuminatus wrote:In line 27, the second $var2 should be $var1.
In line 44, set refpos=null.
awesome :D
Thank you very much
...going to try this soon. Will report how it goes

xxx73
Posts: 170
Joined: Wed, 10. Mar 04, 22:16
x3tc

Post by xxx73 » Sat, 21. Dec 13, 02:51

No warning when saving files now, but I tried it ingame and still no ships blowing themselves up when using "Self Destruction: Follow". Only when issuing "Self Destruction: Activate".

Would be cool to get this to work , it adds a last resort/desperate action possibility, and options is nice :)

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

Post by X2-Illuminatus » Sun, 22. Dec 13, 18:40

The problem is that the plugin.stl.selfdestruct.follow doesn't do anything apart from setting some local variables and calling the '!ship.cmd.follow.std' script. So the ship will do as told, and follow the target ship.

Missing are a distance check (i.e. when has the ship reached its target) and of course the call to the actual selfdestruct script.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

xxx73
Posts: 170
Joined: Wed, 10. Mar 04, 22:16
x3tc

Post by xxx73 » Sun, 22. Dec 13, 19:17

aha ty X2-Illuminatus :)

So if anyone want to use this script only the "activate" part of script is working. Im going to edit my version to remove the follow part.

Im leaving this to go on to more interesting scripts, PiloteAi vs Terracorp fleet pack :)

Return to “X³: Reunion - Scripts and Modding”