Back to Index Page generated: Nov 12, 2024, 11:02:04 PM

Expansion Lazarus

Content

Warnings

  1. http://wiki.alioth.net/index.php/Lazarus -> 404 Not Found
  2. Low hanging fuit: Information URL exists...

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description A small OXP which replaces the trunk Thargoid warship ship script, giving new capabilities of Thargon reanimation plus occasional reinforcements arriving in and just after battles. A small OXP which replaces the trunk Thargoid warship ship script, giving new capabilities of Thargon reanimation plus occasional reinforcements arriving in and just after battles.
Identifier oolite.oxp.Thargoid.Lazarus oolite.oxp.Thargoid.Lazarus
Title Lazarus Lazarus
Category Ships Ships
Author Thargoid Thargoid
Version 1.00 1.00
Tags ships ships
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://wiki.alioth.net/index.php/Lazarus_OXP n/a
Download URL https://wiki.alioth.net/img_auth.php/0/09/Lazarus_1.00.oxz n/a
License Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with clauses - see readme file Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with clauses - see readme file
File Size n/a
Upload date 1610873222

Documentation

Lazarus v1.00 Readme & License.txt

Lazarus OXP by Thargoid.

Something has changed - the bugs have up'd their game. Numerous reports from both civilian and miltary Commanders have told of encounters with Thargoids where, after the battle they were cleaning up the debris and dormant Thargon fighters, a further warship appeared and suddenly all those drones were no longer dormant but flying and blasting. Some unfortunates have even reported this happening with drones that they have already scooped, with more than one ship being destroyed as the drones bust out and start attacking.

So keep your wits about you all, especially Commanders who are unfortunate (or foolish) enough to end up facing off against the bugs in interstellar space!

--------------------------------------------------------------

This OXP is a substitute/replacement oolite-thargoid-warship.js ship script file. It will supercede the existing trunk one, and provide all Thargoid vessels which use the script with the capability to scan for (once every 30-90s) and have a chance (50%) to resurrect previously uncontrolled Thargon fighters and take control of them. 

In the case of Thargons which have already been scooped, there is a 1% chance per ton in the hold that one or more will also be reactivated, causing them to blast their way out of the hold and rejoin the fight and doing nasty damage to the ship in the process.

Additionally if the fight lasts for a longer time, there is a chance that it will attract further warship reinforcements, who may also have the same resurrection capability.

The OXP is designed for seasoned players (they taste better :) ) who are looking for a little more challenge. It shifts the balance back somewhat towards the aliens and makes interstellar space somewhere you really don't wanna be for long.

It requires Oolite version 1.76 or above to work.

--------------------------------------------------------------
License:

This OXP is released under the Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with the following clauses:

* Whilst you are free (and encouraged) to re-use any of the scripting, models or texturing in this OXP, the usage must be distinct from that within this OXP. Unique identifiers such as (but not limited to) unique shipdata.plist entity keys, mission variables, script names (this.name), equipment identity strings (EQ_), description list arrays and entity roles must not be re-used without prior agreement.
* rebundling of this OXP within another distribution is permitted as long as it is unchanged. The following derivates however are permitted and except from the above:
	* the conversion of files between XML and openStep.
	* the merging of files with other files of the same type from other OXPs.
* Even though it is not compulsory, if you are re-using any sizable or recognisable piece of this OXP, please let me know :)

--------------------------------------------------------------
Instructions:

Unzip the file, and then move the folder "Lazarus 1.00.oxp" to the AddOns directory of your Oolite installation. 

--------------------------------------------------------------
Version history:

25/03/2013 - First release, version 1.00

--------------------------------------------------------------
Acknowledgements:

With thanks to Gizmo and Cody for beta-testing the script and for valuable feedback. The OXP idea came from a discussion thread on the BB forum.

Equipment

This expansion declares no equipment. This may be related to warnings.

Ships

This expansion declares no ships. This may be related to warnings.

Models

This expansion declares no models. This may be related to warnings.

Scripts

Path
Config/script.js
this.name					= "Lazarus WorldScript";
this.author					= "Thargoid";
this.copyright				= "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description			= "WorldScript for Lazarus OXP";
this.version				= "1.00";
"use strict";

this.startUp = function()
	{ 
	log(this.name, "Lazarus OXP - Thargoid warship trunk ship script has been replaced."); 
	delete this.startUp;
	}

