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

Expansion Convoys

Content

Warnings

  1. Required Expansions mismatch between OXP Manifest and Expansion Manager at character position 0066 (DIGIT ZERO vs LATIN SMALL LETTER N)
  2. No version in dependency reference to oolite.oxp.cim.escort-formations:null
  3. No version in dependency reference to oolite.oxp.Norby.FreighterConvoys:null
  4. Optional Expansions mismatch between OXP Manifest and Expansion Manager at character position 0067 (DIGIT ZERO vs LATIN SMALL LETTER N)

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Freighters can fly in large groups occasionally. Small ships also make larger formations sometimes to defend themselves, as well as pirates, hunters and police, especially in bad governments. Leaders of convoys are usually well armed ships but local authorities pay very high bounties for the most wanted fugitive leaders. Freighters can fly in large groups occasionally. Small ships also make larger formations sometimes to defend themselves, as well as pirates, hunters and police, especially in bad governments. Leaders of convoys are usually well armed ships but local authorities pay very high bounties for the most wanted fugitive leaders.
Identifier oolite.oxp.Norby.Convoys oolite.oxp.Norby.Convoys
Title Convoys Convoys
Category Mechanics Mechanics
Author Norby Norby
Version 1.3 1.3
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
  • oolite.oxp.cim.escort-formations:0
  • oolite.oxp.cim.escort-formations:
  • Optional Expansions
  • oolite.oxp.Norby.FreighterConvoys:0
  • oolite.oxp.Norby.FreighterConvoys:
  • Conflict Expansions
    Information URL http://aegidian.org/bb/viewtopic.php?f=6&t=18930 n/a
    Download URL https://wiki.alioth.net/img_auth.php/b/b1/Convoys_1.3.oxz n/a
    License CC BY-NC-SA 4 CC BY-NC-SA 4
    File Size n/a
    Upload date 1610873446

    Documentation

    Also read http://wiki.alioth.net/index.php/Convoys

    Equipment

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

    Ships

    Name
    Adder Leader
    Anaconda Team Leader
    Anaconda Admiral
    Anaconda Leader - high bounty
    Anaconda Team Leader
    Anaconda Team Leader
    Asp Mark II Leader
    Asp Mark II Leader - high bounty
    Boa Leader
    Boa Class Cruiser Leader
    Boa Class Cruiser Leader - high bounty
    Boa Leader - high bounty
    Cobra Mark III Leader
    Cobra Mark III Leader - high bounty
    convoys-escort-adder
    convoys-escort-anaconda
    convoys-escort-anaconda-pirate
    convoys-escort-asp
    convoys-escort-boa
    convoys-escort-boa-mk2
    convoys-escort-boa-mk2-pirate
    convoys-escort-boa-pirate
    convoys-escort-cobra3-alternate
    convoys-escort-cobra3-pirate
    convoys-escort-cobra3-trader
    convoys-escort-cobramk1
    convoys-escort-cobramk1-alt
    convoys-escort-cobramk1-miner
    convoys-escort-ferdelance
    convoys-escort-gecko
    convoys-escort-krait
    convoys-escort-mamba
    convoys-escort-mamba-escort
    convoys-escort-moray
    convoys-escort-morayMED
    convoys-escort-python
    convoys-escort-python-blackdog
    convoys-escort-python-trader
    convoys-escort-shuttle
    convoys-escort-sidewinder
    convoys-escort-sidewinder-escort
    convoys-escort-thargoid
    convoys-escort-transporter
    convoys-escort-transporter-miner
    convoys-escort-viper
    convoys-escort-viper-interceptor
    convoys-escort-viper-pursuit
    convoys-escort-worm
    convoys-escort-worm-miner
    Fer-de-Lance Leader
    Fer-de-Lance Leader - high bounty
    Gecko Leader - high bounty
    Krait Leader
    Krait Leader - high bounty
    Mamba Leader - high bounty
    Moray Leader
    Moray Chief Medical Boat
    Moray Leader - high bounty
    Python Leader
    Python Boss - very high bounty
    Python Leader - high bounty
    Python Team Leader
    GalCop Sheriff
    GalCop Sheriff
    GalCop Sheriff
    Shuttle Leader
    Thargoid Hulk - high bounty
    Thargoid Queen - very high bounty
    Thargoid Queen Subentity
    Transporter Leader
    Miner Leader
    Worm Leader
    Worm Miner Leader

    Models

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

    Scripts

    Path
    Scripts/convoys.js
    "use strict";
    this.name	= "convoys";
    this.author	= "Norby";
    this.copyright	= "2017 Norby";
    this.description= "Convoys worldscript";
    this.licence	= "CC BY-NC-SA 4.0";
    
    
    //this function is almost a copy from Escort Formations OXP but handle the new roles added in Oolite 1.79.
    
    this.shipSpawned = function(ship) {
    	if (!ship.script) return; // odd, but seems to happen occasionally
    	if (ship.script.coordinatesForEscortPosition != Script.prototype.coordinatesForEscortPosition) {
    		//this.$debug(ship.displayName+" has escort coordinates already");
    		return; 
    	} // already has some custom coordinates
    	if (ship.script.$efr_pattern) { 
    		//this.$debug(ship.displayName+" has $efr_pattern already");
    		return; 
    	} // variable name conflict
    	if (ship.script.$efr_timer) { 
    		//this.$debug(ship.displayName+" has $efr_pattern already");
    		return; 
    	} // variable name conflict
    	var offensiveChance = 0, r = ship.primaryRole;
    	if ( r == "miner" || r == "scavenger" || r == "shuttle" ) {
    		offensiveChance = 0;
    	} else if ( r == "escort" || r == "escort-medium" || r == "escort-heavy" ) {
    		offensiveChance = 0;
    	} else if ( r == "trader" || r == "trader-courier" || r == "trader-smuggler" ) {
    		offensiveChance = 0.15;
    	} else if (r == "pirate" || r == "pirate-light-fighter" || r == "pirate-medium-fighter"
    			|| r == "pirate-heavy-fighter" || r == "pirate-light-freighter"
    			|| r == "pirate-medium-freighter" || r == "pirate-heavy-freighter"
    			|| r == "pirate-aegis-raider" || r == "pirate-interceptor" ) {
    		offensiveChance = 0.75;
    	} else if (r == "police" || r == "interceptor" || r == "wingman" ) {
    		offensiveChance = 0.9;
    	} else if (r == "hunter" || r == "hunter-medium" || r == "hunter-heavy" ) {
    		offensiveChance = 0.9;
    	} else if (r == "assassin-light" || r == "assassin-medium" || r == "assassin-heavy") {
    		offensiveChance = 1;
    	} else if (r == "thargoid") {
    		offensiveChance = 1;
    	} else {
    		//this.$debug(ship.displayName+" has no included role");
    		return; // stock ships only
    	}
            if (Math.random() < 0.10) {
                    //this.$debug("No escort change for "+ship.displayName);
                    return;
            } // keep default formation
    	
    // timer to allow escorts to be set up too
    	if (Math.random() < offensiveChance) {
    		ship.script.$efr_timer = new Timer(ship,function() {
                        worldScripts["Escort Formations Randomiser"].$setupOffensiveEscorts(ship); },0.25);
    	} else {
    		ship.script.$efr_timer = new Timer(ship,function() { 
                        worldScripts["Escort Formations Randomiser"].$setupDefensiveEscorts(ship); },0.25);
    	}
    }
    
    this.$debug = function(msg) {
    	log(this.name,msg);
    }