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

Expansion Planetfall Mission - OoHaul

Content

Warnings

  1. Unknown key 'requires_oxp' at https://wiki.alioth.net/img_auth.php/b/bf/PlanetFall_Mission_-_Oo-Haul_1.11.oxz!manifest.plist

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Add-On to Planetfall to give OoHaul locations and escort mission. Add-On to Planetfall to give OoHaul locations and escort mission.
Identifier oolite.oxp.Thargoid.Planetfall-OoHaul oolite.oxp.Thargoid.Planetfall-OoHaul
Title Planetfall Mission - OoHaul Planetfall Mission - OoHaul
Category Missions Missions
Author Thargoid Thargoid
Version 1.11 1.11
Tags mission mission
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://wiki.alioth.net/index.php/Planetfall_OXP#AddOns n/a
Download URL https://wiki.alioth.net/img_auth.php/b/bf/PlanetFall_Mission_-_Oo-Haul_1.11.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 1610873458

Documentation

Also read http://wiki.alioth.net/index.php/Planetfall%20Mission%20-%20OoHaul

Planetfall Oo-Haul v1.11 ReadMe & License.txt

Planetfall Oo-Haul Mission OXP by Thargoid.

This is an add-on mission OXP for PlanetFall v1.12 and Oo-Haul. It introduces a new planet-side location on the prime planet of systems with non-Anarchy governments and a population of over 30 billion, that of the Oo-Haul distribution centre.

At this centre it is possible to stock up on essentials, but also to undertake a paid emergency Oo-Haul escort mission. This is to link up with an Oo-Hauler in orbit near the system main station and escort it out to either the witchpoint or the system constore where present.

--------------------------------------------------------------
Requirements:

Whilst this OXP only requires PlanetFall v1.12 (or newer) to operate, to give the full atmosphere you should also have Oo-Haul installed, and to give the constore version of the mission you will need Your Ad Here (plus at least one set) installed.

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

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. Basically if it's unique or would identify or overwrite anything in the original OXP, then you may not re-use it (for obvious compatibility reasons).
* 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.
* The license information (either as this file or merged into a larger one) must be included in the OXP.
* 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 "PlanetFall Mission - Oo-Haul 1.11.oxp" to the AddOns directory of your Oolite installation. Then start the game up and the ships should be added. 

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

Version history:

20/03/2009 - Version 1.00, full release.
15/04/2010 - Version 1.10, update for Oolite 1.74 (no longer compatible with lower versions).
13/02/2011 - Version 1.11, removal of upper limit, to allow running with 1.75

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

Oo-Haul is by Dr Nil, with recent updating by Ark and Eric Walch.
Your Ad Here is also by Dr Nil, with many other contributors.

With thanks to Eric and Kaks for their contributions and discussion on the AIs for this OXP, and for the original inspiration to link Oo-Haul into Planetfall by Ark.

Equipment

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

Ships

Name
PF Oohaul Crate
Cargo container
Oo-Hauler
PFoohaulerWit
Oo-Haul Distribution Centre

Models

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

Scripts

Path
Scripts/PFoohaulcargo.js
this.name      		= "PFoohaulcargo"; 
this.author   		= "Original by Ark, modified by Thargoid"; 
this.copyright 		= "Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with clauses - see readme.txt."; 
this.description 	= "Code for spawn oohaul cargo"; 
this.version   		= "1.10";

this.shipDied = function(whom, why)
{
	this.ship.owner.spawn("PFoohaulcargo", 10);
	missionVariables.PFoohaul_credits -= 500 // decrement credits with 500 on each death.
	if(--missionVariables.PFoohaul_cargo == 0) missionVariables.PFoohaul_credits = 500  // decrement by one. And when zero set credits to 500.
}
Scripts/PFoohauler.js
this.name     		= "PFoohauler"; 
this.author    		= "Thargoid"; 
this.copyright 		= "Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with clauses - see readme.txt.";  
this.description	= "Code for Planetfall Oohauler"; 
this.version   		= "1.10";

this.shipDied = function(whom, why)
	{
	missionVariables.PFoohaul_credits = 0;
	missionVariables.PFoohaul_mis_done = null;
	missionVariables.PFoohaul_mis_stage = 1;
	}

this.shipWillExitWitchspace = function()
	{
	this.ship.switchAI("route1traderAI.plist");
	delete this.shipDied;
	}

this.rewardPlayer = function()
	{
	player.credits += missionVariables.PFoohaul_credits;
	missionVariables.PFoohaul_credits = 0;
	missionVariables.PFoohaul_mis_done = null;
	missionVariables.PFoohaul_mis_stage = 1;
	}

this.missionDone = function()
	{
	missionVariables.PFoohaul_mis_stage = 3;
	missionVariables.PFoohaul_mis_done = "YES";
	}

this.locateConstore = function()
	{
	this.storeArray = system.shipsWithPrimaryRole("constore");
	if(this.storeArray.length == 0) // where'd the constore go?
		{
		this.ship.switchAI("PFoohaulWitAI.plist"); // let's go to the witchpoint instead then
		this.ship.AIState = "HEAD_FOR_WITCHPOINT";
		}
	else
		{
		this.ship.target = this.storeArray[0];
		this.ship.reactToAIMessage("CONSTORE_FOUND");
		}
	}

this.locateJumpPoint = function()
	{
	this.buoyArray = system.shipsWithPrimaryRole("buoy-witchpoint");
	if(this.buoyArray.length == 0) // where'd the witchpoint buoy go?
		{
		this.ship.reactToAIMessage("WITCHBUOY_NOT_FOUND");
		}
	else
		{
		this.ship.target = this.buoyArray[0];
		this.ship.reactToAIMessage("WITCHBUOY_FOUND");
		}
	}
