Jump to content

AI: S_EVENT_CRASH and S_EVENT_ENGINE_SHUTDOWN not always together.


Pikey

Recommended Posts

In terms of AI (exclude player dead and that kettle of fish) I'm trying to track kill counts, and AI aircraft are messing with me because there isn't a single way to measure the aircraft removed via EVENTS. You can get a S_EVENT_CRASH only when it hits the floor. But if it explodes in mid air, you get an S_EVENT_ENGINE_SHUTDOWN without the crash. Now given certain airframes like to crash gracefully in AI and some can get hit and shutdown before they crash or before they explode, you end up with combinations of either Shutdown on it's own, Crash on it's own or Shutdown then crash together.

 

Is anyone successfully using these to track kill counts of AI? Should there always be an EVENT_ENGINE_SHUTDOWN with a CRASH event, for simplicity? Seems that missing the engine shutdown at the crash might be a bug, depending on the way this is viewed. Either way, taking all these different types of EVENTs as completely to the letter of the description is counter intuitive to trying to use them in some instances like tracking planes actually crashing/dying.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Might it be better to count EJECT or PILOT_DEAD?

The two are mutually exclusive and both guarantee the plane is a goner.

Nope, because that only applies to Player and Client slots. That was fun finding out too.

 

There is no mutually exclusive ending for aircraft as a DCS event. That's the issue.

 

Crash - it hit the ground (AI+Client) (not called if it blew up)

Shutdown - the engines went off, either deliberately or whilst it was in the air(AI) (can be present if the engine stopped when on a runway, or if it shutdown midflight)

Pilot dead - The pilot died (Client/Player)

Pilot ejected - The pilot ejected (Client Player)

 

This is before we get to Land which can work outside of an airfield and won't neccessarily be on either a runway.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Hi Pikey,

Sorry but I don't think that is correct about the pilot eject and dead events. I believe they apply to AI too, not only do you see these events listed for AI in post mission debriefs generated by the game but also you can test it easily using missions like the one attached.

 

 

<edit> you need about strength 100 to get a pilot kill event

 

 

 

 

 

...

Crash - it hit the ground (AI+Client) (not called if it blew up)

Shutdown - the engines went off, either deliberately or whilst it was in the air(AI) (can be present if the engine stopped when on a runway, or if it shutdown midflight)

Pilot dead - The pilot died (Client/Player)

Pilot ejected - The pilot ejected (Client Player)

.................

event test.miz


Edited by Stonehouse
Link to comment
Share on other sites

I've already tested it bud, this is how I know.

Let me annotate the following log extract for you to demonstrate:

The situation is an AI vs AI endless spawn using MOOSE AI Dispatcher, all events are subscribed to, without limits or attaching to specific units. The log is stopped after many aircraft are downed.

 

line 310: F5 has an engine shutdown. No crash, pilot dead, or eject.

line 374: Hornet had a shutdown and then a crash (376), no dead or eject.

line 433: F5 has a shutdown. No crash, pilot dead or eject

line 492: Hornet has a shutdown, followed by crash (509), no dead or eject

line 506: F5 has a shutdown. No crash, pilot dead or eject

line 579: Hornet has a CRASH. No shutdown, dead, eject

line 627: Hornet has a Shutdown, followed by a crash on 630. No dead etc.

 

All the way through this AI only, the only event DEAD's are to do with the Hawk ground units, no AI planes.

 

Conclusion 1: Since a plane can get a shutdown and a crash, or just a shutdown, or just a crash, at least the F-18C in this case (presume patterns are damage modelling consistency) then you don't have a mutally exclusive ending or a consistent event pattern that can be used to track death without complexity.

 

Conclusion 2: Neither F-5 or F-18 AI report DEAD as mentioned. There might have not been an ejection at all but it's not important. In other scripts with players I can get dead, eject and crash. Thus I say no dead event for AI planes, just units.

samplelog.txt

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

OK very strange. If you look at the mission I attached in my first response it will only produce a message for the pilot eject and pilot killed events. So they still must happen regardless of what turns up in your log.......unless it is a MP v's SP thing??? Running in SP as gamemaster I see the eject and pilot kill events trigger the relevant message. ie I have set it up to issue a different message for each event.

 

 

Perhaps try an event handler outside of MOOSE too just in case that is somehow missing the events?

 

 

<edit> if you look at the events listed in the debrief picture you can see the indicated pilot kill and engine shutdown separate events listed for a 109. You can also see a pilot eject event for another 109 slightly lower down. The first aircraft exploded mid air when very badly hit by fire from a P51 and the second one the aircraft lost a wing and the pilot bailed out and there was a later crash event for this aircraft which is not shown in the pic. All the aircraft were AI.

 

 

