this.shipDied() vs. turrets

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

this.shipDied() vs. turrets

Post by jh145 » Sun Apr 26, 2015 6:23 pm

I'm flying a Fer-de-Lance 3G+(t). To my almost unending joy, it has forward-facing turrets that are just wonderful for warming the paintwork of ships spiralling out of my cross-hairs. But ... purists may think it natural justice ... it means I often miss out on Random Hits kills!

The problem seems to be that this.shipDied(who,cause) has whom equal to null in the event of turret damage being the fatal blow (and cause is "energy damage" in that case).

It appears to be an issue in the core game too (I just sat still, hands off the lasers, while a Barracuda died in a kamikaze run towards my turrets, and did not score a kill). Are the plasma balls not "owned" by the player ship?

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2543
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: this.shipDied() vs. turrets

Post by Norby » Sun Apr 26, 2015 7:14 pm

The current workaround is the [wiki]Turret Toggler[/wiki]: turn off turrets near important targets.

User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: this.shipDied() vs. turrets

Post by jh145 » Sun Apr 26, 2015 7:40 pm

That workaround would go too far the other way, nullifying one of the most satisfying features of my ridiculous super-ship. I like my turrets wiping out mafia kingpins while I'm busy pouring another beer :wink:

Is unattributable plasma recognised as a core game bug? Do we agree it should be?

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13680
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: this.shipDied() vs. turrets

Post by Cody » Sun Apr 26, 2015 7:49 pm

jh145 wrote:Is unattributable plasma recognised as a core game bug? Do we agree it should be?
No, and no! I ain't a dev, of course - merely a dumb pilot.
Their dreams a tattered sail in the wind

User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: this.shipDied() vs. turrets

Post by jh145 » Sun Apr 26, 2015 8:01 pm

Why not? No-one's pretending that all kills are equally worthy.

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: this.shipDied() vs. turrets

Post by Diziet Sma » Mon Apr 27, 2015 12:09 pm

jh145 wrote:Is unattributable plasma recognised as a core game bug? Do we agree it should be?
If the kill came from a weapon launched/fired from your ship, it should count as your kill, IMO.

RH already discriminates against kills by weapons of mass destruction, as it should. But plasma turrets, being an aimed weapon, ought to count as a legitimate kill, the same as a missile.

So I vote 'bug'.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Disunited Kingdom
Contact:

Re: this.shipDied() vs. turrets

Post by Smivs » Mon Apr 27, 2015 3:49 pm

Diziet Sma wrote: If the kill came from a weapon launched/fired from your ship, it should count as your kill, IMO.
Normally I'd agree, but plasma turrets on player ships are a cheat give an unfair advantage - they use no energy and once a ship is targeted they self-aim and keep firing. I think this is enough 'benefit' without expecting this auto-slaughter to count in the same way an accurately aimed laser shot does.
My views are well known - player ships (indeed any small, agile ship) should not have these at all. They are only appropriate for large, slow capital ships that are too ponderous to effectively aim a laser.
Commander Smivs, the friendliest Gourd this side of Riedquat.

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

Re: this.shipDied() vs. turrets

Post by cim » Mon Apr 27, 2015 4:57 pm

Turret shots must count as being owned by the launching ship - there's far too much in the AI that would behave oddly if they weren't.

Tested now with a FDL 3G+(t) and was correctly credited both in script and in core functions for all kills made with turrets. Are you cloaking as well?

User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: this.shipDied() vs. turrets

Post by jh145 » Mon Apr 27, 2015 7:59 pm

cim wrote:Are you cloaking as well?
Posssssibly... but I don't think so now that cloaking is auto-off when the fighting starts (I'm running 1.82-dev). I'll check.

A thought's occurred to me: might the NPC have launched a desperate last-ditch missile that melted immediately in my plasma and exploded right next to its owner, causing the fatal blast of energy damage? Arguably still my kill, even if somewhat of an "own goal".

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

Re: this.shipDied() vs. turrets

Post by cim » Mon Apr 27, 2015 8:24 pm

Cloaking is auto-off when you fire a weapon. Turrets don't count, however, and in 1.82 cloaking doesn't automatically break hostility so they'd keep firing.

The missile event you describe is theoretically possible - though core game missiles don't detonate if shot, so it would also need an OXP missile which did to be present.

User avatar
jh145
Dangerous
Dangerous
Posts: 94
Joined: Thu Dec 25, 2014 8:39 pm

Re: this.shipDied() vs. turrets

Post by jh145 » Mon Apr 27, 2015 8:48 pm

OK, thanks. I'll leave it there unless/until I can reproduce the issue without any caveats.

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2543
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: this.shipDied() vs. turrets

Post by Norby » Mon Apr 27, 2015 8:53 pm

So it is possible to this.shipDied(whom,cause) return player.ship in whom when a turret of the player score the last hit, as a fix for RandomHits (which use this event)?

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

Re: this.shipDied() vs. turrets

Post by cim » Mon Apr 27, 2015 9:02 pm

Norby wrote:So it is possible to this.shipDied(whom,cause) return player.ship in whom when a turret of the player score the last hit, as a fix for RandomHits (which use this event)?
This should already happen except in the case where the player is cloaked at the point the shot hits.

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: this.shipDied() vs. turrets

Post by Diziet Sma » Mon Apr 27, 2015 10:51 pm

cim wrote:Cloaking is auto-off when you fire a weapon. Turrets don't count, however, and in 1.82 cloaking doesn't automatically break hostility so they'd keep firing.
Then I'd call that a bug. Turrets firing ought to disable cloaking too. Especially given the bolded part above.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied

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

Re: this.shipDied() vs. turrets

Post by cim » Tue Apr 28, 2015 5:52 am

Diziet Sma wrote:
cim wrote:Cloaking is auto-off when you fire a weapon. Turrets don't count, however, and in 1.82 cloaking doesn't automatically break hostility so they'd keep firing.
Then I'd call that a bug. Turrets firing ought to disable cloaking too. Especially given the bolded part above.
Probably cloaking should disable turrets, or you might find it very difficult to actually cloak a ship with them once combat had started.

Post Reply