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

Expansion Montanas Resource Pack 01

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description While mainly designed to support other OXP's a stand-alone download is adding Griff's alloy and the new commodity Quirium Crystal While mainly designed to support other OXP's a stand-alone download is adding Griff's alloy and the new commodity Quirium Crystal
Identifier oolite.oxp.zzz.Montana05.resource_pack_01 oolite.oxp.zzz.Montana05.resource_pack_01
Title Montanas Resource Pack 01 Montanas Resource Pack 01
Category Miscellaneous Miscellaneous
Author Montana05 Montana05
Version 0.53 0.53
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL http://aegidian.org/bb/viewtopic.php?f=4&p=272527#p272527 n/a
Download URL https://wiki.alioth.net/img_auth.php/4/43/Oolite.oxp.zzz.Montana05.resource_pack_01.OXZ n/a
License CC BY-NC-SA 4.0 CC BY-NC-SA 4.0
File Size n/a
Upload date 1613196993

Documentation

Also read http://wiki.alioth.net/index.php/Montanas%20Resource%20Pack%2001

read_me.txt

Overview
========

Instead of adding to every OXP the same resources I created an external package that could be referenced to. While saving
disc space it also makes future maintenance easier. While mainly designed to support other OXP's a stand-alone download
is adding Griff's alloy and the new commodity "Quirium Crystal". 

Currently, the package contains:


Effects
=======

Explosive shrapnels and burning quirium fuel are making ship explosions more realistic but in close range also more dangerous.
They could be spawned with the roles MRP01_effects_explosive_shrapnel and MRP01_effects_burningFuel. The burning quirium fuel 
once in a while leaves radioactives or a quirium crystal behind after the explosion.


Commodities
===========

Adds Griff's awesome alloy variants.
 
Similar to alloy radioactives (role: radioactives), platinum (role: platinum) and gold (role: gold) are now added 
as an entity rather than only in a container. Gold and platinum include the role splinter(0.10) so both could be the
result of mining as well.

Minerals, now an entity as well, have the roles minerals or splinter. While the display names are "Minerals" and "Ore" 
they are basically just variations of splinters.

Introduces the new commodity "Quirium Crystal", a rare crystal with 5-dimensional emission. While traded
similar to gem stones in g they do also appear in the corona of some suns and at ship explosions as
an entity (role: quirium_crystal).


Containers
==========

Adds for all commodities of the core-game a cargopod (roles: cargopod_ & commodity name, cargopod_platinum, for example).
Goods in kg got 10 - 20 units per container, goods in g got 20 - 40 units. Additional to the core-game commodities only
witchfire whiskey (Darkside Moonshine Distillery), holy artifacts (Dictators) and quirium crystal (this pack) are
covered, all other OXP goods are not included.


Escape Pods
===========

Various modified versions of escape crafts are included:

Isis Space Boat (defined as a lifeboat and a shuttle, police version included as well). 

Roles: 
MRP01_escape_boat_isis_01 
MRP01_escape_boat_isis_police

Medical craft (defined as a lifeboat and a shuttle). 

Role: MRP01_escape_boat_isis_med

GalTech Escape Pod GIC-E1 and Griff's escape capsule
both designed as a pod and as a capsule. police versions available.

Roles:
GalTech_escape_pod_E1_01
GalTech_escape_pod_E1_police
GalTech_escape_capsule_01
GalTech_escape_capsule_police
MRP01_escape_pod_std_01
MRP01_escape_pod_std_police
MRP01_escape_capsule_std_01
MRP01_escape_capsule_std_police

Please note that with the next release all crafts starting with GalTech will be changed

spacesuits as the last resource for a crew member

Roles:
MRP01_escape_suit_01
MRP01_escape_suit_police


Developers little help
======================

descriptions.plist:

MRP01_pirate_nicknames (an array of nicknames for pirates and other criminals)
MRP01_GalCop_races_oolite (an array of expanded races of GalCop space, Oolite style)
MRP01_GalCop_races_scientific (an array of expanded races of GalCop space, scientific style)

An expansion of core library categories and summaries:

"oolite-ship-library-category-alien_ship" = "Alien Ship" (ships from outer GalCop space)
"oolite-ship-library-category-warship" = "Warship" (military ships)

