Back to Index Page generated: May 8, 2024, 6:16:03 AM

Expansion Spy Hunter

Content

Warnings

  1. Information URL mismatch between OXP Manifest and Expansion Manager string length at character position 0

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Adds the Spy Hunter mission to galaxy 1. Adds the Spy Hunter mission to galaxy 1.
Identifier oolite.oxp.Selezen.SpyHunter oolite.oxp.Selezen.SpyHunter
Title Spy Hunter Spy Hunter
Category Missions Missions
Author Dave Hughes Dave Hughes
Version 1.3 1.3
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL n/a
Download URL https://wiki.alioth.net/img_auth.php/e/e7/SpyHunter.oxz n/a
License CC-BY-ND 4.0 CC-BY-ND 4.0
File Size n/a
Upload date 1610873503

Documentation

Also read http://wiki.alioth.net/index.php/Spy%20Hunter

readme.txt

Spy Hunter
----------
by Dave "Selezen" Hughes
an addon for Oolite by Giles Williams.
Based on "Elite" by Ian Bell and David Braben

Maintained by Nick "phkb" Rogers.

Overview
--------
Spy Hunter is an addon mission pack for Oolite.  It is a mission for those ranked Dangerous or above, and is triggered by arriving at Inines in Galaxy 1 (map 000) at any of the relevant ranks.

