Can I find out what just killed me?

General discussion for players of Oolite.

Moderators: winston, another_commander

rayner
Above Average
Above Average
Posts: 18
Joined: Sat Feb 23, 2013 6:28 pm

Can I find out what just killed me?

Post by rayner »

Hi all,

Anyone know if it's possible to find out what just destroyed my ship?

I had a pretty ironassed Cobra Mk. III with nearly all the available equipment, including shield boosters, military shield enhancement, and an energy unit (not a naval energy unit, though, I hadn't got as far as that mission). I was chasing an Asp (offender) that was running away using its witchfuel injectors. A Krait and a Galcop Viper, also both with witchfuel injectors, were chasing it too. Then, completely unexpectedly, I exploded. My military laser was close to overheating, so my energy banks can't have been full, but my shields were still in the green (I think they were full, in fact) and I'm sure my energy level wasn't anywhere near red. I didn't hear any laser fire, and there were no missiles or space debris on the radar.

The only thing I can think of is that one of the other ships activated its witchfuel injectors and crashed into me. But it'd be nice to know what the heck happened. Are there any logs or debug messages that might tell me?

I'm using Oolite 1.76.1 on Windows XP with no OXPs installed.

Thanks for any ideas, or even vague clues!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Can I find out what just killed me?

Post by Cody »

Hi rayner, and welcome aboard. I think that would've required some specific logging and/or having the console running to identify the reason for your ship exploding. That's all boffinry, which I know zilch about. I would recommend updating to Oolite 1.77 though - well worth it.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Can I find out what just killed me?

Post by another_commander »

Paste the below in a file called script.js, save and then put script.js inside <OoliteInstallationFolder>/AddOns/Config (create the folder if it does not exist):

Code: Select all

this.shipTakingDamage = function(amount, comingFromEntity, damageType)
{
	log("jstest.shipTakingDamage", "Player ship taking " + amount + " damage by " + comingFromEntity + " by means of " + damageType);
}
Next time you take unexpected damage, look inside Latest.log. You will find the information you need written there. Note that taking 0 damage means that your shields are taking hits. Non-zero damage is when the hull gets damaged directly.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Can I find out what just killed me?

Post by Cody »

See... boffinry! As you're on XP, I'd add the usual caveat... best not to create/edit Oolite files in Windows Notepad.
Windows Wordpad is usable (I think), but Notepad++ is free and highly recommended.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
rayner
Above Average
Above Average
Posts: 18
Joined: Sat Feb 23, 2013 6:28 pm

Re: Can I find out what just killed me?

Post by rayner »

That looks really useful, thanks! I've created the script.js file and the damage reports are showing up in the log.

I suppose I'll never know for sure what wrote off my ship, but at least if anything like it happens again I'll be able to see why.

Now for attempt number 3 to get a commander to "Elite" rating without dying on the way... :-)

Thanks again to both of you!
User avatar
maaarcooose
---- E L I T E ----
---- E L I T E ----
Posts: 397
Joined: Sun May 29, 2011 9:36 pm
Location: Devon, UK
Contact:

Re: Can I find out what just killed me?

Post by maaarcooose »

El Viejo wrote:
See... boffinry! As you're on XP, I'd add the usual caveat... best not to create/edit Oolite files in Windows Notepad.
Windows Wordpad is usable (I think), but Notepad++ is free and highly recommended.
And thankfully unlike some others, you're not recommending vim to a windows user.

Notepad++ is a great tool.

!m!
Trading computers and writing stuff....
Website: http://www.theramist.co.uk/
OOliteInfo: http://www.theramist.co.uk/ooliteinfo/oo.php
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: Can I find out what just killed me?

Post by GGShinobi »

maaarcooose wrote:
And thankfully unlike some others, you're not recommending vim to a windows user.

Notepad++ is a great tool.

!m!
Hey, gvim is a great tool, too, and it's the most powerful editor I know (besides emacs perhaps)!

But I give you that it's perhaps not the most intuitive editor, especially not for people used to do everything with the mouse and in GUIs (like most windows-users probably are).

On the other hand - does Notepad++ offer such a fun way to learn it like vim has? :P
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
rayner
Above Average
Above Average
Posts: 18
Joined: Sat Feb 23, 2013 6:28 pm

Re: Can I find out what just killed me?

Post by rayner »

