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

Expansion Flying Dutchman

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description This OXP introduces the small possibility to encounter a ghost ship. This OXP introduces the small possibility to encounter a ghost ship.
Identifier oolite.oxp.Commander_McLane.FlyingDutchman oolite.oxp.Commander_McLane.FlyingDutchman
Title Flying Dutchman Flying Dutchman
Category Missions Missions
Author Commander McLane Commander McLane
Version 1.7 1.7
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://wiki.alioth.net/index.php/Flying_Dutchman_OXP n/a
Download URL https://wiki.alioth.net/img_auth.php/7/7c/FlyingDutchman-1.7.oxz n/a
License CC-BY-NC-SA 3.0 CC-BY-NC-SA 3.0
File Size n/a
Upload date 1610873343

Documentation

Also read http://wiki.alioth.net/index.php/Flying%20Dutchman

.~lock.readMe.rtf#

,dybal,dybal,26.11.2020 13:57,file:///home/dybal/.config/libreoffice/4;

readMe.rtf

{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
\readonlydoc1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11905\paperh16837\margl1440\margr1440\vieww12720\viewh8880\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural

\f0\b\fs26 \cf0 \ul \ulc0 Flying Dutchman v 1.7
\b0 \ulnone \
\
by "Commander McLane"\
\
inspired by a model by "Griff"\
and a story by "Captain Hesperus"\
\
\
an Expansion Pack for Oolite by Giles Williams\
\
based on "Elite" by Ian Bell and David Braben\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\cf0 \
\
\ul Introduction\ulnone \
\
'...and, inevitably, as the chronometers count down the seconds to midnight and the windows of the station's bar grow dark as the planet blocks out the light of the star, the old timers sit nearer together and begin to trade tales of 'The Phantom Cobra'. Some claim that it's the ghost of Commander Peter Jameson, reported lost at the end of the last Thargoid War, others that it is simply a manifestation of all those lost souls who were trapped in the trackless depths of interstellar space. One common story is the trail of bad luck and hideous deaths that follow in the wake of the ship's sightings...'\
\
\ul Overview\ulnone \
\
This OXP introduces the small possibility to encounter a ghost ship, the tale of which is sung in shady bars (and in the news, if they have nothing else to report). After an introduction, which will eventually be triggered if you just fly around a little, you can meet the ship itself. Find out whether the tales and stories contain a grain of truth...\
\
\ul Featured Ships\ulnone \
\
Griff's Wireframe Cobra triggered and inspired this OXP. It's the sole ship contained in it.\
\
\ul Minimum Requirements\ulnone \
\
Flying_Dutchman.oxp in version 1.7 requires at least Oolite 1.75.\
\
\ul Download Location\ulnone \
\
This OXP is available for download via the {\field{\*\fldinst{HYPERLINK "http://wiki.alioth.net/index.php/Flying_Dutchman_OXP"}}{\fldrslt Elite Wiki}}.\
\
\ul Installation\ulnone \
\
Move or copy the file Flying_Dutchman.oxp from this folder to the AddOns folder. Where this resides depends on your system. Restart Oolite.\
\
\ul Acknowledgements\ulnone \
\
Thanks to Griff for his ingenious model of the Wireframe Cobra, which inspired this little OXP.\
\
Thanks to Captain Hesperus for the short story he posted on the Oolite BB, which set the tone for what this OXP does.\
\
Also thanks to all the Oolite coders who are making the scripting model more and more sophisticated, thereby making OXPs like this possible.\
\
\ul License\ulnone \
\
This work is licensed under the Creative\'a0Commons Attribution-NonCommercial-ShareAlike License version 3.0. For more information see the ReadMe of Oolite or the {\field{\*\fldinst{HYPERLINK "http://creativecommons.org/licenses/by-nc-sa/3.0/"}}{\fldrslt Creative Commons' website}}.\
\
Practically this means that you may rip it apart and use whatever seems useful to you, as long as you credit the original author. It would be nice\'97although by no means necessary\'97to give me a note, if you intend to use parts of it.\
\
\ul History\ulnone \
\
version 1.7 (April 10th, 2011)\
- moved all self-defined methods into their own namespace\
- disabled NPC-shields for the Flying Dutchman if NPC-shields.oxp is installed\
\
version 1.6 (February 22nd, 2011)\
- corrected a bug preventing one of the bad lucks from working properly\
- now using a frame callback for the temperature rising\
- made the OXP compatible to Oolite 1.75\
- therefore it won't run in Oolite versions below that\
\
version 1.5 (September 9th, 2009)\
- one addition to bad luck\
- made the OXP compatible to Oolite 1.73.2\
- therefore it won't run in Oolite versions below that\
\
version 1.4 (November 4th, 2008)\
- the ghost ship is now spawned directly in the player's path\
- made the OXP compatible to Oolite 1.72\
- therefore it won't run in Oolite versions below that\
\
version 1.3 (August 14th, 2008)\
- corrected a bug that could delay the second mission screen\
- two additions to bad luck\
\
version 1.2 (July 27th, 2008)\
- corrected a bug introduced with one of the improvements in 1.1\
\
version 1.1 (July 25th, 2008)\
- two small improvements\
\
version 1.0 (July 24th, 2008)\
- fully functional version\
- requires Oolite 1.71\
}

