[AL plugin] Abandoned Ship Spawner v82

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

Posts: 48
Joined: Tue, 2. May 06, 18:58

[AL plugin] Abandoned Ship Spawner v82

Post by corbinbird » Fri, 30. Apr 10, 00:20

Abandoned Ship Spawner v83
EgoSoft Forum Member : corbinbird
Game : X3TC v3.2
Date : 04/18/2013

Purpose :
I got tired of the same wrecks at the same locations with the same equipment in every game start.

What It Does :

1. Creates a whole new set of wrecks to find in a new game start. RANDOM ships / RANDOM locations. Gets rid of the old/built-in wrecks.

2. At regular intervals it creates a new RANDOM wreck at a RANDOM location for the player to salvage. The trick is finding it.

3. All wrecks have randomized equipment left onboard.

4. Auto cleanup of excessive numbers of unclaimed wrecks.

VERY IMPORTANT : (Install Instructions)
First activate the script editor. Won't work / start otherwise. For setup to complete in the game, you must dock, save, exit to the main menu and reload. Along with activating the script editor.
For X3TC v2.5 or Previous : The AL plugin is set to do the heavy work on the second reload. Nasty setup crash otherwise.
For X3TC v2.7.0 or Later : the AL plugin engine has been modified. reinit script cache not recommended. the AL plugin engine ignores the control state array. dock, save, exit and reload for setup to complete.

Download Link : (stored in a ZIP file)

it really is RANDOM. So is the cleanup.
Tested in Custom Game/X Universe.
Abandoned ships limited at 20 max. (Conserves CPU resources.)
Turrets on spawned ship set to [None]. (Conserves CPU resources.)
Debug output commented out.
AL plugin is installed Off / Disabled
All ships are possible wrecks.

Recommended :
Cycrow's SatelliteEarlyWarningSystem is very helpful at detection.

Compatability :
tested with 'NPCBailAddon' & 'SalvageCommandsandNPCs'.
'SalvageCommandsandNPCs' do not salvage these spawned ships.
'NPCBailAddon'-> your choice
'Find Free Ships'-> good cheat script :)
Not tested with any [MOD]/.XSP that adds ships. added ships will NOT be spawned.
Not tested for XTM either at this point.
Not tested with X3AP, no support given :doh:

(Done->) Fix the turret cmds to 'None' on spawned ships if possible.
(Done->) Randomize the wares on wrecks that have some.
(Done->) Have cleanup cleanup more than one wreck at a time if necessary.
(Done->) get rid of the standard wrecks in every game start. Already have test script.
(Done->) Replace the 19 or 20 standard wrecks with a random 19 or 20 wrecks (random locations too) at new game start.
(Done->) missiles for everyone. M7/M8 missile boats need them.
(To Do->) make an XTM version.

Changes :
lib scripts using global variable/arrays
global variable/array format tested, retested. Setup/Run only once.
improved debug output. Commented out for release.
Setup script built. Lowers CPU load after initail setup.
t file conflict solved
(v69) AL Event Handler restructured, finally understood 'Arguments'. for AL plugin they set TaskID and Script Priority.
(v70) Figured out how to have the setup set the turret defaults for {Neutral Race}. Have fixed the turret cmd settings on spawns. AL Setup script.
(v71) Minor cosmetic changes. Uninstall reworked.
(v73) bulk cleanup, bulk spawn, and lib setup scripted/completed. some testing. bulk ops now set for second load (setup crash otherwise.) AL Event Handler also got some love.
(v76) randomized wares on ALL spawned ships. no striped ships anymore.
(v77) updated read me. repackaged.
(v78) on stack problem found. debugging. not posted
(v79) on stack problem located and resolved. Filefront hosting not functioning. changed host site. (Thank You, Lord Vader)
(v80) debug commented out. ware randomizer improved. engine/rudder/cargo bay now random as well. M8 class may get some missiles.
(v81) minor correction to scripts. Investigated reported cargo problems. Not due to these scripts.
(v82) minor tweak to AL Event handler script. Included a non-SPK package in the download.
(v83) kill undocumented kill timer ( flying ware type timer. ) on SE Create Ship Command. Adjust global vars. Renamed / replaced lib scripts. Updated for X3TC v3.2

Special Thanks To :
'LV' for Examples and Tutorials (X3TC BountyBoost)
Link : http://code.google.com/p/x3tcscripts/
'Cycrow' for Examples and the script structure. (X3R BBS Extras)
Link : http://forum.egosoft.com/viewtopic.php?t=115026
'Apricotslice' for Examples and Concept. (X3TC Create Abandoned Ships on Startup)
Link : http://apricotmappingservice.com/
'MarCon' for MSCI info.
'Nafensoriel' for On Stack problem notification.

No Wares / No Custom Wares Used.
No Command Slot / ID's Used.
EMP / EMP-X mod not required / used.

Package Type :
AL plugin

t file :

scripts :

uninstall script :

Permissions :
I consider this package community property / public domain.
If you can think of it ... go for it.
You have my permission.

EgoSoft Forum Member : corbinbird

Edit [10th March 2017]: updated the google code link. X2-Illuminatus
Last edited by corbinbird on Fri, 19. Apr 13, 00:45, edited 10 times in total.

Posts: 681
Joined: Tue, 6. Nov 07, 19:01

Post by xavierd » Fri, 30. Apr 10, 02:20