summeries for warships:
"oolite-ship-library-summary-MLP"	= "Military light patrol ship";
"oolite-ship-library-summary-MMP"	= "Military medium patrol ship"
"oolite-ship-library-summary-MHP"	= "Military heavy patrol ship"
"oolite-ship-library-summary-MLA"	= "Military light attack ship"
"oolite-ship-library-summary-MMA"	= "Military medium attack ship"
"oolite-ship-library-summary-MHA"	= "Military heavy attack ship"
"oolite-ship-library-summary-MLC"	= "Military light corvette"
"oolite-ship-library-summary-MMC"	= "Military medium corvette"
"oolite-ship-library-summary-MHC"	= "Military heavy corvette"
"oolite-ship-library-summary-MLFr"	= "Military light frigate"
"oolite-ship-library-summary-MMFr"	= "Military medium frigate"
"oolite-ship-library-summary-MHFr"	= "Military heavy frigate"
"oolite-ship-library-summary-MLD"	= "Military light destroyer"
"oolite-ship-library-summary-MMD"	= "Military medium destroyer"
"oolite-ship-library-summary-MHD"	= "Military heavy destroyer"
"oolite-ship-library-summary-MLCr"	= "Military light cruiser"
"oolite-ship-library-summary-MMCr"	= "Military medium cruiser"
"oolite-ship-library-summary-MHCr"	= "Military heavy cruiser"
"oolite-ship-library-summary-MLB"	= "Military light battleship"
"oolite-ship-library-summary-MMB"	= "Military medium battleship"
"oolite-ship-library-summary-MHB"	= "Military heavy battleship"

additional summeries for police ships: 
"oolite-ship-library-summary-PMF"	= "Police medium fighter"
"oolite-ship-library-summary-PLP"	= "Police light patrol ship"
"oolite-ship-library-summary-PMP"	= "Police medium patrol ship"
"oolite-ship-library-summary-PHP"	= "Police heavy patrol ship"
"oolite-ship-library-summary-PLA"	= "Police light attack ship"
"oolite-ship-library-summary-PMA"	= "Police medium attack ship"
"oolite-ship-library-summary-PHA"	= "Police heavy attack ship"
"oolite-ship-library-summary-PLC"	= "Police light corvette"
"oolite-ship-library-summary-PMC"	= "Police medium corvette"
"oolite-ship-library-summary-PHC"	= "Police heavy corvette"
"oolite-ship-library-summary-PLFr"	= "Police light frigate"
"oolite-ship-library-summary-PMFr"	= "Police medium frigate"
"oolite-ship-library-summary-PHFr"	= "Police heavy frigate"


Credits
=======

explosive shrapnels: Charlie (concept) and Griff (model, textures & shaders)
burning quirium fuel: Thargoid (concept) and Griff (model)
alloy: Griff (model, textures & shaders)
minerals: Griff (model)
containers: another_commander (specular map)
lifeboats: Killer Wolf
escape pods: Shipbuilder and Griff
escape capsules: Shipbuilder and Griff
spacesuit: Norby (concept in Fighters OXP) and Knotty (Astronaut OXP)


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 0.50:
initial release

V 0.51:
Added gold and platinum as an entity (roles: gold and platinum).

Added minerals as an entity - roles minerals or splinter (showing up as "Minerals" and "Ore" and basically just variations of splinters).

New role "GalTech_ship_debris" which is useful for a ship explosion, includes alloy, radioactives (10%), gold (10%) and platinum (10%).

Added "GalTech escape capsule GT-EC-01", a downgraded version of the GalTech Escape Pod GIC-E1, designed for smaller ships
(roles: GalTech_escape_capsule_01 and GalTech_escape_capsule_police).

Included a spacesuit for ejected pilots of fighters or as the last resource for crew members to escape destruction
(roles: MRP01_escape_suit_01 and MRP01_escape_suit_police). Warning: Difficult to scope.

Added an array of nicknames for pirates and other criminals to descriptions.plist (MRP01_pirate_nicknames).

Added an array of expanded races of GalCop space to descriptions.plist (MRP01_GalCop_races_oolite).

V 0.52:
some more entries to the shiplibrary.plist
emergency update of script-info properties to prevent conflicts with N-Shield.OXP

V 0.53:
Beginning of refactor of the code resulting in most key definitions to change
Added Griffs escape capsules as pod and capsule
Added Isis Interstellar lifeboats / space boats
Added role splinter(0.10) to gold and platinum
Included an expansion of core shiplibrary categories and summaries
Included another array of expanded races of GalCop space, this one more scientific (MRP01_GalCop_races_scientific).

Equipment

This expansion declares no equipment.

Ships

