Page 1 of 1

Retrofitting existing ships in OXPs with more escape pods

Posted: Mon Sep 07, 2015 10:58 pm
by popsch
Hi,

Is there a straightforward way to retrofit existing ships with the following functionality: Per 50TC of cargo space, the ship should launch additional escape-capsules.

I specifically thought of the workcom (Worker's Commuter in Commies), where it is odd that it launches only one escape-capsule. It would be nice ambience, if the ship spawns 5-6 escape pods in pairs, one every other second. This could shows how to spawn the pods, but the question is how to retrofit a ship like workcom from outside the OXP.

Code: Select all

this.debugManyCapsules = 1;

'use strict';


/** launch from station for testing */
this.shipWillLaunchFromStation = function() {
    if (this.debugManyCapsules != 1) return;

    player.ship.position = system.locationFromCode('OUTER_SYSTEM_OFFPLANE');
    new Timer(this, this.$firePod, 2);
};

this.$firePod = function() {
    system.addShips('escape-capsule', 2, player.ship.position.add([1E4, 0,0]), 100);
    if(Math.random() < 0.5) new Timer(this, this.$firePod, 2);
}


Re: Retrofitting existing ships in OXPs with more escape pod

Posted: Tue Sep 08, 2015 6:41 am
by cim
If a ship has "has_escape_pod = 4;" set it will launch 4 escape pods. Unlike the other has_equipment entries in shipdata.plist, this one can take a number rather than a boolean.

You can retrofit this with shipdata-overrides.plist

(I don't think this spaces out the launches at all, but with the standard timing of escape pod launches in the main game if you wait two seconds before launching the next the ship is probably already dead)