looks good. just out of interest, why is the shuri considered an m0? as far as i can tell it's identical to the colossus

Posts: 1385
Joined: Wed, 3. Aug 05, 05:05

Post by mark_a_condren » Fri, 30. Apr 10, 17:21


Here is the code you need for the SPK download link and button pic, just copy paste into your OP, then i'll delete it from here.

Code: Select all

Glad to see you finaly got it finished and released.


Posts: 48
Joined: Tue, 2. May 06, 18:58

Post by corbinbird » Fri, 30. Apr 10, 22:18

if you go into the types\Tships file, it is listed as an M0 class. The problem is that the game engine has problems with anything that reports itself as an M0 class. So it is masked as an M1 class.

That same problem exists in X3R. The XTM for X3R Team had to use the same work around if I remember correctly.

Posts: 48
Joined: Tue, 2. May 06, 18:58

Post by corbinbird » Fri, 30. Apr 10, 22:29


The problem seems to be that the actual address is 5 or 6 lines long. And do they prevent a direct download link :?

Also, the MSCI handbook is so wrong on AL plugins. Its what is/was left out that made this a monster effort.

Posts: 681
Joined: Tue, 6. Nov 07, 19:01

Post by xavierd » Fri, 30. Apr 10, 22:36

interesting, i'd have thought with the time i've spent poking through t-files i'd have noticed that by now.

i'll come back with feedback once i get it working:

tc 2.6 final, spawner installed via cycrow's plugman lite v1.10, only other script is scorp's map v1.2 TC.
started new game (humble merch), activated script ed, set AL option to enabled, dump map via scorp and check freeship positions, default 19 ships in place (as expected, no reload yet).
flew to and docked at distillery beta, saved, quit (alt+f4) and reloaded. dump map, same as earlier. (time around 13 mins)
flew to and docked at FATS, saved, quit, reload, dump map, same as earlier (around 26 minutes).

trying to figure out the glaringly obvious thing i've missed that i'm gonna kick myself for

Posts: 48
Joined: Tue, 2. May 06, 18:58

did you activate the script editor?

Post by corbinbird » Sat, 1. May 10, 05:18

make sure the script editor is activated. (change the player/pilot name to Thereshallbewings) Every time I do a start that is what I do before my first save.

Try that, it may do the trick... I haven't been able to duplicate what you've exp.

Also may want to check if you have MARS installed. It is also a heavy second load installer.


Posts: 13
Joined: Sat, 10. Apr 10, 15:58

Post by TrueChaos » Sat, 1. May 10, 21:11

It sounds like this deletes unclaimed ships that it creates after a certain time and creates more elsewhere? If so how long does it leave the abandoned ships before removing them.

User avatar
Not a Moderator
Posts: 1779
Joined: Thu, 1. Jul 04, 12:31

Post by TSM » Sun, 2. May 10, 02:56

corbinbird wrote:Marc,

The problem seems to be that the actual address is 5 or 6 lines long. And do they prevent a direct download link :?
The link works fine, how Marc posted it Corbin all it does it make image as link.

The actual image is on LV's website.
FAQ's Egosoft Interactive FAQ
Egosoft Wiki

Posts: 48
Joined: Tue, 2. May 06, 18:58

Thanks !

Post by corbinbird » Sat, 15. May 10, 21:58

To the Moderator, ( jlehtone )

Thanks for fixing the link !

corbinbird :)

Posts: 1824
Joined: Mon, 10. Aug 09, 02:09

Post by djrygar » Sat, 22. May 10, 03:07

I think something may be wrong here..

in 'global scripts task' I see there are about 500 instances of 'al.A.S.S.event'

probably no way of getting rid of that ;/

Posts: 48
Joined: Tue, 2. May 06, 18:58


Post by corbinbird » Sat, 22. May 10, 03:34

Is that the number of times the script is called ... or currently running global tasks?

I took another look in the SE.
Called = yes, that is quite possible.
Currently Running = ???? Whoa !!!

The script is called even when the plug-in is disabled.

Let me know what you find.


Posts: 703
Joined: Sun, 7. Dec 03, 22:13

Post by pepperg » Sat, 22. May 10, 23:47

does this remove/replace the stock abandoned ships or add to them?
SeagateBarracuda320GB 7200 SATA
LIANLI PC-7B plus II MidTower
EVGA GeForce8800GTX 768MB
Intel Core2Duo E6600Conroe 2.4GHz
WDRaptor 150GB 10,000 RPM
EVGAnforce SLI 680imobo

Posts: 48
Joined: Tue, 2. May 06, 18:58

response ...

Post by corbinbird » Mon, 24. May 10, 18:19

It does replace all of the stock abandoned ships. All game starts. :)


User avatar
Posts: 3253
Joined: Fri, 14. Oct 05, 21:04

Post by ezra-r » Tue, 1. Jun 10, 22:19

I found an M1 (a shuri or something).. , weakly shielded.. very low on armor...

since you can't claim it because it is not a small ship I supposed you have to "capture" it.. Just for testing I spawned myself a few trained marines (thx cycrow).

Thing is, as I start shooting it to lower its shields and after a little while, the thing becomes red and starts "walking" (going slow) :-?

The trained marines couldn't cut through the hull though even if I tried several times, and they were trained.. I supposed next thing is to try with boarding pods...

In any case, is this really intended to work this way?

Post Reply

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