Scripts/PlanetFall_OoHaul.js
this.name 			= "PlanetFall_Oohaul"; 
this.author 		= "Thargoid"; 
this.copyright 		= "Creative Commons Attribution - Non-Commercial - Share Alike 3.0 license with clauses - see readme.txt."; 
this.description 	= "Oo-Haul escort mission from the main planet to the witchpoint & constore."; 
this.version 		= "1.10"; 

this.startUp = function()
	{
	missionVariables.PFoohaul_mis_stage = 1;
	}

this.shipExitedWitchspace = function() 
	{
	if(missionVariables.PFoohaul_mis_stage == 2 || missionVariables.PFoohaul_mis_stage == 3)
		{
		mission.setInstructionsKey(null);
		missionVariables.PFoohaul_mis_stage = 1;
		}
	}

this.guiScreenChanged = function()
	{
	if(!player.ship.docked) // if we're in an in-flight GUI screen, no need to go any further
		{
		return;
		}

	if(!player.ship.dockedStation.hasRole("planetFall_mainSurface_oohaul") && !player.ship.dockedStation.hasRole("constore")) 
		{ // if we're not at a constore or the Oohaul planetside distribution centre, bail out here
		return;
		}

	if(player.ship.dockedStation.hasRole("planetFall_mainSurface_oohaul") && missionVariables.PFoohaul_mis_stage == 1 && (guiScreen == "GUI_SCREEN_MAIN" || guiScreen == "GUI_SCREEN_STATUS"))
		{
		this.PFoohaul_conArray = system.shipsWithPrimaryRole("constore");
		if(system.government > 3)
			{
			missionVariables.PFoohaul_credits = 2276;
			if(this.PFoohaul_conArray.length > 0)
				{
				mission.runScreen({title:"Oo-Haul Contract to Constore", messageKey:"PFoohaul_con_desc_lodanger", choicesKey:"PFoohaul_con_choice", shipKey:"PFoohaulerWit"}, this.choices);
				}
			else
				{
				mission.runScreen({title:"Oo-Haul Contract to Witchpoint", messageKey:"PFoohaul_wit_desc_lodanger", choicesKey:"PFoohaul_wit_choice", shipKey:"PFoohaulerWit"}, this.choices);
				}
			missionVariables.PFoohaul_mis_stage = 2;
			}
		else
			{
			missionVariables.PFoohaul_credits = 4330;
			if(this.PFoohaul_conArray.length > 0)
				{
				mission.runScreen({title:"Oo-Haul Contract to Constore", messageKey:"PFoohaul_con_desc_hidanger", choicesKey:"PFoohaul_con_choice", shipKey:"PFoohaulerCon"}, this.choices);
				}
			else
				{
				mission.runScreen({title:"Oo-Haul Contract to Witchpoint", messageKey:"PFoohaul_wit_desc_hidanger", choicesKey:"PFoohaul_wit_choice", shipKey:"PFoohaulerCon"}, this.choices);
				}
			missionVariables.PFoohaul_mis_stage = 2;
			}
		return;
		}
	
	if(player.ship.dockedStation.hasRole("constore") && missionVariables.PFoohaul_mis_stage == 3 && (guiScreen == "GUI_SCREEN_MAIN" || guiScreen == "GUI_SCREEN_STATUS"))
		{
		if(missionVariables.PFoohaul_mis_done == "YES")
			{
			mission.runScreen({title:"Oo-Haul Mission Accomplished", messageKey:"PFoohaul_con_desc_docked"});
			missionVariables.PFoohaul_mis_done = null;
			player.credits += missionVariables.PFoohaul_credits;
			missionVariables.PFoohaul_credits = null;
			missionVariables.PFoohaul_mis_stage = 1;
			mission.setInstructionsKey(null)
			}
		else
			{
			missionVariables.PFoohaul_mis_stage = null;
			missionVariables.PFoohaul_credits = null;
			mission.setInstructionsKey(null)
			}
		}
	}


this.shipWillLaunchFromStation = function()
	{
	if(missionVariables.PFoohaul_mis_stage == 0)
		{
		missionVariables.PFoohaul_mis_stage = 1;
		}
	this.PFoohaul_conArray = system.shipsWithPrimaryRole("constore");
	}

this.choices = function (choice)
	{
	if(choice == "PFoohaul_no" && missionVariables.PFoohaul_mis_stage == 2)
		{
		missionVariables.PFoohaul_mis_stage = 0;
		missionVariables.PFoohaul_credits = 0;
		return;
		}

	if(choice == "PFoohaul_yes_con" && missionVariables.PFoohaul_mis_stage == 2)
		{
		missionVariables.PFoohaul_mis_stage = 3;
		missionVariables.PFoohaul_cargo = 3;
		system.legacy_addShipsAt("PFoohaulerCon", 1, "abs", system.mainStation.position.add([2000,2000,0]));
		mission.setInstructionsKey("PFoohaul_con_desc_short");
		return;
		}

	if(choice == "PFoohaul_yes_wit" && missionVariables.PFoohaul_mis_stage == 2)
		{
		missionVariables.PFoohaul_mis_stage = 3;
		missionVariables.PFoohaul_cargo = 3;
		system.legacy_addShipsAt("PFoohaulerWit", 1, "abs", system.mainStation.position.add([2000,2000,0]));
		mission.setInstructionsKey("PFoohaul_wit_desc_short");
		return;
		}
	}