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

Expansion ADCK Wyvern Explorer

Content

Warnings

  1. http://wiki.alioth.net/index.php/ADCK%20Wyvern%20Explorer -> 404 Not Found
  2. Low hanging fuit: Information URL exists...

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description The Wyvern Explorer is an adaptation of a multi-purpose vessel found in the service of the Alliance. For more details, please check the wiki page. The Wyvern Explorer is an adaptation of a multi-purpose vessel found in the service of the Alliance. For more details, please check the wiki page.
Identifier oolite.oxp.zzz.Montana05.adck_wyvern_explorer oolite.oxp.zzz.Montana05.adck_wyvern_explorer
Title ADCK Wyvern Explorer ADCK Wyvern Explorer
Category Ships Ships
Author ADCK, Montana05 ADCK, Montana05
Version 2.01 2.01
Tags Frontier ships Frontier ships
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL https://wiki.alioth.net/index.php/Wyvern_Explorer_(Oolite) n/a
Download URL https://wiki.alioth.net/img_auth.php/2/29/Oolite.oxp.zzz.Montana05.adck_wyvern_explorer.OXZ n/a
License CC BY-NC-SA 4.0 CC BY-NC-SA 4.0
File Size n/a
Upload date 1658978259

Documentation

read_me.txt

Overview
========

The Wyvern was an attempt to combine a larger trading ship with a faster multiple-role craft, and it was an attempt 
that nearly worked. What the designers ended up with was a craft that had almost enough cargo room to be a trading ship, 
and almost enough speed and kick to be a combat craft. 

It may have fallen between two stools in many people’s eyes, but to others it acts as a great all-rounder. 

History
=======

For years, ships of the Alliance of Independent Systems had contact with GalCop space. Sometimes as explorers, but usually
as traders, they were welcome to most stations and planets.

When ADCK Transport Ltd acquired from unknown sources various blueprints from outer-GalCop ships the Wyvern Explorer
was one of them. Against the advice of the design department, the decision was made to adapt this ship to the 
GalCop market. The unique engine caused nightmares to the developers and the first prototype didn't look promising. 
After the Wyvern Explorer I was introduced to the public, not many orders came in. Only permanent promotions with 
discounts up to 30% brought enough buyers to barely cover the costs.

Soon the management ordered a complete overhaul of the ship. With the help of a mysterious consultant, the
Wyvern Explorer II proved to be much improved. Higher speed and more laser mounts were only some new highlights.
While the II-P offered a ship for prospectors, the II-M is a real multi-purpose vessel featuring the original weapons 
of the Alliance model as standard. The acceptance was a lot higher and soon the number of clients began to raise.

Remarks
=======

This OXP features an adaptation of the multi-purpose vessel found in David Braben's Frontier game.
The ship is based on the Wyvern Explorer OXP (2011, outdated) and the ADCK's FFE Ships OXP (2011).

At some of the variants the engine could be shot off, resulting in a significant loss of speed of the target.

The Linear Particle Accelerator is introduced as the original armament of the Alliance ship. It is the
standard laser of the II-M and otherwise could only be found by clean players at a techlevel 15 facility.
THe LPA is a slightly modified version of the phased particle beam weapon from Pterdyne Technolegies Inc, 
all credits to Cmdr Wyvern	

Credits
=======

David Braben (Frontier game)
ADCK (author, models, basic textures and basic specifications)
Griff (model and basic textures of the standard escape pods)
another_commander (basic specular map of the standard escape pods)
Simon B (model, basic textures and shaders of the Alliance escape pod)
Arexack Heretic (model and basic textures of the Alliance container from Cargo Wreck Teaser OXP)
Cmdr Wyvern (basic design of the Linear Particle Accelerator, adopted from Raptors OXP)

Requirements
============

Oolite V 1.88 or higher and a video card capable of supporting Oolite shaders.

Compatibility
=============

If you are currently flying the player-ship from ADCK's FFE Ships OXP you will face some changes after installing this
package:

Your energy, speed, trust and cargo hull are increased while your recharge rate is a little down. 
The ship texture is replaced with materials using the latest standards.