Name
GalTech_container_computers
GalTech escape capsule GT-EC-01
GalTech_escape_capsule_police
GalTech Escape Pod GIC-E1
GalTech Escape Pod GIC-E1
GalTech_escape_suit_01
GalTech_escape_suit_police
Metal fragment
MRP01_commodities_alloy_02
MRP01_commodities_alloy_03
MRP01_commodities_alloy_04
MRP01_commodities_alloy_05
MRP01_commodities_alloy_06
Gold
Minerals
Minerals
Minerals
Ore
Ore
Ore
Platinum
Quirium Crystal
Radioactives
MRP01_container_alien_items
MRP01_container_alloys
MRP01_container_cash
MRP01_container_computers
MRP01_container_firearms
Cargo container
MRP01_container_furs
MRP01_container_gem_stones
Vault container
MRP01_container_holy_artifacts
MRP01_container_liquor_wines
MRP01_container_luxuries
MRP01_container_machinery
MRP01_container_minerals
MRP01_container_narcotics
MRP01_container_platinum
MRP01_container_prisoners
MRP01_container_quirium_crystal
MRP01_container_radioactives
Detention container
MRP01_container_textiles
MRP01_container_witchfire_whiskey
Burning Quirium Fuel
MRP01_effects_burningFuel_02
Explosive Shrapnel
Isis Space Boat
Isis Medical Craft
GalCop Isis Space Boat
escape capsule
escape capsule
escape capsule
escape pod
escape pod
escape pod
a crew member in a spacesuit
a police officer in a spacesuit
a SSG member in a spacesuit
Isis Space Boat
Isis Medical Craft
GalCop Isis Space Boat
MRP01_space_boat_isis_police_team_01

Models

This expansion declares no models.

Scripts

Path
Scripts/MRP01_ressource_01.js
this.name			= "MRP01_ressource_01";
this.author			= "Montana05";
this.description	= "event handler for various ressources";
this.version		= "0.53";
this.copyright		= "2021 Montana05";
this.licence   		= "CC BY-NC-SA 4.0";
"use strict";

this.shipDied = function(whom, why)
{
	var shipType = this.ship.dataKey;
	var dice = (Math.random() * 100).toFixed(0);
	var debris = "MRP01_commodities_alloy";
	
	switch(shipType) 
	{
		case "MRP01_effects_burningFuel_01":
		case "MRP01_effects_burningFuel_02":	

			if(dice >= 95)
				debris = "MRP01_commodities_radioactives";

			if(dice >= 98)
				debris = "MRP01_commodities_quirium_crystal";	
			break;
		
		case "MRP01_effects_explosive_shrapnel":

			if(dice >= 95)
				debris = "MRP01_commodities_alloy";
			break;
		
		default: 
			break;	
	};

	if(dice >= 95)
		system.addShips(debris, 1, this.ship.position);
};	
Scripts/MRP01_ressource_02.js
this.name			= "MRP01_ressource_02";
this.author			= "Montana05";
this.description	= "adjusts containers";
this.version		= "0.53";
this.copyright		= "2021 Montana05";
this.licence   		= "CC BY-NC-SA 4.0";
"use strict";

this.shipSpawned = function(ship)
{
	this.$MRP01_shipType = this.ship.dataKey;
	var cargoType = this.ship.commodity;

	// Cargo Scanner OXP
	if(worldScripts["Cargo Scanner"] && player.ship.equipmentStatus("EQ_CARGO_SCANNER") === "EQUIPMENT_OK")
		var scanSwitch = true;

	// standard primary roles
	if(this.$MRP01_shipType.indexOf("MRP01_container") != -1)
		this.ship.primaryRole = "cargopod";

	if(this.$MRP01_shipType.indexOf("MRP01_commodities") != -1)
		this.ship.primaryRole = cargoType;
	
	// setup for Cargo Scanner OXP
	if(scanSwitch && this.$MRP01_shipType == "MRP01_container_cash")
		this.ship.shipUniqueName = "Credits";

	// adds some prisoners to detention containers (works like an escape capsule)
	if(this.$MRP01_shipType == "MRP01_container_prisoners")
	{
		if(scanSwitch)
    		this.ship.shipUniqueName = "Prisoners";
		 
		var prisonerNumber = this.$getRndInteger(2, 6);
		var prisonerLabel = "a group of " + prisonerNumber + " prisoners";
		var bounty = prisonerNumber * (this.$getRndInteger(70, 90) * (0.50 + system.government / 10)).toFixed(0);
		
		this.ship.setCrew
		(
			{
				name: prisonerLabel,
				short_description: "wanted by GalCop police",
				role: "pirate",
				species: "",
				bounty: bounty
			}
		);
	};

	switch(cargoType) 
	{
		case "gold":
		case "platinum":
		case "holy_artifacts":	

			// sets container load to 10 - 20 kg
			this.ship.setCargo(cargoType, this.$getRndInteger(10, 20));
			break;
		
		case "gem_stones":
		case "quirium_crystal":
		
			// sets container load to 20 - 40 g
			this.ship.setCargo(cargoType, this.$getRndInteger(20, 40));
			break;
		
		default: 
			break;
	};
};
	
