Back to Index Page generated: Nov 12, 2024, 11:02:04 PM

Expansion Random Hits Shipset

Content

Warnings

  1. Required Expansions mismatch between OXP Manifest and Expansion Manager at character position 0062 (DIGIT ZERO vs LATIN SMALL LETTER N)
  2. No version in dependency reference to oolite.oxp.spara.random_hits:null

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Add ships from Random Hits to the Ooniverse for ambiance and challenge. Add ships from Random Hits to the Ooniverse for ambiance and challenge.
Identifier oolite.oxp.spara.random_hits_shipset oolite.oxp.spara.random_hits_shipset
Title Random Hits Shipset Random Hits Shipset
Category Ships Ships
Author spara spara
Version 1.1 1.1
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
  • oolite.oxp.spara.random_hits:0
  • oolite.oxp.spara.random_hits:
  • Optional Expansions
    Conflict Expansions
    Information URL http://wiki.alioth.net/index.php/Random_Hits_OXP n/a
    Download URL https://wiki.alioth.net/img_auth.php/b/b3/Random_hits_shipset_1.1.oxz n/a
    License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
    File Size n/a
    Upload date 1610873448

    Documentation

    Also read http://wiki.alioth.net/index.php/Random%20Hits%20Shipset

    Equipment

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

    Ships

    Name
    rhs_big_boss_cobra4_spacelane_shipset
    rhs_big_boss_iguana_spacelane_shipset
    rhs_big_boss_impcourier_spacelane_shipset
    rhs_big_boss_imptrader_spacelane_shipset
    rhs_big_boss_pitviper_spacelane_shipset
    rhs_big_boss_supercobra_spacelane_shipset
    rhs_big_boss_vamppurg_spacelane_shipset
    rhs_big_boss_wolfmk2SE_spacelane_shipset
    rhs_mark_arachnid_shipset
    rhs_mark_aspmk1_shipset
    rhs_mark_bug_shipset
    rhs_mark_cobra3courier_shipset
    rhs_mark_cobra3rapier_shipset
    rhs_mark_cobra4_shipset
    rhs_mark_cobras9_shipset
    rhs_mark_drake2_shipset
    rhs_mark_drake_shipset
    rhs_mark_dttmk1_shipset
    rhs_mark_galtech_escort_fighter_shipset
    rhs_mark_ghavial_shipset
    rhs_mark_gnat_shipset
    rhs_mark_griffin1_shipset
    rhs_mark_imp_shipset
    rhs_mark_imptrader_shipset
    rhs_mark_mamba_shipset
    rhs_mark_phaze_shipset
    rhs_mark_pitviper_shipset
    rhs_mark_supercobra_shipset
    rhs_mark_vamppurg_shipset
    rhs_mark_wolf_shipset
    rhs_mark_yacht_shipset
    rhs_patrol_aphid_shipset
    rhs_patrol_arachnid_shipset
    rhs_patrol_asp_shipset
    rhs_patrol_aspmk1_shipset
    rhs_patrol_cat_shipset
    rhs_patrol_cobra2x_shipset
    rhs_patrol_cobra3-alternate_shipset
    rhs_patrol_cobra3courierSE-trader_shipset
    rhs_patrol_cobra3courier_shipset
    rhs_patrol_cobra3rapier_shipset
    rhs_patrol_cobra4_shipset
    rhs_patrol_cobraclipper_shipset
    rhs_patrol_cobras9_shipset
    rhs_patrol_cutlass_shipset
    rhs_patrol_drakemk2_shipset
    rhs_patrol_ferdelance_shipset
    rhs_patrol_galtech_escort_fighter_shipset
    rhs_patrol_gnat_shipset
    rhs_patrol_iguana_shipset
    rhs_patrol_impcourier_shipset
    rhs_patrol_manta_shipset
    rhs_patrol_moray_shipset
    rhs_patrol_mussurana_shipset
    rhs_patrol_mw-asp_shipset
    rhs_patrol_phaze_shipset
    rhs_patrol_pitviper_shipset
    rhs_patrol_python-cruiser_shipset
    rhs_patrol_salamander_shipset
    rhs_patrol_supercobra_shipset
    rhs_patrol_vamppurg_shipset
    rhs_patrol_wolfmk2SE_shipset

    Models

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

    Scripts

    Path
    Scripts/rh_mark_shipset.js
    "use strict";
    this.name = "rh-mark-shipset";
    this.author = "spara";
    this.description	= "Name RH ships with RSN";
    
    this.shipSpawned = function ()
    {
    	if (worldScripts.randomshipnames) {
    		if (ship.primaryRole === "pirate")
    			this.ship.displayName = this.ship.name + ": " + worldScripts.randomshipnames.$randomPirateName(this.ship);
    		else if (ship.primaryRole === "escort")
    			this.ship.displayName = this.ship.name + ": " + worldScripts.randomshipnames.$randomHunterName(this.ship);
    		else
    			this.ship.displayName = this.ship.name + ": " + worldScripts.randomshipnames.$randomTraderName(this.ship);
    	}
        //log("rh_shipset_mark",this.ship.displayName);
        delete this.shipSpawned;
    }
    
    Scripts/rh_patrol_shipset.js
    "use strict";
    this.name = "rh-patrol-shipset";
    this.author = "Spara from script by LittleBear, Eric Walch & Thargoid";
    this.copyright = "2013";
    this.description	= "Name RH shipset hunter ships";
    this.licence     = "CC BY-NC-SA 3.0"; 
    this.version = "1.7";
    
    this.shipSpawned = function ()
    {
    	var level = parseInt(this.ship.scriptInfo.level);
    	var name = "";
    	switch(level)
    	{
    		case 1: name = expandDescription("[random_hits_hunterlow_name]"); break;
    		case 2: name = expandDescription("[random_hits_huntermedium_name]"); break;
    		case 3: name = expandDescription("[random_hits_hunterhigh_name]"); break;
    		default: name = "unknown"; // means a wrong level definition in shipData.plist. 
    	}
    	this.ship.displayName = this.ship.name+": "+name; // Show the Hunters name on the ID Computer when targeted.
        //log("rh_shipset_patrol",this.ship.displayName);
        delete this.shipSpawned;
    }
    
    Scripts/rh_spawn_shipset.js
    "use strict";
    
    this.name = "rh-boss-spawn-shipset";
    this.author = "spara";
    this.description	= "Conditional spawning of bosses";
    
    this.allowSpawnShip = function(shipKey)
    {
    	//Sanity check
    	if(system.isInterstellarSpace || !system.sun || system.sun.isGoingNova || system.sun.hasGoneNova)
    		return false;
    	//An anarchy system, that's where the bosses primarily lurk.
    	if (system.government === 0)
    		return true;
    	//Ok, not an anarchy system, but maybe there is such a system close by.
    	var adjacentSystems = system.info.systemsInRange(7);
    	var dangerousHood = false;
    	for (var i = 0; i < adjacentSystems.length; i++) {
    		if (System.infoForSystem(adjacentSystems[i].galaxyID, adjacentSystems[i].systemID).government === 0) {
    			dangerousHood = true;
    			break;
    		}
    	}
    	//This is dangerous hood, there is an anarchy system next door. Sometimes bosses visit nearby systems. Higher the government, rarer the incident.
    	if (dangerousHood && Math.random() * system.government < 0.5)
    		return true;
    	return false;
    }