Back to Index Page generated: Sep 15, 2026, 9:03:40 PM

Expansion Derelicts Don't Count

Content

Warnings

  1. http://wiki.alioth.net/index.php/Derelicts%20Don't%20Count -> 404 Not Found
  2. Low hanging fuit: Information URL exists...

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description In versions of Oolite up to 1.91 (current version at time of writing), destroying derelict ships increases the player's Elite score. Various other OXPs (such as Towbar, Ship Version, Laser Cannons, etc.) increase the likelihood that pilots will try to use escape pods, leaving more derelicts for the player to find. This OXP negates the Elite score for each derelict destroyed by the player, and instead awards it when the pilot of the ship chooses to abandon ship due to attacks by the player. In versions of Oolite up to 1.91 (current version at time of writing), destroying derelict ships increases the player's Elite score. Various other OXPs (such as Towbar, Ship Version, Laser Cannons, etc.) increase the likelihood that pilots will try to use escape pods, leaving more derelicts for the player to find. This OXP negates the Elite score for each derelict destroyed by the player, and instead awards it when the pilot of the ship chooses to abandon ship due to attacks by the player.
Identifier oolite.oxp.milo.derelicts_dont_count oolite.oxp.milo.derelicts_dont_count
Title Derelicts Don't Count Derelicts Don't Count
Category Mechanics Mechanics
Author Milo Milo
Version 1.2 1.2
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL https://wiki.alioth.net/index.php/Derelicts_don%27t_count_OXP n/a
Download URL https://wiki.alioth.net/img_auth.php/4/46/Derelicts_Dont_Count_1.2.oxz
License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
File Size n/a
Upload date 1776290395

Relationships Diagram

Documentation

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
"use strict";
this.name        = "derelicts_dont_count"; 
this.author      = "Milo"; 
this.copyright   = "2021"; 
this.description = "Negates +1 Elite score awarded by the core game when player destroys a derelict ship or a dead Tharglet."; 
this.version     = "1.2";

this.shipKilledOther = function(whom, damageType) {
	if (whom.isDerelict || ((whom.hasRole("tharglet") || whom.hasRole("thargon")) && whom.scanClass == "CLASS_CARGO")) player.score--;
}

this.shipSpawned = function(ship) {
	if (ship.isPlayer) return;
	// safely monkey-patch all the event functions on the ship
	// when an event is not pre-existing, apply an empty function to our replacement function
	// so we can save time when doing all the calls later
	if (ship.script.shipLaunchedEscapePod) {
		ship.script._ddc_shipLaunchedEscapePod = ship.script.shipLaunchedEscapePod;
	} else {
		ship.script._ddc_shipLaunchedEscapePod = function(escapePod, passengers) {};
	}
	if (ship.script.shipBeingAttacked) {
		ship.script._ddc_shipBeingAttacked = ship.script.shipBeingAttacked;
	} else {
		ship.script._ddc_shipBeingAttacked = function(whom) {};
	}
	if (ship.script.shipBeingAttackedByCloaked) {
		ship.script._ddc_shipBeingAttackedByCloaked = ship.script.shipBeingAttackedByCloaked;
	} else {
		ship.script._ddc_shipBeingAttackedByCloaked = function() {};
	}
	if (ship.script.shipAttackedWithMissile) {
		ship.script._ddc_shipAttackedWithMissile = ship.script.shipAttackedWithMissile;
	} else {
		ship.script._ddc_shipAttackedWithMissile = function(missile, whom) {};
	}
	
	// award the kill when the player forces the pilot to eject
	ship.script.shipLaunchedEscapePod = function(escapePod, passengers) {
		this.ship.script._ddc_shipLaunchedEscapePod(escapePod, passengers);
		if (this.ship.script._lastAttacker && this.ship.script._lastAttacker.isPlayer) player.score++;
	}
	// record who was the last entity to attack this ship
	ship.script.shipBeingAttacked = function(whom) {
		this.ship.script._ddc_shipBeingAttacked(whom);
		this.ship.script._lastAttacker = whom;
	}
	ship.script.shipBeingAttackedByCloaked = function() {
		this.ship.script._ddc_shipBeingAttacked();
		// because this event doesn't get a "whom" parameter, we need to check who the player is targetting
		// if it's this ship, we know our "whom".
		if (player.ship.target == this.ship) this.ship.script._lastAttacker = player.ship;
	}
	ship.script.shipAttackedWithMissile = function(missile, whom) {
		this.ship.script._ddc_shipAttackedWithMissile(missile, whom);
		this.ship.script._lastAttacker = whom;
	}
}