this.$startCountdown = function(entryPos)
	{ 
	this.entryPos = entryPos;
	this.$stopCountdown();
	this.spawnTimer = new Timer(this, this.$spawnShip, (15 + Math.ceil(Math.random() * 45))); 
	}
	
this.$stopCountdown = function()
	{
	if(this.spawnTimer && this.spawnTimer.isRunning)
		{ 
		this.spawnTimer.stop();
		delete this.spawnTimer;
		}
	}
	
this.$spawnShip = function()
	{ 
	if(this.entryPos)
		{ this.newArrival = system.addShips("thargoid", 1, this.entryPos, 12800); }
	}
Scripts/oolite-thargoid-warship.js
this.name           = "oolite-thargoid-warship";
this.author         = "Thargoid";
this.copyright      = "Creative Commons: attribution, non-commercial, sharealike with clauses - see readme.txt";
this.description    = "New ship script for Thargoid warships - overwrites and replaces the trunk one";
this.version        = "1.00";
"use strict";

this.shipSpawned = function()
	{
	this.ship.group = new ShipGroup();
	this.ship.group.addShip(this.ship);
	this.ship.group.leader = this.ship;
	this.$reanimate();
	this.scanTimer = new Timer(this, this.$scanForThargons, Math.ceil(Math.random() * 15));
	}

this.shipDied = function()
	{
	this.$stopTimer();
	this.ship.commsMessage(expandDescription("[thargoid_curses]"));
	}

this.$scanForThargons = function()
	{
	delete this.scanTimer;
	if(!player.ship || !this.ship || !player.ship.isValid || !this.ship.isValid) { return; }	

	if(this.ship.position.distanceTo(player.ship.position) < 25600 && Math.random() < (manifest.alienItems * 0.01))
		{
		player.consoleMessage("Focussed alien beam detected.");
		player.consoleMessage("Scooped Thargons activated! Weapon fire detected in hold!");
		player.ship.takeInternalDamage();
		player.ship.energy *= (0.2 + (Math.random() * 0.7));
		manifest.alienItems--;
		for(var i=0; i < manifest.alienItems; i++)
			{ 
			if(Math.random() < 0.5) 
				{ 
				this.ejected = player.ship.ejectItem("thargon"); 
				this.$swapEntity(this.ejected);
				manifest.alienItems--;
				} 
			}
		}
		
	if(Math.random() > 0.5) { this.$reanimate(); }
	
	if(Math.random() > 0.9 && this.ship.hasHostileTarget && worldScripts["Lazarus WorldScript"])
		{ worldScripts["Lazarus WorldScript"].$startCountdown(this.ship); }	

	this.scanTimer = new Timer(this, this.$scanForThargons, (15 + Math.ceil(Math.random() * 75)));
	}
	
this.playerWillEnterWitchspace = function()
	{
	if(worldScripts["Lazarus WorldScript"])
		{ worldScripts["Lazarus WorldScript"].$stopCountdown(); }
	}	
	
this.$stopTimer = function()
	{
	if(this.scanTimer && this.scanTimer.isRunning)
		{ 
		this.scanTimer.stop(); 
		delete this.scanTimer;
		}
	}
	
this.$reanimate = function() 
	{ 
	function isUncontrolledThargon(entity) 
		{ 
		return (entity.isShip && (entity.hasRole("thargon") || entity.hasRole("tharglet")) && !entity.isThargoid && entity.isCargo && entity.AI === "dumbAI.plist");
    	}

	var thargonArray = system.filteredEntities(this, isUncontrolledThargon, this.ship, 25600)	
	if(thargonArray.length > 0)
		{
		var thargCounter = thargonArray.length - 1; // reset the counter
		for(thargCounter = thargonArray.length - 1; thargCounter >= 0; thargCounter--)
			{ 
			this.chance = Math.random();
			if(this.chance < 0.5) { this.$swapEntity(thargonArray[thargCounter]); }
			if(this.chance > 0.9) { thargonArray[thargCounter].explode(); }
			}
		}
	}

this.$swapEntity = function(entity)
	{
	if(!entity || entity === null || !entity.isValid) { return; }
	let newThargons = system.addShips("[" + entity.dataKey + "]", 1);
	newThargon = newThargons[0];
	newThargon.position = entity.position; 
	newThargon.orientation = entity.orientation; 
	this.ship.group.addShip(newThargon);
	if(this.ship && this.ship.target && this.ship.target.isValid) { newThargon.target = this.ship.target; }
	entity.remove();
	}