this.shipWasScooped = function(scooper) 
{
	// adds between 200 and 2000 credits to the account (player only), modify the scooped message
	if(this.$MRP01_shipType == "MRP01_container_cash" && scooper.isPlayer) 
	{
		let cash = this.$getRndInteger(200, 2000);
		this.ship.shipUniqueName = cash + " Credits";
		player.credits += cash;
	};
};

this.$getRndInteger = function(min, max)
{
	return Math.floor(Math.random() * (max - min + 1) ) + min;
};
Scripts/MRP01_ressource_spawn.js
this.name			= "MRP01_ressource_spawn";
this.author			= "Montana05";
this.description	= "spawn conditions for various ressources";
this.version		= "0.53";
this.copyright		= "2021 Montana05";
this.licence   		= "CC BY-NC-SA 4.0";
"use strict";

this.shipWillExitWitchspace = function()
{
	// quirium_crystal (13 systems in all sectors)
	if(system.info.description.indexOf("deadly solar") != -1)
	{
		var corona = system.info.sun_radius * 3;
		system.addShips("MRP01_commodities_quirium_crystal", 50, system.sun.position, corona);
	};	
};

// adds, based on the ship mass, debris to destroyed ships (thanks a lot to phkb for using parts of his code)

this.shipSpawned = function(ship) 
{
	// feature could be switched of with scriptinfo in shipdata.plist
	var debrisSwitch = ship.scriptInfo.MRP01_Debris;
		
	if(ship.isPiloted == true &&
	   ship.isSubEntity == false &&
	   ship.isWeapon == false &&
	   ship.isCargo == false &&
	   ship.isRock == false &&
	   ship.primaryRole != "wreckage" &&
	   ship.scanClass != "CLASS_BUOY" &&
	   debrisSwitch != "no") 
	{
		// if there is an existing script in shipDied time to move it
		ship.script.$MRP01_shipDied_old = ship.script.shipDied;
		ship.script.shipDied = this.$MRP01_shipDied;
	};
};

this.$MRP01_shipDied = function(whom, why) 
{
	var shipMass = this.ship.mass;
	var dice = (Math.random() * 100).toFixed(0);
	
	if(this.ship.script.$MRP01_shipDied_old) this.ship.script.$MRP01_shipDied_old(whom, why);
	
	if(this.ship.isDerelict == false && why != "removed")
	{
		// calculated from the mass of a Cobra Mark III / 5
		// minimum 3 to maximum 20
		var debrisCount = ((shipMass/43000).toFixed(0));

		if(this.ship.mass <= 100000)
			debrisCount = 3;
		else	
		{
			if(debrisCount < 5)                                                    
				debrisCount = 5;

			if(debrisCount > 20)                                                    
				debrisCount = 20;
		};
		system.addShips("MRP01_ship_debris", debrisCount, this.ship.position);

		// adds sometimes vault containers with cash to larger ships
		if(shipMass > 200000 && this.ship.isPirateVictim && dice > 85)
		{
			debrisCount = Math.floor(Math.random() * (2 - 1 + 1) ) + 1;
			system.addShips("MRP01_container_cash", debrisCount, this.ship.position);
		};	
		
		// adds sometimes detention containers to larger police ships
		if(shipMass > 200000 && this.ship.isPolice && dice > 75)
		{
			debrisCount = Math.floor(Math.random() * (3 - 1 + 1) ) + 1;
			system.addShips("MRP01_container_prisoners", debrisCount, this.ship.position);	
		};	
	};
};
Scripts/MRP01_ships_spawn_conditions.js
this.name			= "MRP01_ships_spawn_conditions";
this.author			= "Montana05";
this.description	= "Conditions for the spawn of ships";
this.version		= "0.53";
this.copyright		= "2021 Montana05";
this.licence   		= "CC BY-NC-SA 4.0";
"use strict";

this.allowSpawnShip = function(shipKey) 
{
	if(system.isInterstellarSpace || system.sun.isGoingNova || system.sun.hasGoneNova || system.economy < 4)
	{
		return false;
	}
	else return true;
};