Retrofitting existing ships in OXPs with more escape pods

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
Above Average
Above Average
Posts: 27
Joined: Sun Jan 01, 2006 3:50 pm

Retrofitting existing ships in OXPs with more escape pods

Post by popsch » Mon Sep 07, 2015 10:58 pm


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);

User avatar
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4018
Joined: Fri Nov 11, 2011 6:19 pm

Re: Retrofitting existing ships in OXPs with more escape pod

Post by cim » Tue Sep 08, 2015 6:41 am

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)

Post Reply