Otherwise both packages don't interfere with each other.

Details
=======

For additional details, please check the wiki-page: https://wiki.alioth.net/index.php/Wyvern_Explorer_(Oolite)

License
=======

This work is licensed under Creative Commons Attribution Non-Commercial Share Alike 4.0 International (CC BY-NC-SA 4.0).
To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0

Version History
===============

V 2.01 (Montana05, 2022/07/28)

    fixed an issue with flashers on subentities

V 2.00 (Montana05, 2022/07/05)

    complete overhaul of the entire OXP
    improvement of the materials
    included 3 new versions, both NPC and player
    added the Linear Particle Accelerator as a new weapon
    synchronized the package with ADCK's FFE Ships OXP
    various implementations to adjust to the current standards

V 1.00 (ADCK, 2011/07/03)

    ADCK's FFE Ships OXP (various ships, including this one)

V 1.00 (ADCK, 2011/07/02)

    Wyvern Explorer OXP (outdated)

Equipment

Name Visible Cost [deci-credits] Tech-Level
Linear Particle Accelerator yes 20000 15+

Ships

Name
Wyvern Explorer I
Wyvern Explorer II-M
Wyvern Explorer II-M
Wyvern Explorer II-M
Wyvern Explorer II-M
Wyvern Explorer II-P
Wyvern Explorer II-P
Wyvern Explorer II-P
Wyvern Explorer Engine
Wyvern Explorer Engine
Wyvern Explorer I
Wyvern Explorer I
Wyvern Explorer I
Wyvern Explorer
AIS Cargo container
adck_wyvern_explorer_alliance_container_computer
adck_wyvern_explorer_alliance_container_machinery
AIS escape pod
AIS escape pod
escape pod
escape pod
escape pod
escape pod

Models

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

Scripts

Path
Scripts/adck_wyvern_explorer.js
this.name			= "adck_wyvern_explorer";
this.author			= "Montana05";
this.description	= "event handler for the ADCK Wyvern Explorer OXP";
this.version		= "2.01";
this.copyright		= "2022 Montana05";
this.licence   		= "CC BY-NC-SA 4.0";
"use strict";