<edit2> maybe I misunderstood.....you are looking for an aircraft dead event? then I think there is not one and you need to use the pilot bailed and dead events either by themselves or in combination with the crash and engine shutdown events.

Capture.thumb.JPG.164a6cece0d27780194f243985d91953.JPG


Edited by Stonehouse
Link to comment
Share on other sites

Ahhh wait, you might have led me to something. I was looking for Dead...not PilotDead which is a different handler. I didn't have that one running.

 

Yes, the idea is to look for single mutually exclusive deaths so I can count plane totals. Any complex multiple duplicates would involve painful coding that I will not bother with, and it seems that the plane "ending" will produce a variety depending on circumstances, which I believe is down to the damage it took and can be in patterns with some planes and weapons.

 

Will report back to see what I get and if I can make it meet my needs.

 

OK very strange. If you look at the mission I attached in my first response it will only produce a message for the pilot eject and pilot killed events. So they still must happen regardless of what turns up in your log.......unless it is a MP v's SP thing??? Running in SP as gamemaster I see the eject and pilot kill events trigger the relevant message. ie I have set it up to issue a different message for each event.

 

 

Perhaps try an event handler outside of MOOSE too just in case that is somehow missing the events?

 

 

<edit> if you look at the events listed in the debrief picture you can see the indicated pilot kill and engine shutdown separate events listed for a 109. You can also see a pilot eject event for another 109 slightly lower down. The first aircraft exploded mid air when very badly hit by fire from a P51 and the second one the aircraft lost a wing and the pilot bailed out and there was a later crash event for this aircraft which is not shown in the pic. All the aircraft were AI.

 

 

<edit2> maybe I misunderstood.....you are looking for an aircraft dead event? then I think there is not one and you need to use the pilot bailed and dead events either by themselves or in combination with the crash and engine shutdown events.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

So Eject/PilotDead works for over 90-95% of the situations. I've seen some failures to produce either one, but it's small. This is weird, again, not quite right, because one or other must happen, right?

 

I could use getLife() on a EventData.IniTypeName during a Hit event, quite easily determining an airframe write off, that would work for every scenario where a plane was hit by fire. But it loses the ability to check for AI that just did a CFIT, which, they do, meaning i'm again at that point where I would need to start comparing different events and ruling out duplicate EventData.IniTypeName's from the event result

 

Kindda irking something that should be 10 lines of code doesn't quite get it all and the alternative is 200 lines.

 

Right now, I have a complex air defence network of CAP and GCI, which degrades over time, is fully written to disk for inventories of aircraft and persists over mission restart. But the counting system with ED is just a tiny bit innacurate. Perhaps not enough to concern myself, but I don't like situations where things don't behave with 100% accuracy, it needles my OCD and someone maybe counting on paper!

 

I'm next working on the moving of CAP positions to replace depleted squadrons and perhaps a method of introducing a ferry event for a squadron relocation. I've run playtests for days speeded up (perhaps this is how EVENTs are missed??) and it all works awesomely, you can fish out an ORBAT from wikipedia and place the squadrons down and take on an entire country and watch behaviour over time change.

 

You would think that is the HARD part, am i right? Instead i'm dealing with core DCS things again and it kills my will to do anything good for this game.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

Ok really weird as previously eject and pilot dead (to me anyway) appeared watertight when I had used it.

 

Have you been able to isolate what situation is leaking through?

 

ie where the aircraft has been destroyed but the pilot neither ejects or is killed. I would have thought that the wreck hitting the ground would have killed the pilot too so a crash event would also have a linked pilot dead event triggered if they were still alive and had not ejected when the crash event was triggered. I don't think I have ever seen an AI belly land a badly damaged plane, usually they bail as soon as it gets that bad. What you are saying could be a previously undiscovered bug.

 

 

I guess you might have to add crash event monitoring too if somehow the eject and pilot dead doesn't cover it. I've noticed engine shutdown often occurs when the aircraft gets seriously damaged but then you get a pilot dead/eject and an eventual crash event so I believe you don't need to worry about monitoring for engine shutdown.

 

 

<edit> fyi I attacked the issue for GCICAP development versions differently as I tracked take offs and landings. So count of available airframes was decremented on take off and incremented on landing event. This wasn't because I believed eject/pilot dead was broken but simply because it was less work as GCICAP was already handling the landing event so I just went with the flow.


Edited by Stonehouse
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...