Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   IL-2 Sturmovik: Cliffs of Dover (http://forum.fulqrumpublishing.com/forumdisplay.php?f=189)
-   -   How to show details of enemy plane damage (http://forum.fulqrumpublishing.com/showthread.php?t=25337)

Blackdog_kt 08-11-2011 05:35 PM

Great find and not just for training.

This script will actually help display the damage model's capabilities to a very good extent.

DUI 08-11-2011 08:49 PM

Nice! Especially, for quick missions it is very interesting to see how the aircrafts slowly/quickly fall apart.

jimbop 08-11-2011 09:56 PM

I've noticed that I never see damage from fire. Often a second pass after springing a fluid leak will result in a fire. Whilst I see the initial damage (i.e. fuel leak or oil leak) there doesn't seem to be any additional damage from the fire.

Have any of you guys noticed fire damage?

Strike 08-11-2011 10:05 PM

For me fire only seems to deal visual damage, rip off panels, control surfaces and damage the player. Engine fires seem like a whole separate story though. They look and act different.. And don't spread :P

Blackdog_kt 08-11-2011 10:15 PM

It's very noticeable in terms of aerodynamic handling (especially if fabric covered control surfaces get damaged) and its dynamic nature makes it even more interesting.

Some time ago i was messing around in QMB, flying a 110 against some Hurricanes. I met the last surviving Hurricane in a head-on pass, i knew he'd get good hits on me but though "ah, what the hell" and went for it just to see how it would turn out.

I did get a pilot kill and damaged his aircraft too (engine on fire) but he flamed my no 1 engine as well: everything was shot up, magnetos, radiators, fuel tanks and to top it off the prop governor was inoperable so i had to make the trip back to France on one engine and the other propeller windmilling at almost full drag (i was climbing during the head-on so i had fine pitch selected).

I trimmed for as close as it could go in terms of level flight and started on the way back to base just to see how the damage model would perform.

There was a fire on the left wing that was mostly under control and since my left wing tanks were exhausted after a while due to the leaks and fire, i wasn't worried about exploding.

Well, the moment i started slowing down a bit at a safe altitde to explore the handling and possible changes in trim i would need for the crash landing, the fire started spreading. After a few seconds i got a message that the gunner was dead.

It was now evident that i wouldn't make it over land with my current altitude and descent rate (i was barely short of clearing the cliffs on the coast) so i decided to ditch in the water. Well, the moment i really slowed down to deploy some flaps is when all hell broke loose, because the fire engulfed the entire left wing. Even though there was not much in terms of graphical damage on the wing skin, the change in aerodynamics was so pronounced that i entered an uncontrollable left roll (and resulting nose down pitch) and crashed into the water at about 60-70 degrees of bank.

Definitely one of the best missions i've had and it reminds me of my silent hunter 3 days: initially i was careful and loading my saved games when the convoy escorts started pinging me, until i realized that i was missing half the game. The real fun was getting into rough situations and seeing how things will unfold and the fact that the same thing applies to CoD is a big plus for me.

machoo 08-11-2011 10:19 PM

Where do you 'edit' the script. No edit button. I can delete it , but cant copy and paste.

jimbop 08-11-2011 10:27 PM

Quote:

Originally Posted by machoo (Post 322720)
Where do you 'edit' the script. No edit button. I can delete it , but cant copy and paste.

Click in the script box and Ctrl+V to paste.

FG28_Kodiak 08-12-2011 06:00 AM

Quote:

Originally Posted by jimbop (Post 322709)
I've noticed that I never see damage from fire. Often a second pass after springing a fluid leak will result in a fire. Whilst I see the initial damage (i.e. fuel leak or oil leak) there doesn't seem to be any additional damage from the fire.

Have any of you guys noticed fire damage?

The script only reports damage initiated from players. If you need all damage informations you must delete the if (DamageFrom.Player != null ) clause.
so the code should look like:

Code:

using System;
using maddox.game;
using maddox.game.world;

public class Mission : maddox.game.AMission
{

    public override void OnAircraftDamaged(int missionNumber, string shortName, AiAircraft Aircraft, AiDamageInitiator DamageFrom, part.NamedDamageTypes WhatDamaged)
    {
            base.OnAircraftDamaged(missionNumber, shortName, Aircraft, DamageFrom, WhatDamaged);
           
                GamePlay.gpLogServer (null, "{0} hits {1} : {2} \n", new object [] {DamageFrom.Player, shortName, WhatDamaged});//Test
           
    }
}

if you would like to see the structural damage also, you can add OnAircraftLimbDamaged(..), may be a little too much information ;), so without filtering it's only for testing.
complete code:
Code:

using System;
using maddox.game;
using maddox.game.world;

public class Mission : maddox.game.AMission
{

    public override void OnAircraftDamaged(int missionNumber, string shortName, AiAircraft Aircraft, AiDamageInitiator DamageFrom, part.NamedDamageTypes WhatDamaged)
    {
            base.OnAircraftDamaged(missionNumber, shortName, Aircraft, DamageFrom, WhatDamaged);
           
                GamePlay.gpLogServer (null, "{0} hits {1} : {2} \n", new object [] {DamageFrom.Player, shortName, WhatDamaged});//Test
           
    }

    public override void OnAircraftLimbDamaged(int missionNumber, string shortName, AiAircraft aircraft, AiLimbDamage limbDamage)
    {
        base.OnAircraftLimbDamaged(missionNumber, shortName, aircraft, limbDamage);       
       
        GamePlay.gpLogServer (null, "{0}: {1} Limb: {2}\n", new object [] { (limbDamage.Initiator.Actor as AiAircraft).Player(0), shortName, limbDamage.LimbId});//Test
    }
}


jimbop 08-12-2011 08:18 AM

Thanks, will have a play! Out of interest how do you know which variables to use?

335th_GRAthos 08-12-2011 08:51 AM

Awesome information!

Thanks to both of you!

~S~


All times are GMT. The time now is 04:19 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.