I've just come across an odd thing with the this.shipFiredMissile ship script event. I'm not sure if it classes as a bug or not, hence why I'm reporting it here rather than Berlios for the moment.
Anyway if I have a ship with a new missile type that isn't scanclass "CLASS_MISSILE" (in this case it's a new Thargoid warship with different Thargons, defined as new equipment EQ_SWARM_MISSILE but with scanclass CLASS_THARGOID) then the this.shipFiredMissile event doesn't fire. However if I change the Thargon scanclass from CLASS_THARGOID to CLASS_MISSILE then the event fires.
I'm going to work around it by setting CLASS_MISSILE and then changing the scanner colours to red/green, but it seemed odd that something that is a missile (by the normal equipment definitions) isn't triggering the event unless it has the specific scanclass.
For reference EQ_THARGON also doesn't seem to trigger the event?
Test case OXP available on request.
Editted to add - it's a non-ideal solution though, as now the mothership tends to attack its own drones (even though they're in the same shipgroup) as scanForNonThargoids picks them up.
Ok, it looks like we'll have a 'pylonFired' 'shipReleasedEquipment' event (name to be finalised) that will be activated if the ship's launching a non-missile pylon-mounted piece of equipment!
Ok, it looks like we'll have a 'pylonFired' 'shipReleasedEquipment' event (name to be finalised) that will be activated if the ship's launching a non-missile pylon-mounted piece of equipment!
It's still a little odd, as far as equipment is concerned, it is a missile (it's defined as EQ_SWARM_MISSILE, so is pylon based, needs a target, is set-up using missile_role and missiles in shipdata etc). It just doesn't have the missile scanclass. It's not quite the same, as if it's lumped in with mines then we won't be able to have the target as a parameter (as they don't have one, whereas my missile does).
The shipReleasedEquipment event is still very much desirable (so we can detect mine launches), but for me it's still not logical as fundamentally what I'm launching by equipment definition is a missile...
Ok, it looks like we'll have a 'pylonFired' 'shipReleasedEquipment' event (name to be finalised) that will be activated if the ship's launching a non-missile pylon-mounted piece of equipment!
Thankyou!
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.
Thargoid, I've already tweaked it locally & it should appear in 1.76.1 and above: if it's isMissile==true and it's got a target, the firedMissile event will fire anyway.