this.shipSpawned = function(ship)
{
	if(ship.dataKey.search(/adck_wyvern_explorer/i) < 0 || ship.hasRole("cargopod") || ship.isSubEntity || ship.isPlayer)
	{
		return;
	}
	else
	{
		var shipType = ship.dataKey;
		var shipRole = ship.primaryRole;
		var cargoLoad = ship.cargoSpaceUsed;

		// setup escape pods
		if(ship.hasRole("escape-capsule"))
		{
			let crewName = expandDescription("[nom]");
			let crewDescription = "a crew member of an evacuated ship";
			let crewRole = "hunter";  // the role is not particular important anymore, all data will be added by the script
			let crewRace = expandDescription("[adck_wyvern_explorer_races_scientific]");  // add a race to the crew members
			let crewRank = expandDescription("[adck_wyvern_explorer_crew_civil_small]");
			let crewInsurance = this.$getRndInteger(90, 450);
			let crewBounty = 0;
			
			switch(shipType) 
			{
				case "adck_wyvern_explorer_escape_pod_std":

					crewName = ("the " + crewRace + " " + crewRank + " " + expandDescription("[nom]"));
					crewDescription = "a ship crew member";
					crewRole = "hunter";
					crewInsurance = this.$getRndInteger(90, 450);
					break;

				case "adck_wyvern_explorer_escape_pod_std_passenger":

					crewName = ("the " + crewRace + " " + expandDescription("[nom]"));
					crewDescription = "a interstellar passenger";
					crewRole = "passenger";
					crewInsurance = this.$getRndInteger(90, 450);
					break;

				case "adck_wyvern_explorer_escape_pod_std_criminal":

					crewName = ("the " + crewRace + " " + expandDescription("[nom]"));
					crewDescription = "a " + expandDescription("[adck_wyvern_explorer_criminals]") +  "wanted by GalCop police";
					crewRole = "pirate";
					crewBounty = crewInsurance + (15 * system.government);  // stable governments pay extra bonus
					crewInsurance = 0;
					break;

				case "adck_wyvern_explorer_escape_pod_std_pirate":

					crewName = ("the " + crewRace + " " + expandDescription("[adck_wyvern_explorer_pirate_nicknames]") + expandDescription("[nom]"));
					crewDescription = "a " + expandDescription("[adck_wyvern_explorer_criminals]") +  "wanted by GalCop police";
					crewRole = "pirate";
					crewBounty = (crewInsurance * 1.25) + (25 * system.government);  // stable governments pay extra bonus
					crewInsurance = 0;
					break;
					
				case "adck_wyvern_explorer_escape_pod_alliance":

					crewName = ("the " + crewRace + " " + crewRank + " " + expandDescription("[nom]"));
					crewDescription = "a crew member of a ship in the service of the Alliance of Independent Systems";
					crewRole = "hunter";
					crewInsurance = (crewInsurance * 3.00);  // the emissaries of the alliance assist their employees
					break;
					
				case "adck_wyvern_explorer_escape_pod_alliance_criminal":

					crewName = ("the " + crewRace + " " + crewRank + " " + expandDescription("[nom]"));
					crewDescription = "a rogue crew member of a ship in the service of the Alliance of Independent Systems";
					crewRole = "pirate";
					crewBounty = (crewInsurance * 3.00) + (15 * system.government);  // stable governments pay extra bonus
					crewInsurance = 0;
					break;
					
				default: 
	
					break;	
			};

			ship.setCrew
			(
				{
					name: crewName,
					short_description: crewDescription,
					role: crewRole,
					species: crewRace,
					insurance: crewInsurance,
					bounty: crewBounty
				}
			);

			// removes individual roles
			ship.primaryRole = "escape-capsule";
		}
		else
		{
			if(ship.hasRole("GalCop_alien"))
			{
				// adds alien classification
				ship.primaryRole = "alien_trader";
				shipRole = ship.primaryRole;
				ship.scanDescription = "Alien";  // Warning: don't use in shipdata.plist, it will crash the game

				// individual names based on Alliance systems (https://www.edsm.net/en/search/systems/index/)
				const alliance_name_array = 
				[" Ao Guang-", " Shoujeman-", " Keries-", " Arcturus-", " Nzambassee-", " Mullag-", " Morgor-", " Eranin-", " Huokang-", " Al Mina-"];

				let alliance_name = 
				alliance_name_array[Math.floor(Math.random() * alliance_name_array.length)];

				ship.displayName = "Alliance Ship " + ship.name + alliance_name + this.$getRndInteger(100, 999);
			};
			
			switch(shipRole) 
			{
				case "trader":
				case "sunskim-trader":
				case "pirate":
				case "pirate-light-freighter":
				case "adck_wyvern_explorer_I":
				case "adck_wyvern_explorer_IIM":
				case "adck_wyvern_explorer_I_pirate":
				case "adck_wyvern_explorer_IIM_pirate":

					if(shipRole == "adck_wyvern_explorer_I" || shipRole == "adck_wyvern_explorer_IIM")
					{
						ship.primaryRole = "trader";
					};

					if(shipRole == "adck_wyvern_explorer_I_pirate" || shipRole == "adck_wyvern_explorer_IIM_pirate")
					{
						ship.primaryRole = "pirate";
					};
				
					while(ship.cargoSpaceUsed <= 1)  // makes sure that there is some cargo
					{
						if(this.$getRndInteger(1, 6) < 4)
						{
							ship.setCargoType("PLENTIFUL_GOODS");
						}
						else
						{
							ship.setCargoType("SCARCE_GOODS");
						};
					};	
					break;

				case "scavenger":
				case "adck_wyvern_explorer_IIP_02":	

					ship.primaryRole = "scavenger";
				
					if(shipType.search(/_IIP_/i) >= 0)
					{
						ship.forwardWeapon = "EQ_WEAPON_PULSE_LASER";  // Wyvern Explorer II-P exchanges mining to pulse laser
					};

					if(cargoLoad <= 1)
					{
						for(var i = this.$getRndInteger(5, 12) - 1 ; i >= 0 ; --i)
						{
							ship.adjustCargo(this.$adck_wyvern_explorer_scavenger_cargo(), 1);
						};
					};
					break;

				case "miner":
				case "adck_wyvern_explorer_IIP_01":
				
					ship.primaryRole = "miner";

					if(cargoLoad <= 1)
					{
						for(var i = this.$getRndInteger(5, 12) - 1 ; i >= 0 ; --i)
						{
							ship.adjustCargo(this.$adck_wyvern_explorer_miner_cargo(), 1);
						};
					};
					break;

				case "hunter":
				case "hunter-medium":
				case "pirate-medium-fighter":
				case "adck_wyvern_explorer_I_hunter":
				case "adck_wyvern_explorer_IIM_hunter":
							
					if(shipRole == "adck_wyvern_explorer_I_hunter" || shipRole == "adck_wyvern_explorer_IIM_hunter")
					{
						ship.primaryRole = "hunter";
					};
				
					if(cargoLoad <= 1)
					{
						for(var i = this.$getRndInteger(5, 10) - 1 ; i >= 0 ; --i)
						{
							ship.adjustCargo(this.$adck_wyvern_explorer_space_jockey_cargo(), 1);
						};
					};
					break;

				case "alien_trader":

					if(cargoLoad <= 1)
					{
						for(var i = this.$getRndInteger(5, 12) - 1 ; i >= 0 ; --i)
						{
							ship.adjustCargo(this.$adck_wyvern_explorer_alien_cargo(), 1);
						};
					};
					break;	
	
				default: 
	
					break;
			};
		};
		// if there is an existing script in shipDied time to move it
		ship.script.$adck_wyvern_explorer_shipDied_old = ship.script.shipDied;
		ship.script.shipDied = this.$adck_wyvern_explorer_shipDied;	
	};
};	