Equipment

This expansion declares no equipment.

Ships

Name
flying-dutchman
flying-dutchman-runner

Models

This expansion declares no models.

Scripts

Path
Config/script.js
/*

script.js

Script for telling the tale of the Flying Dutchman.


Oolite
Copyright © 2003-2011 Giles C Williams and contributors

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.


Flying_Dutchman.oxp
Copyright © 2008-2011 "Commander McLane"

This work is licensed under the Creative Commons
Attribution-Noncommercial-Share Alike 3.0 Unported License.

To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter
to Creative Commons, 171 Second Street, Suite 300, San Francisco,
California, 94105, USA.

*/

"use strict";

this.name           = "Flying Dutchman";
this.description    = "Script for telling the tale of the Flying Dutchman";
this.author         = "Commander McLane";
this.copyright      = "© 2011 Commander McLane";
this.license		= "CC-by-nc-sa 3.0";
this.version        = "1.7";


this.missionOffers = function()
{
	if (guiScreen == "GUI_SCREEN_MISSION") return;
	if (player.ship.dockedStation.isMainStation)
	{
		if (!missionVariables.flying_dutchman && Math.random() > 0.92)
		{
			mission.runScreen({titleKey:"flying_dutchman_newstitle", messageKey:"flying_dutchman_newsflash", background:"iNews.png"});
			missionVariables.flying_dutchman = "NEWS";
			missionVariables.flying_dutchman_jumpcounter = 0;
		}
		if (missionVariables.flying_dutchman == "NEWS" && system.government > 4 && missionVariables.flying_dutchman_jumpcounter >= 3)
		{
			mission.runScreen({titleKey:"flying_dutchman_encountertitle", messageKey:"flying_dutchman_encounter"});
			missionVariables.flying_dutchman = "ENCOUNTER";
			delete missionVariables.flying_dutchman_jumpcounter;
		}
	}
}

this.missionScreenOpportunity = function()
{
	this.missionOffers();
}

this.shipWillExitWitchspace = function()
{
	if (system.isInterstellarSpace) return;
	if (missionVariables.flying_dutchman == "NEWS") missionVariables.flying_dutchman_jumpcounter ++;
	if (missionVariables.flying_dutchman == "ENCOUNTER") system.addShipsToRoute("flying_dutchman_runner", 1, 0.25, "wp");
	if (missionVariables.flying_dutchman == "SEE_YOU_AGAIN" && Math.random() > 0.95) system.addShipsToRoute("flying_dutchman_runner", 1, 0.25, "wp");
}
Scripts/flying-dutchman-cobra.js
/*

flying-dutchman-cobra.js

Script for the Flying Dutchman.


Oolite
Copyright © 2003-2011 Giles C Williams and contributors

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.


Flying_Dutchman.oxp
Copyright © 2008-2011 "Commander McLane"

This work is licensed under the Creative Commons
Attribution-Noncommercial-Share Alike 3.0 Unported License.

To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter
to Creative Commons, 171 Second Street, Suite 300, San Francisco,
California, 94105, USA.

*/

"use strict";

this.name           = "flying-dutchman-cobra";
this.description    = "Script for the Flying Dutchman";
this.author         = "Commander McLane";
this.copyright      = "© 2011 Commander McLane";
this.license		= "CC-by-nc-sa 3.0";
this.version        = "1.7";


var equipment_key = new Array(
	"EQ_ECM",
	"EQ_FUEL_SCOOPS",
	"EQ_ESCAPE_POD",
	"EQ_ENERGY_BOMB",
	"EQ_ENERGY_UNIT",
	"EQ_NAVAL_ENERGY_UNIT",
	"EQ_DOCK_COMP",
	"EQ_GAL_DRIVE",
	"EQ_FUEL_INJECTION",
	"EQ_ADVANCED_COMPASS",
	"EQ_SHIELD_BOOSTER",
	"EQ_NAVAL_SHIELD_BOOSTER",
	"EQ_HEAT_SHIELD",
	"EQ_WORMHOLE_SCANNER"
);

var equipment_name = new Array(
	"E.C.M. System",
	"Fuel Scoops",
	"Escape Pod",
	"Energy Bomb",
	"Extra Energy Unit",
	"Naval Energy Unit",
	"Docking Computers",
	"Galactic Hyperdrive",
	"Witchdrive Fuel Injectors",
	"Advanced Space Compass",
	"Shield Boosters",
	"Military Shield Enhancement",
	"External Heat Shielding",
	"Wormhole Scanner"
);