About Version 1.2
-----------------
Apart from the new ship model, and a small addition (adding some additional text to the manifest screen when the mission is complete but you haven't received your reward), no functional changes have been made.

About Version 1.1
-----------------
This is my first attempt at a mission expansion, and was written using samples of other OXP packs for reference. It is a fairly simple mission, although the difficulty of the enemy craft has not been tested.  As I have no functionality to test OXPs on my version of Oolite, I will rely on feedback from the good users to apply any tweaks or fixes.  I have tested the meshes and textures, and they are working fine, but I can't test the scripting or actual mission generation due to the limitations of the Windows version of Oolite.

I've even included a sample savegame file (which I hope will be compatible with the Mac versions) to place you in a position to get to Inines to start the mission.  You will be of Dangerous rank.  My idea of including this is mainly to enable people to bug test it if they like...

If you are a fan of the strict ruleset, you may not like this expansion.  It adds more depth to the Oolite experience and, in my opinion, raises a few questions about the universe in which Oolite (and Elite) are set.  I would say more, but I may ruin the twist in the tale if I say too much.

I hope you enjoy the expansion, and let me know if you have any questions or queries.  You can find me on the oolite forums at http://aegidian.org/bb (under the username Selezen) or via email at decker@hughesd.co.uk.

Thanks for playing!

Dave, 12/07/2005

PS: watch out for the Tionisla Orbital Graveyard, coming soon from the Oolite forum's Gravedigger Group!!

License
-------
This OXP is released under the Creative Commons - Attribution - No Derivatives 4.0 International License. To view a copy of this license visit https://creativecommons.org/license/by-nd

Version History
---------------
Version 1.1
- Added mission destinations on Galaxtic Map
- Made mission clash proof

Version 1.2
- Upgraded plist script to Javascript.
- Updated ship model to use a variation of Selezen's Imperial Courier, updated to use JS AI.
- Converted XML-type plist files to OpenStep format.
- Updated sample save file to 1.82 compatibility level.
- Tweaked the manifest screen mission text for when the target is destroyed.
- Set minimum Oolite version to 1.82.
- Corrected a couple of spelling mistakes.
- Added a licence.

Version 1.3
- Small tweaks to shipdata.plist for compatibility.

Equipment

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

Ships

Name
Spy Courier Engine
Spy Courier Engine
Spy Courier

Models

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

Scripts

Path
Config/script.js
"use strict";
this.name        = "SpyHunter";
this.author      = "Selezen";
this.copyright   = "2016 Dave 'Selezen' Hughes";
this.description = "Main script file for Spy Hunter mission";

//-------------------------------------------------------------------------------------------------------------
this.missionScreenOpportunity = function() {
	if (galaxyNumber == 0 && player.ship.dockedStation.isMainStation && player.score > 512) {
		// set up mission
		if (system.ID == 158 && !missionVariables.spyhunter) {
			mission.runScreen({
				screenID:"spyhunter_screen_1",
				titleKey: "spy_hunter_mission_title",
				messageKey: "spy_hunter_Inines_orders",
				exitScreen: "GUI_SCREEN_STATUS"
			});
			missionVariables.spyhunter = "STAGE1";
			mission.markSystem({system:164, name:"spyhunter"});
			mission.setInstructionsKey("em1_sh_header1", this.name);
			return;
		}
		// stage 1 complete - setup stage 2
		if (system.ID == 164 && missionVariables.spyhunter == "STAGE1") {
			mission.runScreen({
				screenID:"spyhunter_screen_2",
				titleKey: "spy_hunter_mission_title",
				messageKey: "spy_hunter_Ribilebi_briefing",
				exitScreen: "GUI_SCREEN_STATUS"
			});
			missionVariables.spyhunter = "STAGE2";
			player.credits += 1000;
			mission.unmarkSystem({system:164, name:"spyhunter"});
			mission.markSystem({system:51, name:"spyhunter"});
			mission.setInstructionsKey("em1_sh_header2", this.name);
			return;
		}
		// stage 2 complete - setup stage 3
		if (system.ID == 51 && missionVariables.spyhunter == "STAGE2") {
			mission.runScreen({
				screenID:"spyhunter_screen_3",
				titleKey: "spy_hunter_mission_title",
				messageKey: "spy_hunter_Alaza_briefing",
				exitScreen: "GUI_SCREEN_STATUS"
			});
			missionVariables.spyhunter = "STAGE3";
			mission.unmarkSystem({system:51, name:"spyhunter"});
			mission.markSystem({system:102, name:"spyhunter"});
			mission.setInstructionsKey("em1_sh_header3", this.name);
			return;
		}
		// stage 2 complete - setup stage 3
		if (system.ID == 102 && missionVariables.spyhunter == "STAGE3") {
			mission.runScreen({
				screenID:"spyhunter_screen_4",
				titleKey: "spy_hunter_mission_title",
				messageKey: "spy_hunter_Beraanxe_briefing",
				exitScreen: "GUI_SCREEN_STATUS"
			});
			missionVariables.spyhunter = "STAGE4";
			mission.unmarkSystem({system:102, name:"spyhunter"});
			mission.markSystem({system:126, name:"spyhunter"});
			mission.setInstructionsKey("em1_sh_header4", this.name);
			return;
		}
		// stage 4 complete - show final message
		if (system.ID == 126 && missionVariables.spyhunter == "STAGE5") {
			mission.runScreen({
				screenID:"spyhunter_screen_6",
				titleKey: "spy_hunter_mission_title",
				messageKey: "spy_hunter_Anerbe_briefing",
				exitScreen: "GUI_SCREEN_STATUS"
			});
			missionVariables.spyhunter = "MISSION_COMPLETE";
			player.credits += 4000;
			mission.unmarkSystem({system:126, name:"spyhunter"});
			mission.setInstructionsKey(null, this.name);
			return;
		}
	}
}

//-------------------------------------------------------------------------------------------------------------
this.systemWillPopulate = function() {
	if (missionVariables.spyhunter == "STAGE4" && system.ID == 126 && galaxyNumber == 0 && system.countShipsWithRole("spyhunter_impcourier") == 0) {
		var position = Vector3D(0, 0, 0.1).fromCoordinateSystem("wpu");
		// add base with populator
		system.setPopulator("spy hunter", {
			callback: function(pos) {
				var sb = system.addShips("spyhunter_impcourier", 1, pos);
				if (sb.length > 0) {
					// monkey patch if necessary
					if (sb[0].script.shipDied) {
						sb[0].script.$sh_ovr_shipDied = sb[0].script.shipDied;
					}
					// add our shipDied event to the spy's ship
					sb[0].script.shipDied = this.$spyHunter_shipDied;
				} else {
					log(this.name, "!!ERROR: Spy Courier not spawned!");
				}
			}.bind(this),
			location:"COORDINATES",
			coordinates:position});
	}
}

//-------------------------------------------------------------------------------------------------------------
this.$updateManifestText = function() {
	mission.setInstructionsKey("em1_sh_header5", this.name);
}

//-------------------------------------------------------------------------------------------------------------
this.$spyHunter_shipDied = function(whom, why) {
	if (this.ship.script.$sh_ovr_shipDied) this.ship.script.$sh_ovr_shipDied(whom, why);
	if (missionVariables.spyhunter == "STAGE4") {
		missionVariables.spyhunter = "STAGE5";
		worldScripts.SpyHunter.$updateManifestText();
	}
}