this.$adck_wyvern_explorer_shipDied = function $adck_wyvern_explorer_shipDied(whom, why) 
{
	if(this.ship.dataKey.search(/adck_wyvern_explorer/i) < 0 || 
	   this.ship.hasRole("escape-capsule") || this.ship.hasRole("cargopod") || this.ship.isSubEntity || this.ship.isPlayer)
	{
		return;
	}
	else
	{
		this.name = "adck_wyvern_explorer";
		let dice = worldScripts.adck_wyvern_explorer;
		let diceRoll = dice.$getRndInteger;
				
		let shipRole = this.ship.primaryRole;
		let shipBounty = this.ship.bounty;
		let shipPos = this.ship.position;
		let MRP01 = 0;
		let criminalCrew = 0;
		let pirateCrew = 0;

		if(worldScripts["MRP01_ressource_spawn"])  // Montanas Ressource Pack 01 OXP
		{
			MRP01 = 1;
		};
		
		if(shipBounty > 7 && shipBounty < 15)
		{
			criminalCrew = 1;
		};

		if(shipBounty > 14 || this.ship.isPirate)
		{
			pirateCrew = 1;
		};

		// if Montanas Ressource Pack 01 OXP is installed the containers from there are used, otherwise let the core-game handle it
		// exception: The Aliiance ship is using individual cargopods and is addressed separately
		if(MRP01 == 1 && this.ship.cargoSpaceUsed > 0 && shipRole != "alien_trader")
		{
			for(let i = this.ship.cargoList.length - 1 ; i >= 0 ; --i)
			{
				let cargoType = this.ship.cargoList[i].commodity;
				let cargoPod = ("MRP01_container_" + cargoType);
				let cargoCount = this.ship.cargoList[i].quantity;
				
				system.addShips(cargoPod, cargoCount, shipPos);
			};
		};

		switch(shipRole) 
		{
			case "trader":
			case "sunskim-trader":

				if(criminalCrew == 1)
				{
					system.addShips("adck_wyvern_explorer_escape_pod_std_criminal", diceRoll(1, 2), shipPos);
				}
				else if(pirateCrew == 1)
				{
					system.addShips("adck_wyvern_explorer_escape_pod_std_pirate", diceRoll(1, 2), shipPos);
				}
				else
				{
					system.addShips("adck_wyvern_explorer_escape_pod_std_trader", diceRoll(1, 2), shipPos);
				};
			
				if(MRP01 == 1 && diceRoll(1, 10) > 8)
				{
					system.addShips("MRP01_container_cash", diceRoll(1, 2), shipPos);
				};
				break;

			case "scavenger":
			case "miner":
				
				if(criminalCrew == 1)
				{
					system.addShips("adck_wyvern_explorer_escape_pod_std_criminal", 1, shipPos);
				}
				else if(pirateCrew == 1)
				{
					system.addShips("adck_wyvern_explorer_escape_pod_std_pirate", 1, shipPos);
				}
				else
				{
					system.addShips("adck_wyvern_explorer_escape_pod_std", 1, shipPos);
				};
				break;
			
			case "hunter":
			case "hunter-medium":

				if(criminalCrew == 1)
				{
					system.addShips("adck_wyvern_explorer_escape_pod_std_criminal", diceRoll(1, 2), shipPos);
				}
				else if(pirateCrew == 1)
				{
					system.addShips("adck_wyvern_explorer_escape_pod_std_pirate", diceRoll(1, 2), shipPos);
				}
				else
				{
					system.addShips("adck_wyvern_explorer_escape_pod_std", diceRoll(1, 2), shipPos);
				};
			
				if(MRP01 == 1 && diceRoll(1, 10) > 8)
				{
					system.addShips("MRP01_container_cash", diceRoll(1, 2), shipPos);
					system.addShips("MRP01_container_prisoners", diceRoll(1, 2), shipPos)
				};
				break;
				
			case "pirate-light-freighter":

				system.addShips("adck_wyvern_explorer_escape_pod_std_pirate", diceRoll(1, 2), shipPos);
				
				if(MRP01 == 1 && diceRoll(1, 10) > 9)
				{
					system.addShips("MRP01_container_cash", diceRoll(1, 2), shipPos);
				};
				break;

			case "pirate":
			case "pirate-medium-fighter":
					
				system.addShips("adck_wyvern_explorer_escape_pod_std_pirate", diceRoll(1, 2), shipPos);
				break;
			
			case "alien_trader":

				if(criminalCrew == 1 || pirateCrew == 1)
				{
					system.addShips("adck_wyvern_explorer_escape_pod_alliance_criminal", 1, shipPos);
				}
				else
				{
					system.addShips("adck_wyvern_explorer_escape_pod_alliance", 1, shipPos);
				};
			
				if(this.ship.cargoSpaceUsed > 0)
				{
					for(let i = this.ship.cargoList.length - 1 ; i >= 0 ; --i)
					{
						let cargoType = this.ship.cargoList[i].commodity;
						let cargoPod = ("adck_wyvern_explorer_alliance_container_" + cargoType);
						let cargoCount = this.ship.cargoList[i].quantity;
						
						system.addShips(cargoPod, cargoCount, shipPos);
					};
				};
				break;	
	
			default:
				
				if(criminalCrew == 1)
    			{
					system.addShips("adck_wyvern_explorer_escape_pod_std_criminal", diceRoll(1, 2), shipPos);
				}
				else if(pirateCrew == 1)
    			{
					system.addShips("adck_wyvern_explorer_escape_pod_std_pirate", diceRoll(1, 2), shipPos);
				}
				else
    			{
					system.addShips("adck_wyvern_explorer_escape_pod_std", diceRoll(1, 2), shipPos);
				};
				break;	
		};
	};

	if(this.ship.script.$adck_wyvern_explorer_shipDied_old)
	{
		this.ship.script.$adck_wyvern_explorer_shipDied_old(whom, why);
	};
};

