Back to Index Page generated: Dec 15, 2025, 5:16:51 AM

Expansion Colonial Viper Mark I Restore

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description a restore of the 'lost' Colonial Viper Mark I a restore of the 'lost' Colonial Viper Mark I
Identifier oolite.oxp.zzz.Montana05.GalTech_colonial_viper_mark_I_Restore oolite.oxp.zzz.Montana05.GalTech_colonial_viper_mark_I_Restore
Title Colonial Viper Mark I Restore Colonial Viper Mark I Restore
Category Ships Ships
Author Montana05 Montana05
Version 0.51 0.51
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
  • oolite.oxp.zzz.Montana05.resource_pack_01:0.51
  • oolite.oxp.zzz.Montana05.resource_pack_01:0.51
  • Optional Expansions
    Conflict Expansions
    Information URL http://aegidian.org/bb/viewtopic.php?p=272886#p272886 n/a
    Download URL https://wiki.alioth.net/img_auth.php/b/b3/Oolite.oxp.zzz.Montana05.GalTech_colonial_viper_mark_I_Restore.OXZ n/a
    License CC BY-NC-SA 4.0 CC BY-NC-SA 4.0
    File Size n/a
    Upload date 1764468794

    Documentation

    Also read http://wiki.alioth.net/index.php/Colonial%20Viper%20Mark%20I%20Restore

    read_me.txt

    History
    =======
    
    3 month ago Dybal and I decided to try to restore OXP's with unavailable download links. While we succeeded
    with most of the ships of GalTech until today we weren't able to find the original of the Colonial Viper Mark I.
    Therefore I decided to create a "Restore" which, based on the information's from the wiki, should be as close as
    possible to the original. However, similar to my "Fixes", it is based on the current Oolite release and does include
    some improvements.
    
    The wiki page of the original could be viewed here: http://wiki.alioth.net/index.php/Colonial_Viper_Mark_1
    
    Overview
    ========
    
    Shipbuilders Colonial Viper Mark I is based on the Colonial Viper of the original series of Battlestar Galactica.
    Further information's on the initial ship could be found at https://en.battlestarwikiclone.org/wiki/Viper_(TOS)
    
    Modifications
    =============
    
    Following the design of Battlestar Galactica I removed the hyperdrive but improved the single laser to 2x fore mounts.
    Please notice that, similar to Shipbuilders version, no missiles, cargo space, and fuel scoops are available.
    
    However, another variant exists, the Colonial Viper Mark I-S. This ship is equipped with a hyperdrive and fuel scoops
    but can't be upgraded with a Naval Energy Unit or a Military Shield Enhancement.
    
    A ship-script is handling the crew (1 person) and the ship's destruction. An explosion is now more dangerous in close
    range but also more profitable by leaving some debris and an ejected pilot behind.
     
    Credits
    =======
    
    original work: Shipbuilder
    Colonial Viper Mark I: Norby (model, diffuse and emission map, plus various details all obtained from Fighters.OXP)
    
    Dependencies
    ============
    
    to work correct this pack needs to install Montanas Resource Pack 01 OXP (minimum V 0.51) as well
    
    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:
    first release

    Equipment

    This expansion declares no equipment.

    Ships

    Name
    Colonial Viper Mark I
    Colonial Viper Mark I-S
    Colonial Viper Mark I-S
    GalTech_colonial_viper_mark_I-S_player
    GalTech_colonial_viper_mark_I_escape_suit
    GalTech_colonial_viper_mark_I_escape_suit_pirate
    GalTech_colonial_viper_mark_I_escape_suit_police
    GalTech_colonial_viper_mark_I_hunter
    GalTech_colonial_viper_mark_I_hunter_team_01
    GalTech_colonial_viper_mark_I_pirate
    GalTech_colonial_viper_mark_I_pirate_team_01
    GalTech_colonial_viper_mark_I_player
    GalTech_colonial_viper_mark_I_police
    GalTech_colonial_viper_mark_I_police_team_01

    Models

    This expansion declares no models.

    Scripts

    Path
    Scripts/GalTech_colonial_viper_mark_I.js
    this.name			= "GalTech_colonial_viper_mark_I";
    this.author			= "Montana05";
    this.description	= "event handler for GalTech colonial viper OXP";
    this.version		= "0.50";
    this.copyright		= "2020 Montana05";
    this.licence   		= "CC BY-NC-SA 4.0";
    "use strict";
    
    // new features for Colonial Viper:
    
    this.shipSpawned = function(ship)
    {
    	this.$GalTech_shipType = this.ship.dataKey;
    			
    	if(this.ship.hasRole("escape-capsule"))
    	{
    		// neutral inits first
    		var $GalTech_crewName = expandDescription("[nom]");
    		var $GalTech_description = "a crew member of an evacuated ship";
    		var $GalTech_crewRole = "hunter";  // not perfect but somewhere in the middle
    		var $GalTech_crewRace = expandDescription("[GalTech_GalCop_races]");  // added a race to the crew members
    		
    		// now it's time to be more specific, based on a 1 person crew
    		// every individual without insurance or bounty will be defined as a slave
    		switch(this.$GalTech_shipType) 
    		{
    			case "GalTech_colonial_viper_mark_I_escape_suit":
    			
    				this.$GalTech_colonial_viper_mark_I_crew_ranks_Array = 
    				["Pilot", "Commander"];
    				var $GalTech_crewRanks = 
    				$GalTech_colonial_viper_mark_I_crew_ranks_Array[Math.floor(Math.random() * $GalTech_colonial_viper_mark_I_crew_ranks_Array.length)];
    			
    				$GalTech_crewName = ("the " + $GalTech_crewRace + " " + $GalTech_crewRanks + " " + expandDescription("[nom]"));
    				$GalTech_description = "a fighter pilot";
    				$GalTech_crewRole = "hunter"; 	
    				break;
    			
    			case "GalTech_colonial_viper_mark_I_escape_suit_police":
    				
    				this.$GalTech_colonial_viper_mark_I_police_ranks_Array = 
    				["Space Junior Lieutenant", "Space Lieutenant"];
    				var $GalTech_policeRank = 
    				$GalTech_colonial_viper_mark_I_police_ranks_Array[Math.floor(Math.random() * $GalTech_colonial_viper_mark_I_police_ranks_Array.length)];
    			
    				$GalTech_crewName = ("the " + $GalTech_crewRace + " " + $GalTech_policeRank + " " + expandDescription("[nom]"));
    				$GalTech_description = "a crew member of a space police ship";
    				$GalTech_crewRole = "police"; 		
    				break;
    			
    			case "GalTech_colonial_viper_mark_I_escape_suit_pirate":
    				
    				$GalTech_crewName = 
    				("the " + $GalTech_crewRace + " " + expandDescription("[GalTech_pirate_nicknames]") + expandDescription("[nom]"));
    				
    				$GalTech_description = "a criminal wanted by GalCop police";
    				$GalTech_crewRole = "pirate";
    				break;	
    			
    			default: 
    				break;			
    		};
    
    		this.ship.setCrew
    		(
    			{
    				name: $GalTech_crewName,
    				short_description: $GalTech_description,
    				role: $GalTech_crewRole,
    				species: $GalTech_crewRace
    			}
    		);
    	};
    };
    
    this.shipDied = function(whom, why)
    {
    	if(this.ship.hasRole("escape-capsule"))
    	{
    		return;
    	}
    	else
    	{
    		// neutral inits first
    		var $GalTech_podType = "escape-capsule";
    		var debrisCount = 1;  // for pods
    				
    		// time to eject the escape pods
    		if(this.ship.bounty > 7)
    		{
    			this.ship.commsMessage(expandDescription("[GalTech_colonial_viper_msg_pirate]"), player.ship);
    			$GalTech_podType = "GalTech_colonial_viper_mark_I_escape_suit_pirate";
    		}
    		else
    		{
    			switch(this.$GalTech_shipType) 
    			{
    				case "GalTech_colonial_viper_mark_I":
    
    					this.ship.commsMessage(expandDescription("[GalTech_colonial_viper_msg_escort]"), player.ship);
    					$GalTech_podType = "GalTech_colonial_viper_mark_I_escape_suit";
    					break;
    				
    				case "GalTech_colonial_viper_mark_I-S":
    
    					this.ship.commsMessage(expandDescription("[GalTech_colonial_viper_msg_trader]"), player.ship);
    					$GalTech_podType = "GalTech_colonial_viper_mark_I_escape_suit";
    					break;
    					
    				case "GalTech_colonial_viper_mark_I-S_hunter":
    				case "GalTech_colonial_viper_mark_I_hunter_team_01":
    				case "GalTech_colonial_viper_mark_I_hunter":	
    
    					this.ship.commsMessage(expandDescription("[GalTech_colonial_viper_msg_hunter]"), player.ship);
    					$GalTech_podType = "GalTech_colonial_viper_mark_I_escape_suit";
    					break;
    
    				case "GalTech_colonial_viper_mark_I_police":
    				
    					this.ship.commsMessage(expandDescription("[GalTech_colonial_viper_msg_police]"), player.ship);
    					$GalTech_podType = "GalTech_colonial_viper_mark_I_escape_suit_police";	
    					break;	
    				
    				// for pirates with small bounty, unlikely but better make sure
    				case "GalTech_colonial_viper_mark_I_pirate":
    				case "GalTech_colonial_viper_mark_I_pirate_team_01":	
    		
    					this.ship.commsMessage(expandDescription("[GalTech_colonial_viper_msg_pirate]"), player.ship);
    					$GalTech_podType = "GalTech_colonial_viper_mark_I_escape_suit_pirate";
    					break;	
    
    				default: 
    					break;	
    			};	
    		};
    					
    		// added 1x spacesuit of ejected pilot
    		system.addShips($GalTech_podType, 1, this.ship.position);
    		
    		debrisCount = this.$getRndInteger(2, 4);
    		// added explosive shrapnels
    		system.addShips("GalTech_effects_explosive_shrapnel", debrisCount, this.ship.position);
    		// added various depris
    		system.addShips("GalTech_ship_debris", debrisCount, this.ship.position);
    
    		// added burning fuel
    		debrisCount = (this.ship.fuel.toFixed(0)) * 2;	
    		system.addShips("GalTech_effects_burningFuel", debrisCount, this.ship.position);
    	};
    };	
    
    this.$getRndInteger = function(min, max)
    {
    	return Math.floor(Math.random() * (max - min + 1) ) + min;
    };