this.$checkTemperature = function()
{
	if(player.ship.temperature > 1.2)
	{
		removeFrameCallback(this.raiseTemperature);
        this.temperatureCheck.stop();
		player.consoleMessage("Phew, that was critical. A/C back online.", 3);
		return;
	}
}

this.$tumble = function()
{
	this.ship.reactToAIMessage("LET_HIM_TUMBLE");
	if(this.tumbleCounter++ > 10) this.tumbleTimer.stop();
}

this.$playerBadLuck = function()
{
	missionVariables.flying_dutchman = "SEE_YOU_AGAIN";
	var badLuck = Math.ceil(Math.random()*12);
	switch(badLuck)
	{
	case 1:
		if(player.ship.fuel > 0)
		{
			player.ship.fuelLeakRate = 8;
			player.consoleMessage("Bad luck! Fuel leak detected.", 6);
		}
		break;
		
	case 2:
		var equip = Math.floor(Math.random()*14);
		if(player.ship.equipmentStatus(equipment_key[equip]) == "EQUIPMENT_OK")
		{
			player.consoleMessage("Oops! Your " + equipment_name[equip] + " mysteriously broke.", 6);
			player.ship.setEquipmentStatus(equipment_key[equip], "EQUIPMENT_DAMAGED");
		}
		break;
		
	case 3:
		var pirateGroup = system.addGroup("pirate", 5, player.ship.position, 8000);
        for(i=0; i<pirateGroup.count; i++)
        {
            pirateGroup.ships[i].target = player.ship;
            pirateGroup.ships[i].AIState = ("ATTACK_SHIP");
        }
		player.consoleMessage("Bad luck! Some pirates materialized out of nowhere.", 6);
		break;
		
	case 4:
		this.ship.ejectSpecificItem("qbomb");
		break;
		
	case 5:
		if(player.ship.dumpCargo()) player.consoleMessage("Oops! Lost some cargo.", 6);
		break;
		
	case 6:
		player.consoleMessage("Bad luck! A/C broken. Temperature rising.", 6);
		this.raiseTemperature = addFrameCallback(function(){player.ship.temperature += 0.016;})
		if(this.temperatureCheck) this.temperatureCheck.start();
		else this.temperatureCheck = new Timer(this, this.$checkTemperature, 0, 0.25);
		break;
		
	case 7:
			player.consoleMessage("Bad luck! A Trumble somehow materialized right in front of you.", 6);
			player.ship.awardEquipment("EQ_TRUMBLE");
		break;
		
	case 8:
		system.addShips("asteroid", 1, player.ship.position.add(player.ship.orientation.vectorForward().multiply(2000)), 0);
		player.consoleMessage("Oops! Where did that asteroid come from?", 6);
		break;
		
	case 9:
		player.consoleMessage("Oops! What's happening with your controls?", 6);
		this.tumbleCounter = 0;
		if(this.tumbleTimer) this.tumbleTimer.start();
		else this.tumbleTimer = new Timer(this, this.$tumble, 0, 0.5);
		break;

	case 10:
		player.consoleMessage("Oops! Where are these missiles coming from?", 6);
		var dutchmanMissiles = system.addShips("missile", 6, player.ship.position, 7000);
		for (var i=0; i<dutchmanMissiles.length; i++)
		{
			dutchmanMissiles[i].target = player.ship;
		}
		break;
	
	case 11:
		if(player.bounty < 51)
		{
			player.consoleMessage("Oops! It seems you have become a fugitive! And where do the cops come from so suddenly?!", 6);
			player.bounty += 120;
			system.addShips("police", 3, player.ship.position, 10000);
		}
		break;
		
	case 12:
		{
			player.consoleMessage("What?!? A major bank just all of a sudden went bancrupt! You lost 5 per cent of all your credits!", 6);
			player.credits = player.credits * 0.95;
		}
	}
}

this.playerWillEnterWitchspace = this.shipDied = function()
{
	if(this.tempRaise) delete this.tempRaise;
	if(this.tumbleTimer) delete this.tumbleTimer;
}
Scripts/flying-dutchman-runner.js
/*

flying-dutchman-runner.js

Script for spawning the Flying Dutchman.


Oolite
Copyright © 2003-2011 Giles C Williams and contributors

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.


Flying_Dutchman.oxp
Copyright © 2008-2011 "Commander McLane"

This work is licensed under the Creative Commons
Attribution-Noncommercial-Share Alike 3.0 Unported License.

To view a copy of this license, visit
http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter
to Creative Commons, 171 Second Street, Suite 300, San Francisco,
California, 94105, USA.

*/

"use strict";

this.name           = "flying-dutchman-runner";
this.description    = "Script for spawning the Flying Dutchman";
this.author         = "Commander McLane";
this.copyright      = "© 2011 Commander McLane";
this.license		= "CC-by-nc-sa 3.0";
this.version        = "1.7";


this.$spawnFlyingDutchman = function()
{
	system.addShips("flying_dutchman", 1, player.ship.position.add(player.ship.orientation.vectorForward().multiply(27000)), 500);
}