this.$adck_wyvern_explorer_scavenger_cargo = function()
{
	const scavenger_cargo_array = ["alloys", "gold", "platinum", "computers", "machinery", "slaves"];

	// Montanas Ressource Pack 01 OXP
	if(worldScripts["MRP01_ressource_spawn"] && scavenger_cargo_array.indexOf("quirium_crystal") < 0)
	{
		scavenger_cargo_array.push("quirium_crystal");
	};
	
	let scavenger_cargo = 
	scavenger_cargo_array[Math.floor(Math.random() * scavenger_cargo_array.length)];
		
	return (scavenger_cargo);
};

this.$adck_wyvern_explorer_miner_cargo = function()
{
	const miner_cargo_array = ["radioactives", "minerals", "gold", "platinum", "gem_stones"];
	
	let miner_cargo = 
	miner_cargo_array[Math.floor(Math.random() * miner_cargo_array.length)];
		
	return (miner_cargo);
};

// food, medicine, booze and guns, what else you need for your trip ? :P
this.$adck_wyvern_explorer_space_jockey_cargo = function()
{
	const space_jockey_cargo_array = ["firearms", "food", "liquor_wines"];

	 // Darkside Moonshine Distillery OXP
	if(worldScripts["witchfire-populator"] && space_jockey_cargo_array.indexOf("witchfire_whiskey") < 0)
	{
		space_jockey_cargo_array.push("witchfire_whiskey");
	};
	
	// medicine is part of several OXP's therefore a check of the market is required
	if(system.mainStation)
	{
		let goods = system.mainStation.market;
		for(let i in goods) 
		{
			if(goods[i].key == ["medicine"] && space_jockey_cargo_array.indexOf("medicine") < 0)
			{
				space_jockey_cargo_array.push("medicine");
			};
		};
	}; 

	let space_jockey_cargo = 
	space_jockey_cargo_array[Math.floor(Math.random() * space_jockey_cargo_array.length)];

	return (space_jockey_cargo);
};

