[AL plugin] Abandoned Ship Spawner v82

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

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

[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)
Link


NOTE :
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:


TO DO :
(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 :
7300-L044.xml

scripts :
al.plugin.A.S.S.xml
al.A.S.S.event.xml
plugin.A.S.S.cleanup.xml
plugin.A.S.S.setup
plugin.A.S.S.spawner.xml
plugin.A.S.S.bulk.cleanup.xml
plugin.A.S.S.bulk.spawn.xml
plugin.A.S.S.setup.lib.xml
plugin.A.S.S.wares.xml
lib.A.S.S.random.m0.xml
lib.A.S.S.random.m1.xml
lib.A.S.S.random.m2.xml
lib.A.S.S.random.m3.xml
lib.A.S.S.random.m3p.xml
lib.A.S.S.random.m4.xml
lib.A.S.S.random.m5.xml
lib.A.S.S.random.m6.xml
lib.A.S.S.random.m7.xml
lib.A.S.S.random.m8.xml
lib.A.S.S.random.tl.xml
lib.A.S.S.random.tm.xml
lib.A.S.S.random.tp.xml
lib.A.S.S.random.ts.xml

uninstall script :
uninstall.ASS.xml

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.

xavierd
Posts: 800
Joined: Tue, 6. Nov 07, 18: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

mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

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

corbinbird

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

[url=http://x3terranconflict.filefront.com/file/Abandoned_Ship_Spawner_AL_plugin;113177#Download][img]http://www.arcl07.dsl.pipex.com/x3tc/plugins/spk.png[/img][/url]
Glad to see you finaly got it finished and released.

MarCon

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

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.

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

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

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

Marc,

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.

xavierd
Posts: 800
Joined: Tue, 6. Nov 07, 18: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

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

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.

Corbin

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

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
TSM
Not a Moderator
Posts: 2947
Joined: Thu, 1. Jul 04, 12:31
x4

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

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

Thanks !

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

To the Moderator, ( jlehtone )

Thanks for fixing the link !

corbinbird :)

djrygar
Posts: 1841
Joined: Mon, 10. Aug 09, 02:09
x3ap

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 ;/

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

Question..

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.

corbinbird

pepperg
Posts: 869
Joined: Sun, 7. Dec 03, 21:13
x3tc

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
CORSAIR 2GB DDR2 SDRAM DDR2 800
WDRaptor 150GB 10,000 RPM
EVGAnforce SLI 680imobo

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

response ...

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

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

corbinbird

User avatar
ezra-r
Posts: 3420
Joined: Fri, 14. Oct 05, 21:04
x4

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?

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

How to claim ...

Post by corbinbird » Thu, 3. Jun 10, 20:16

The best way to claim it is use Cycrow's Salvage Claim script. ( or the other salvage claim package) You are correct in that the stock egosoft claim doesn't work on cap ships. :(

And yes, a Neutral Race ship does go hostile even if you use repair lasers on it before claiming.

Some of the spawned ships come with hull polarizing devices stock per egosoft. Thats what is stopping the marines from boarding. Wares are removed in a random manner. It survived the culling.

That walking ship either had no weapons installed or turrets off line. It was trying to attack you.

Hope This Helps,
corbinbird 8)

NeverSnake
Posts: 5159
Joined: Thu, 9. Oct 03, 20:44
x3tc

Post by NeverSnake » Sat, 2. Oct 10, 17:33

You seem to have left your debugging in, the latest version is providing details in the log.
"There's an old story about the person who wished his computer were as easy to use as his telephone. That wish has come true, since I no longer know how to use my telephone" — Bjarne Stroustrup

MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
xr

Post by MegaBurn » Mon, 4. Oct 10, 06:26

Not sure how far you want to take this but here are some suggestions:

Add a config menu with options to narrow the random selection by ship type, by player net worth, by rarer ships, and TS's with rarer cargo. This compliments NPC Bailing rather than being more of the same. Add optional support for Salvage Commands and NPC's, for competition.

Change it to block ship removal if a player owned object (adv/nav sat, fighter) is within 10km even if the player is OOS. Its annoying to find something big early game, run around to buy a TP and marines, only to have it disappear.

For big/huge ships add a proximity trigger to spawn either hostile fighters or a competing salvage ship, both would attempt to destroy the wreck if a player owned ship gets within capture/boarding range. Using a trigger reduces CPU load over spawning it along with the wreck.

EDIT:
Another one is adding special enhancements, like more powerful shield/weapon generators, over-tuning, and other stuff to make these ships special. Could also go the other way with intentional odd behavior.

I guess a better way to put it is make this more RPG-ish, more like a treasure hunt than just yet another ship.
"Only the dead have seen the end of war." -Plato

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

to MegaBurn

Post by corbinbird » Sun, 10. Oct 10, 15:32

that is an interesting idea. Cycrow's BBS Extras did almost the same thing in X3R. The capitals always had a guarding/competing salvage group. For that to work I would need to get into MD scripting (grimace...).

The Salvage Commands & NPC's keeps track of forced bails. These are not. The NPC scavengers show up almost immediately on these ships if I use that style.

The engine/rudder/cargo bay randomized is now completed. M8 class get random missile amounts.

good to hear from you.

corbinbird

User avatar
narn
Posts: 218
Joined: Sun, 9. Apr 06, 21:07
x3

Post by narn » Mon, 25. Oct 10, 22:08

Your mod is not installing for me. I was wondering if you could do the following:

1 Make a .zip or .rar for this mod

2 Make it so your mod does not give me map data on new start up... I dont like this...

3 Make a light version of your mod that only and ONLY moves the beginning free ships around and does nothing else.

I would do this myself but I cant get at the .spk data because the script installer is being buggy which is why I'm asking for a .zip version.

Thanks

Post Reply

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