Eric Walch wrote:Update for thargoid containing oxps
The npc missile launches always had an interesting 'feature' that when the missile_launch_position was defined inside the bounding box, the missile got 10 m/sec extra speed for every meter it was from the outside of the bounding box. This resulted in launch positions close to the ships center having a very strong extra speed boost. Examples are the thargons from the thargoids that were thrown out at high speed, for the internal thargoids, while ox's that used a more correct position, like the Griff ones, didn't have that extra speed.
Somehow that looked wrong. And now it seems that even the direction was wrong: not away from the ship, but always along the same system vector, no matter of the position of the ship. The only thing preventing missiles from crashing was additional code that made missiles crash-proof during the first 0.25 seconds of their existence.
Anyhow, this code is now removed, resulting in a new problem: the missile_launch_position of thargoids was defined exactly behind the ship at the same position as the aft_eject_position. This will cause thargons to immediately crash into their mother. I examined many ox's with thargoids and all added the thargons wrong. The only exception are Griff his thargoids.
Trunk will now check for such wrong launch positions at [0,0,-x] and replace it with a default position. It will also write an error to the log to inform that the position was wrong, so that oxp makers know that they have to update their work.
(from the "Progress" thread in "Discussion")
I've gone through and re-downloaded my oxps, started Oolite, and let the all ships appear on the start-up screen. I left it a while, and it must have gone through some of them more than once. Anyway, these popped up in my log file.
Code: Select all
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x9fa561b8>{"Thargoid Warship" position: (-8062.63, -8443.24, 363418) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x9fa561b8>{"Thargoid Warship" position: (-9283.38, -9627.06, 361096) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x9fa561b8>{"Thargoid Warship" position: (-9398.72, -9793.93, 360857) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x9fa561b8>{"Thargoid Warship" position: (-9440.84, -9812.89, 360815) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x9fa561b8>{"Thargoid Warship" position: (-10147.9, -9586.17, 360928) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x8be605e0>{"Thargoid Pathfinder" position: (4020.85, -9826.29, 13206.8) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x8be605e0>{"Thargoid Pathfinder" position: (3960.4, -9613.78, 12995.7) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x8be605e0>{"Thargoid Pathfinder" position: (3947.44, -9569.88, 12950.4) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x8be605e0>{"Thargoid Pathfinder" position: (3931.95, -9515.77, 12896.2) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
[ship.missileLaunch.invalidPosition]: ***** ERROR: The missile_launch_position defines a position (0, 0, -20.5) behind the <ShipEntity 0x8be605e0>{"Thargoid Pathfinder" position: (3890.59, -9368.21, 12751.5) scanClass: CLASS_THARGOID status: STATUS_IN_FLIGHT}. In future versions such missiles may explode on launch because they have to travel through the ship.
I remembered reading something about it, so I searched the forum and found Eric's post. And then searched my AddOns folder using grep to see where the offending lines are. In the shipdata.plist file for the relevant oxps, we have:
Pathfinders:
TCAT uses a like_ship to thargoid in the Pathfinders in lines 932 and 941 for the "TCAT_warship" and the "TCAT_armadaWarship"
Warship:
Griff uses
missile_launch_position = "0.0 -58.0 -0.0";
(line 6338 in the all in 1, in "griff_thargoid_template", which according to above is okay.)
DeepSpace Ships uses
missile_launch_position = "0.0 0.0 -20.5";
(line 2410 in the version which works with other shipsets, in "ds-alt-thargoid")
Smivs (standard) uses
missile_launch_position = "0.0 0.0 -20.5";
(line 2334 in "thargoid")
Neolites uses
missile_launch_position = "0.0 0.0 -20.5";
(line 3864 in "neolite-thargoid")
Thargoid Wars uses
<key>missile_launch_position</key>
<string>0.0 0.0 -20.5</string>
(lines 60, 61 in "thargoid_wars_decoy")
Should all of the above be changed to match Griff's values?