Back to Index Page generated: Dec 20, 2024, 7:22:10 AM

Expansion Gecko 'Dragon Class'

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 A Gecko heavy fighter based on the technology of a wrecked Green Gecko from the Green Knights of Lago. Warning, this ship is significant stronger than most core-ships. For more details please check the wiki page. A Gecko heavy fighter based on the technology of a wrecked Green Gecko from the Green Knights of Lago. Warning, this ship is significant stronger than most core-ships. For more details please check the wiki page.
Identifier oolite.oxp.zzz.Montana05.BUS_gecko_dragon oolite.oxp.zzz.Montana05.BUS_gecko_dragon
Title Gecko 'Dragon Class' Gecko 'Dragon Class'
Category Ships Ships
Author Montana05 Montana05
Version 0.52 0.52
Tags ships ships
Required Oolite Version
Maximum Oolite Version
Required Expansions
  • oolite.oxp.zzz.Montana05.resource_pack_01:0.53
  • oolite.oxp.zzz.Montana05.resource_pack_01:0.53
  • Optional Expansions
    Conflict Expansions
    Information URL n/a
    Download URL https://wiki.alioth.net/img_auth.php/3/36/Oolite.oxp.zzz.Montana05.BUS_gecko_dragon.OXZ n/a
    License CC BY-NC-SA 4.0 CC BY-NC-SA 4.0
    File Size n/a
    Upload date 1638498197

    Documentation

    Also read http://wiki.alioth.net/index.php/Gecko%20'Dragon%20Class'

    read_me.txt

    Overview
    ========
    
    A Gecko heavy fighter based on the technology of a wrecked Green Gecko. While not as advanced as the original 
    this ship could be a fearsome combatant. By copying some of the hi-tech from Avernus Orbital the design 
    includes 4 front laser mounts, an additional pylon, increased speed, more energy banks, and a higher reload rate. 
    On the downside, no hyperdrive, Shield Boosters or Military Shield Enhancement could be assigned and the maintenance 
    costs are 10% higher. While primarily used as a single-pilot combat craft, the cockpit supports a co-pilot as well. 
    
    Credits
    =======
    
    The Gecko "Dragon Class" is inspired by the Green Gecko and the Renegade Gecko, thanks a lot to Cody and LittleBear.
    
    Cody (basic concept)
    LittleBear (additional ideas from the Renegade Gecko (Renegade Pirates OXP)
    Griff (ship model, gun model, and basic textures)
    another_commander (specular maps)
    phkb (basic diffuse map for the Bounty Hunter Guild variant)
    Cholmondely (reported a model error) 
    
    Remarks
    =======
    
    While available to the player please keep in mind that you have only 3 t cargo capacity and no hyperdrive, flying this craft 
    could be a challenge.
    
    If you are using New lasers OXP some lasers will be replaced.
    
    Warning
    =======
    
    This ship/ships belong to the category Ubership, I recommend installing Multiple Lasers as well to level the field. 
    
    Requirements
    ============
    
    Montanas Resource Pack 01 is required. It could be found on the Expansions Manager.
    
    Details
    =======
    
    For additional details please check the wiki-page: http://wiki.alioth.net/index.php/Gecko_Dragon_Class
    
    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
    corrected a texture in a model (thanks to Cholmondely for reporting the bug)
    optimized the emission maps
    added another ship (Bounty Hunter Guild, based on a diffuse map from phkb)
    enhanced ship script
    downgraded some equipped weapons and reduced the chances to appear in the game
    
    V 0.52
    small tweaks to adjust better with other OXP's
    

    Equipment

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

    Ships

    Name
    Gecko 'Dragon Class'
    Gecko 'Dragon Class'
    BUS_gecko_dragon_escape_capsule
    BUS_gecko_dragon_escape_capsule_bhg
    BUS_gecko_dragon_escape_capsule_bhg_pirate
    BUS_gecko_dragon_escape_capsule_pirate
    BUS_gecko_dragon_escape_capsule_ssg
    BUS_gecko_dragon_escape_capsule_ssg_pirate
    Gecko Dragon Class Gun
    BUS_gecko_dragon_gun_02
    BUS_gecko_dragon_gun_03
    BUS_gecko_dragon_gun_04
    BUS_gecko_dragon_hunt_01
    BHG Gecko 'Dragon Class'
    BUS_gecko_dragon_hunt_02_team_01
    BUS_gecko_dragon_pirate_01
    BUS_gecko_dragon_pirate_02
    BUS_gecko_dragon_player_01
    BUS_gecko_dragon_player_02
    BUS_gecko_dragon_player_gun
    SSG Gecko 'Dragon Class'
    BUS_gecko_dragon_ssg_team_01

    Models

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

    Scripts

    Path
    Scripts/BUS_gecko_dragon_gun.js
    this.name			= "BUS_gecko_dragon_gun";
    this.author			= "Montana05";
    this.description	= "check and possible replace Gecko 'Dragon Class' external laser";
    this.version		= "0.52";
    this.copyright		= "2021 Montana05";
    this.licence   		= "CC BY-NC-SA 4.0";
    "use strict";
    
    	// replaces weapons if "new lasers OXP" is available
    	if(worldScripts["new_lasers"])
    	{
    		if(this.ship.forwardWeapon != EquipmentInfo.infoForKey("EQ_WEAPON_ASSAULT_LASER"))
    		{
    			this.ship.forwardWeapon = "EQ_WEAPON_ASSAULT_LASER";  // ColtMaster CM4
    			//log(this.name, "New Lasers OXP available, " + this.ship.name + " switched external weapon to: ColtMaster CM4 Assault Laser");
    		}
    	};
    
    Scripts/BUS_gecko_dragon_ship_script.js
    this.name			= "BUS_gecko_dragon_ship_script";
    this.author			= "Montana05";
    this.description	= "ship script for Gecko 'Dragon Class'";
    this.version		= "0.52";
    this.copyright		= "2021 Montana05";
    this.licence   		= "CC BY-NC-SA 4.0";
    "use strict";
    
    this.shipSpawned = function(ship)
    {
    	this.$BUSgdc_shipType = this.ship.dataKey;
    	var shipRole = this.ship.primaryRole;
    	
    	if(this.ship.hasRole("escape-capsule"))
    	{
    		// neutral inits first
    		var crewName = expandDescription("[nom]");
    		var crewDescription = "a crew member of an evacuated ship";
    		var crewRole = "hunter";  // not perfect but somewhere in the middle
    		var crewRank = "Commander";
    		var bhgRank = "Hunter";  // middle rank
    		var crewRace = expandDescription("[MRP01_GalCop_races_scientific]");  // add a race to the crew members
    		var crewBounty = 0;
    		var crewInsurance = 0;
    		
    		this.$BUSgdc_crew_ranks_array = ["Gunner", "Co-Pilot", "Pilot", "Commander"];  // based on an crew of 1 to 2 person
    		crewRank = 
    		$BUSgdc_crew_ranks_array[Math.floor(Math.random() * $BUSgdc_crew_ranks_array.length)];
    
    		// ranks for Bounty Hunter Guild taken from Random Hits OXP, all credits to LittleBear
    		this.$BUSgdc_bhg_ranks_array = 
    		["Outsider", "Recruit", "Vigilante", "Bailiff", "Deputy", "Tracker", "Hunter", "Sheriff", "Provost", "Marshal", "Enforcer", "Executioner", "Judge"];
    		bhgRank = 
    		$BUSgdc_bhg_ranks_array[Math.floor(Math.random() * $BUSgdc_bhg_ranks_array.length)];
    
    		switch(this.$BUSgdc_shipType) 
    		{
    			case "BUS_gecko_dragon_escape_capsule":
    
    				crewName = ("the " + crewRace + " " + crewRank + " " + expandDescription("[nom]"));
    				crewDescription = "a ship crew member";
    				crewInsurance = this.$getRndInteger(90, 450);
    				crewRole = "hunter";
    				break;
    
    			case "BUS_gecko_dragon_escape_capsule_bhg":
    
    				crewName = ("the " + crewRace + " " + bhgRank + " " + expandDescription("[nom]"));
    				crewDescription = "a member of the Bounty Hunter Guild";
    				crewInsurance = (this.$getRndInteger(90, 450) * 1.10);  // BHG got better insurance conditions
    				crewRole = "hunter";
    				break;
    
    			case "BUS_gecko_dragon_escape_capsule_ssg":	
    		
    				crewName = ("the " + crewRace + " " + crewRank + " " + expandDescription("[nom]"));
    				crewDescription = "a SSG ship crew member";
    				crewInsurance = (this.$getRndInteger(90, 450) * 1.25);  // SSG got better insurance conditions
    				crewRole = "hunter";
    				break;
    			
    			case "BUS_gecko_dragon_escape_capsule_bhg_pirate":
    				
    				crewName = ("the " + crewRace + " " + bhgRank + " " + expandDescription("[nom]"));
    				crewDescription = "a rouge member of the Bounty Hunter Guild";
    				crewBounty = (this.$getRndInteger(90, 450) * 1.10) + (15 * system.government);  // stable governments pay extra bonus
    				crewRole = "hunter";
    				break;
    			
    			case "BUS_gecko_dragon_escape_capsule_ssg_pirate":
    				
    				crewName = ("the " + crewRace + " " + crewRank + " " + expandDescription("[nom]"));
    				crewDescription = "a rouge SSG ship crew member";
    				crewBounty = (this.$getRndInteger(90, 450) * 1.25) + (15 * system.government);  // stable governments pay extra bonus
    				crewRole = "hunter";
    				break;
    									
    			case "BUS_gecko_dragon_escape_capsule_pirate":
    
    				crewName = ("the " + crewRace + " " + expandDescription("[MRP01_pirate_nicknames]") + expandDescription("[nom]"));
    				crewDescription = "a criminal wanted by GalCop police";
    				crewRole = "pirate";
    				crewBounty = this.$getRndInteger(90, 450) + (15 * system.government);  // stable governments pay extra bonus
    				break;	
    				
    			default: 
    				break;		
    		};
    
    		this.ship.setCrew
    		(
    			{
    				name: crewName,
    				short_description: crewDescription,
    				role: crewRole,
    				species: crewRace,
    				insurance: crewInsurance,
    				bounty: crewBounty
    			}
    		);
    
    		// remove individual roles
    		this.ship.primaryRole = "escape-capsule";
    	}
    	else
    	{
    		// individual role of the ship, will only be called from other OXP's 
    		switch(shipRole) 
    		{
    			case "BUS_gecko_dragon_01":
    			case "BUS_gecko_dragon_02":
    			case "BUS_gecko_dragon_ssg":
    			
    				this.ship.primaryRole = "escort-heavy";
    				break;
    				
    			case "BUS_gecko_dragon_hunt_01":
    			case "BUS_gecko_dragon_hunt_02":
    			case "BUS_gecko_dragon_hunt_02_team_01":
    			case "BUS_gecko_dragon_ssg_team_01":
    				
    				this.ship.switchAI("oolite-bountyHunterAI.js");
    				this.ship.primaryRole = "hunter";
    				break;
    
    			case "BUS_gecko_dragon_pirate_01":
    			case "BUS_gecko_dragon_pirate_02":
    				
    				this.ship.primaryRole = "pirate";
    				break;
    			
    			default: 
    				break;		
    		};		
    		
    		switch(this.$BUSgdc_shipType) 
    		{
    			case "BUS_gecko_dragon_01":
    			case "BUS_gecko_dragon_02":
    			case "BUS_gecko_dragon_hunt_01":
    			case "BUS_gecko_dragon_hunt_02":
    			case "BUS_gecko_dragon_ssg":
    			case "BUS_gecko_dragon_hunt_02_team_01":
    			case "BUS_gecko_dragon_ssg_team_01":
    						
    				if(this.ship.cargoSpaceUsed <= 1)
    				{
    					this.ship.adjustCargo(this.$BUSgdc_space_jockeyCargo(), 1);
    					this.ship.adjustCargo(this.$BUSgdc_space_jockeyCargo(), 1);
    				};
    				break;
    
    			case "BUS_gecko_dragon_pirate_01":
    			case "BUS_gecko_dragon_pirate_02":
    				
    				this.ship.setCargoType("PLENTIFUL_GOODS");
    				break;		
    
    			default: 
    				break;		
    		};	
    	};
    };
    
    this.shipDied = function(whom, why)
    {
    	if(this.ship.hasRole("escape-capsule"))
    	{
    		return;
    	}
    	else
    	{
    		// neutral inits first
    		var podType = "escape-capsule";
    		var criminalCrew = 0;
    		var debrisCount = 0;
    		var cargoType = "";
    		var cargoPod = "cargopod";
    		var cargoLoad = this.ship.cargoSpaceUsed;
    		var cargoCount = 0;
    				
    		if(this.ship.bounty > 7 || 
    		   this.$BUSgdc_shipType == "BUS_gecko_dragon_pirate_01" || 
    		   this.$BUSgdc_shipType == "BUS_gecko_dragon_pirate_02")
    				criminalCrew = 1;
    		
    		switch(this.$BUSgdc_shipType) 
    		{
    			case "BUS_gecko_dragon_01":
    			case "BUS_gecko_dragon_02":
    			case "BUS_gecko_dragon_hunt_01":	
    			
    				if(criminalCrew == 1)
    					podType = "BUS_gecko_dragon_escape_capsule_pirate";	
    				else
    				{
    					podType = "BUS_gecko_dragon_escape_capsule";
    				};
    
    				break;
    
    			case "BUS_gecko_dragon_hunt_02":
    			case "BUS_gecko_dragon_hunt_02_team_01":
    						
    				if(criminalCrew == 1)
    					podType = "BUS_gecko_dragon_escape_capsule_bhg_pirate";	
    				else
    				{
    					podType = "BUS_gecko_dragon_escape_capsule_bhg";
    				};
    
    				break;
    
    			case "BUS_gecko_dragon_ssg":
    			case "BUS_gecko_dragon_ssg_team_01":
    						
    				if(criminalCrew == 1)
    					podType = "BUS_gecko_dragon_escape_capsule_ssg_pirate";	
    				else
    				{
    					podType = "BUS_gecko_dragon_escape_capsule_ssg";
    				};
    
    				break;
    
    			case "BUS_gecko_dragon_pirate_01":
    			case "BUS_gecko_dragon_pirate_02":	
    				
    				podType = "BUS_gecko_dragon_escape_capsule_pirate";
    				break;
    
    			default: 
    				break;	
    		};	
    		
    		// emergency crafts
    		system.addShips(podType, 1, this.ship.position);
    
    		// cargopods
    		if(cargoLoad > 0)
    		{
    			for(var i = this.ship.cargoList.length - 1 ; i >= 0 ; --i)
    			{
    				cargoType = this.ship.cargoList[i].commodity;
    				cargoPod = ("MRP01_container_" + cargoType);
    				cargoCount = this.ship.cargoList[i].quantity;
    							
    				system.addShips(cargoPod, cargoCount, this.ship.position);
    			};
    		};
    		
    		/*
    		// outsourced to Montanas Ressource Pack 01 V 0.54
    
    		debrisCount = this.$getRndInteger(3, 6);
    		// explosive shrapnels
    		system.addShips("MRP01_effects_explosive_shrapnel", debrisCount, this.ship.position);
    		// various depris
    		system.addShips("MRP01_ship_debris", debrisCount, this.ship.position);
    		// burning fuel
    		debrisCount = (this.ship.fuel.toFixed(0));	
    		system.addShips("MRP01_effects_burningFuel", debrisCount, this.ship.position);
    		*/
    	};
    };
    
    // food, booze and guns, what else you need for your trip ? :P
    this.$BUSgdc_space_jockeyCargo = function()
    {
    	this.$BUSgdc_space_jockey_cargo_array = ["firearms", "food", "liquor_wines"];
    
    	if(worldScripts["witchfire-populator"])  // Darkside Moonshine Distillery OXP
    		this.$BUSgdc_space_jockey_cargo_array.push("witchfire_whiskey");
    
    	var space_jockey_cargo = 
    	$BUSgdc_space_jockey_cargo_array[Math.floor(Math.random() * $BUSgdc_space_jockey_cargo_array.length)];
    
    	return (space_jockey_cargo);
    };
    
    this.$getRndInteger = function(min, max)
    {
    	return Math.floor(Math.random() * (max - min + 1) ) + min;
    };