Funnily enough, I really like vim (although I'm certainly no power user). Never really got on with gvim on Windows, though - it just sort of makes me frustrated that everything else doesn't act Unix-like as well.

Anyway, eventually I'll figure out why my wi-fi card doesn't quite work with my Linux installation, and then all of the other problems go away too :-)

:wq
User avatar
maaarcooose
---- E L I T E ----
---- E L I T E ----
Posts: 397
Joined: Sun May 29, 2011 9:36 pm
Location: Devon, UK
Contact:

Re: Can I find out what just killed me?

Post by maaarcooose »

rayner wrote:
Funnily enough, I really like vim (although I'm certainly no power user). Never really got on with gvim on Windows, though - it just sort of makes me frustrated that everything else doesn't act Unix-like as well.
:wq
Exactly my point, and I still have to try and stop myself typeing :x or :q! in every other editor.

Hmmm, why doesn't my SQL query work, oh yeah that will be because it's got :x stuck in the middle of it.
GGShinobi wrote:
On the other hand - does Notepad++ offer such a fun way to learn it like vim has? :P
Of course not, it doesn't need it. :mrgreen:
That's great though, I'm gonna have a good go at that. I love the fact that the first thing it said was 'Oh okay, you can use the cursor keys.'

!m!
Trading computers and writing stuff....
Website: http://www.theramist.co.uk/
OOliteInfo: http://www.theramist.co.uk/ooliteinfo/oo.php
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: Can I find out what just killed me?

Post by GGShinobi »

maaarcooose wrote:
Of course not, it doesn't need it. :mrgreen:
Very good point! :mrgreen:
maaarcooose wrote:
That's great though, I'm gonna have a good go at that. I love the fact that the first thing it said was 'Oh okay, you can use the cursor keys.'
lol :lol: never saw that! That's cool! :mrgreen:
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Can I find out what just killed me?

Post by Eric Walch »

GGShinobi wrote:
On the other hand - does Notepad++ offer such a fun way to learn it like vim has? :P
Very interesting manual. :D

The few times I used an editor on the command-line, it was nano, but I just discovered that the mac also has a vim editor installed. :P
(Syntax: vi path)
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Can I find out what just killed me?

Post by Switeck »

This is useful enough to know that I would love to see this incorporated into Oolite itself.
We could use it for debugging purposes as well.

An OXP for to do something similar for NPCs might help dig deeper into the issues with dead-but-still-targeted NPC ships.
User avatar
Mara Jade
Average
Average
Posts: 9
Joined: Mon Feb 16, 2009 10:44 am

Re: Can I find out what just killed me?

Post by Mara Jade »

[quote="another_commander"]Paste the below in a file called script.js, save and then put script.js inside <OoliteInstallationFolder>/AddOns/Config (create the folder if it does not exist):

Code: Select all

this.shipTakingDamage = function(amount, comingFromEntity, damageType)
{
	log("jstest.shipTakingDamage", "Player ship taking " + amount + " damage by " + comingFromEntity + " by means of " + damageType);
}
Glad you posted that I added it last week.

I died mysteriously yesterday within the Station Aegis space, so I looked it up on the log.

Turns out that I flew into the Navigation buoy while I was looking at the market prices in another window! lol
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Can I find out what just killed me?

Post by Tricky »

Mara Jade wrote:
another_commander wrote:
Paste the below in a file called script.js, save and then put script.js inside <OoliteInstallationFolder>/AddOns/Config (create the folder if it does not exist):

Code: Select all

this.shipTakingDamage = function(amount, comingFromEntity, damageType)
{
	log("jstest.shipTakingDamage", "Player ship taking " + amount + " damage by " + comingFromEntity + " by means of " + damageType);
}
Glad you posted that I added it last week.

I died mysteriously yesterday within the Station Aegis space, so I looked it up on the log.

Turns out that I flew into the Navigation buoy while I was looking at the market prices in another window! lol
:lol: Search for the Darwin Awards thread within this forum and submit that. It is more than worthy. :lol:
User avatar
Mara Jade
Average
Average
Posts: 9
Joined: Mon Feb 16, 2009 10:44 am

Re: Can I find out what just killed me?

Post by Mara Jade »

Tricky wrote:
Mara Jade wrote:

Turns out that I flew into the Navigation buoy while I was looking at the market prices in another window! lol
:lol: Search for the Darwin Awards thread within this forum and submit that. It is more than worthy. :lol:
Thanks, I found the thread and will have fun reading it, but Cmdr McLane beat me to it three years ago with the second post. :D
Post Reply