this.$adck_wyvern_explorer_alien_cargo = function()
{
	const alien_cargo_array = ["machinery", "computers", "alien_items"];
	
	let alien_cargo = 
	alien_cargo_array[Math.floor(Math.random() * alien_cargo_array.length)];
		
	return (alien_cargo);
};

this.$getRndInteger = function(min, max)
{
	return (Math.floor(Math.random() * (max - min + 1) ) + min);
};
Scripts/adck_wyvern_explorer_particle_accelerator_conditions.js
this.name			= "adck_wyvern_explorer_particle_accelerator_conditions";
this.author			= "Montana05";
this.description	= "conditions for the handling of the Linear Particle Accelerator";
this.version		= "2.01";
this.copyright		= "2022 Montana05";
this.licence   		= "CC BY-NC-SA 4.0";
"use strict";

this.allowAwardEquipment = function(equipment, ship, context)
{
	// remainder from oolite-conditions.js:

	// OXP hook to allow stations to forbid specific equipment
	if(context == "purchase" && player.ship.dockedStation && player.ship.dockedStation.scriptInfo["oolite-barred-equipment"])
	{
		if (player.ship.dockedStation.scriptInfo["oolite-barred-equipment"].indexOf(equipment) != -1)
		{
			return false;
		};
	};

	// OXP hook to allow ships to forbid specific "available to all" equipment
	if(ship.scriptInfo && ship.scriptInfo["oolite-barred-equipment"] && ship.scriptInfo["oolite-barred-equipment"].indexOf(equipment) != -1)
	{
		return false;
	};
	
	// for compatibility with Laser Mount Switching System (LMSS)
	var lmss = worldScripts.LMSS_Core;

	if(lmss && lmss._switching == true) 
	{
		return true;
	};
	
	// otherwise permitted
	return true;
};	


Scripts/adck_wyvern_explorer_subent.js
this.name			= "adck_wyvern_explorer_subent";
this.author			= "Montana05";
this.description	= "handling of subentities for the Wyvern Explorer";
this.version		= "2.01";
this.copyright		= "2022 Montana05";
this.licence   		= "CC BY-NC-SA 4.0";
"use strict";

this.shipDied = function () 
{ 
    this.ship.owner.commsMessage("Our engine got hit, drastic speed decrease !");
    this.ship.owner.maxSpeed = 20.00;  // only emergency drive left
};