Back to Index Page generated: Jun 13, 2026, 7:54:54 PM

Expansion The Classic Ships (Replace)

Content

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Replace the default ship set with modern re-imaginings of the classic Elite-style ships. Replace the default ship set with modern re-imaginings of the classic Elite-style ships.
Identifier oolite.oxp.smivs.ClassicShips(Replace) oolite.oxp.smivs.ClassicShips(Replace)
Title The Classic Ships (Replace) The Classic Ships (Replace)
Category Retextures Retextures
Author Smivs Smivs
Version 1.4 1.4
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Dependent Expansions
  • olite.oxp.smivs.ClassicOoniverse:1.0
  • Information URL http://wiki.alioth.net/index.php/The_Classic_Ships n/a
    Download URL https://wiki.alioth.net/img_auth.php/6/6f/ClassicShips%28Replace%29_v1.4.oxz n/a
    License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
    File Size n/a
    Upload date 1610873332

    Relationships Diagram

    Documentation

    Also read http://wiki.alioth.net/index.php/The%20Classic%20Ships%20(Replace)

    readme.txt

    The Classic Ships (Replace) OXZ
    
    Overview:-
    
    This expansion replaces the default ship set with modern re-imaginings of the original Elite-style ships.
    The original models have been used with engine and gun models added. The texture designs are based on the oiginal set, and six new designs have been added so that each ship now has its own unique texture.
    Full details can be found on the wiki page at 
    http://wiki.alioth.net/index.php/The%20Classic%20Ships
    
    Licence:-
    
    This work is Licenced under the Creative Commons Attribution-Noncommercial-Share Alike 4.0 Unported Licence. 
    To view a copy of this Licence, send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
    
    Author and credits:-
    
    The Classic Ships expansion was developed by Smivs.
    
    Thanks must first go to Giles Williams without whom none of this would have been possible. A very big Thank You also to all the community members who helped during the development phase with encouragement, comments, observations and suggestions. Particular thanks to Disembodied and Rorschachhamster for decals used on some of the ships, and Capt, Murphy for scripting inspiration. 
    

    Equipment

    This expansion declares no equipment.

    Ships

    Name
    adder
    adder-player
    anaconda
    anaconda-pirate
    anaconda-player
    asp
    asp-cloaked
    asp-player
    boa
    boa-mk2
    boa-mk2-pirate
    boa-mk2-player
    boa-pirate
    boa-player
    classicShipsEngine1
    classicShipsEngine2
    classicShipsEngine3
    classicShipsEngine4a
    classicShipsEngine4b
    classicShipsGun
    cobra3-alternate
    cobra3-pirate
    cobra3-player
    cobra3-trader
    cobramk1
    cobramk1-alt
    cobramk1-miner
    cobramk1-player
    constrictor
    ferdelance
    ferdelance-player
    gecko
    krait
    mamba
    mamba-escort
    moray
    moray-player
    morayMED
    morayMED-player
    python
    python-blackdog
    python-player
    python-trader
    shuttle
    sidewinder
    sidewinder-escort
    tharglet
    thargoid
    transporter
    transporter-miner
    viper
    viper-interceptor
    viper-pursuit
    worm
    worm-miner

    Models

    This expansion declares no models.

    Scripts

    Path
    Scripts/classicShipsScript.js
    "use strict"; 
    
    // Standard attributes 
    this.name           = "classicShipsScript.js"; 
    this.author         = "Smivs"; 
    this.copyright	    = "© Smivs"; 
    this.licence        = "Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License"; 
    this.version        = "1.2"; 
    this.description    = "Script to render ship derelict upon ejection of pilot." 
    
    
    this.shipLaunchedEscapePod = function()
    {
      this.switchFlashersAITimer = new Timer(this, this.$switchFlashersOff,8); // timer to switch off flashers after 8 seconds
      this.switchHullTexTimer = new Timer(this, this.$switchHullTex,12); // timer to switch off hull lights emission map after 12 seconds
      this.rotateDerelictTimer = new Timer(this, this.$rotateDerelict,25); // timer to start derelict rotation after 25 seconds
      this.switchEngineTexTimer = new Timer(this, this.$switchEngineTex,35); // timer to switch engines textures to derelict version after 35 seconds
    }
    this.$switchFlashersOff = function()
    {
      this.ship.lightsActive = false; // turns flashers off
    }
    this.$switchHullTex = function()
    {
      var $classicShipsTexture = this.ship.scriptInfo.classicShipsTexture; // uses scriptInfo key to build ship's default texture name
      var $classicShipsDiffuse = this.ship.scriptInfo.classicShipsDiffuse; // uses scriptInfo key to build ship's diffuse_map name
      var $classicShipsLighting = this.ship.scriptInfo.classicShipsLighting; // uses scriptInfo key to build ship's emission_map name
      var $classicShipsDerelict = this.ship.scriptInfo.classicShipsDerelict; // uses scriptInfo key to build derelict emission_map name
      var $classicShipsNormal = this.ship.scriptInfo.classicShipsNormal; // uses scriptInfo key to build ship's normal_map name
      var $classicShipsSpecular = this.ship.scriptInfo.classicShipsSpecular; // uses scriptInfo key to build ship's specular_map name
      var material = new Object(); // declare variable
      material[$classicShipsTexture] = {diffuse_map:$classicShipsDiffuse, emission_map:$classicShipsDerelict, normal_map:$classicShipsNormal, specular_map:$classicShipsSpecular}; // set up material entry
      this.ship.setMaterials(material); // apply material
    }
    this.$rotateDerelict = function()
    {
      this.rotateVector = Vector3D.randomDirection(); // creates a random axis of rotation.
      this.rotateSpeedFactor = (Math.random() * (0.05) + 0.05); // creates a random rotate speed factor between 0.05 and 0.1 - 0.1 will result in a rotation speed of approx 1 full rotation every 63 seconds, 0.05 in a rotation speed of approx 1 full rotation every 126 seconds.
      this.rotateDerelictCallBack = addFrameCallback(this.rotateFunction.bind(this)); // create FrameCallback
    }
    this.rotateFunction = function(delta) // delta is the time in game seconds since the last frame.
    {
      if (!this.ship.isValid){removeFrameCallback(this.rotateDerelictCallback);delete this.rotateDerelictCallback;return;} // end FrameCallback is ship has died;
      if (delta === 0){return;} // do nothing if game is paused;
      var newOrientation = this.ship.orientation.rotate(this.rotateVector,delta*this.rotateSpeedFactor); // calculates new orientation, using delta as a factor so that rotation speed is constant across varying frame rates. delta*this.rotateSpeedFactor is a value in radians. There are approx 6.3 radians in a full rotation.
      this.ship.orientation = newOrientation; // applies new orientation;
    }
    this.$switchEngineTex = function()
    {
      var $onTexture; // declare variable
      var $offTexture; //declare variable
      var material = new Object(); // declare variable
      var subents = this.ship.subEntities; // create array of subents
      var counter = 0; // set up loop to check if subent is an engine and if so change texture to derelict version
      var subentsLength = subents.length;
      for (counter = 0; counter < subentsLength;counter++)
        {
          if (subents[counter].scriptInfo.engineOnTexture)
    	{
    	  $onTexture = subents[counter].scriptInfo.engineOnTexture; // uses scriptInfo key to build engine texture name
    	  $offTexture = subents[counter].scriptInfo.engineOffTexture; // uses scriptInfo key to build derelict engine texture name
    	  material[$onTexture] = {emission_map:$offTexture}; // set up material entry
    	  subents[counter].setMaterials(material); // sets material
    	}
        }
    }
    this.entityDestroyed = function()
    // stop timers
    {
      if(this.switchFlashersAITimer)
        {
          if (this.switchFlashersAITimer.isRunning) 
            {
              this.switchFlashersAITimer.stop();
              delete this.switchFlashersAITimer;
            }
         }
      if(this.switchHullTexTimer)
         {
           if (this.switchHullTexTimer.isRunning) 
             {
               this.switchHullTexTimer.stop();
               delete this.switchHullTexTimer;
             }
         }
      if(this.rotateDerelictTimer)
         {
           if (this.rotateDerelictTimer.isRunning) 
             {
               this.rotateDerelictTimer.stop();
               delete this.rotateDerelictTimer;
             }
          }
      if(this.switchEngineTexTimer)
         {
           if (this.switchEngineTexTimer.isRunning) 
             {
               this.switchEngineTexTimer.stop();
               delete this.switchEngineTexTimer;
             }
          }
    }
    
    
    Scripts/classicThargoid_warship_script.js
    "use strict";
    
    // Standard attributes 
    this.name           = "classicThargoid_warship_script.js"; 
    this.author         = "Smivs"; 
    this.copyright	    = "© Smivs"; 
    this.licence        = "Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License";
    this.version        = "1.2";  
    this.description    = "Script to control color change of Thargoid warships and generate curses upon death." 
    
    this.shipSpawned = function()
    {
     this.$classicThargoidWarshipColorChange ()
    }
    // first phase
    this.$classicThargoidWarshipColorChange = function()
    // timer to switch diffuse and emission maps after 1 second
    {
      this.$thargoidColorTimer1 = new Timer(this, this.thargoidColorTimer1,0.5); 
    }
    this.thargoidColorTimer1 = function()
    // Set materials to first phase
    {
       this.ship.setMaterials({"classicThargoid_diffuse1.png": { diffuse_map: "classicThargoid_diffuse1.png", emission_map: "classicThargoid_lighting1.png", normal_map: "classicThargoid_normal.png" }});
    // Switch to second phase
       this.$classicThargoidWarshipColorChange2 ();
    }
    // second phase
    this.$classicThargoidWarshipColorChange2 = function()
    {
    // timer to switch diffuse and emission maps back after 1 second
      this.$thargoidColorTimer2 = new Timer(this, this.thargoidColorTimer2,0.5); 
    }
    this.thargoidColorTimer2 = function()
    // Set materials to second phase
    {
       this.ship.setMaterials({"classicThargoid_diffuse1.png": { diffuse_map: "classicThargoid_diffuse2.png",  emission_map: "classicThargoid_lighting2.png", normal_map: "classicThargoid_normal.png" }});
    // Switch back to first phase
       this.$classicThargoidWarshipColorChange ();
    }
    this.shipDied = function ()
    // from core oolite warship script, to generate curses
    {
      this.ship.commsMessage(expandDescription("[thargoid_curses]"));
    }
    this.entityDestroyed = function()
    // stop timers
    {
      if(this.thargoidColorTimer1)
        {
          if (this.thargoidColorTimer1.isRunning) 
            {
              this.thargoidColorTimer1.stop();
              delete this.thargoidColorTimer1;
            }
         }
      if(this.thargoidColorTimer2)
         {
           if (this.thargoidColorTimer2.isRunning) 
             {
               this.thargoidColorTimer2.stop();
               delete this.thargoidColorTimer2;
             }
         }
    }