Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover

IL-2 Sturmovik: Cliffs of Dover Latest instalment in the acclaimed IL-2 Sturmovik series from award-winning developer Maddox Games.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2011, 06:00 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Quote:
Originally Posted by jimbop View Post
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
     }
}

Last edited by FG28_Kodiak; 08-12-2011 at 07:33 AM.
Reply With Quote
  #2  
Old 08-12-2011, 08:18 AM
jimbop jimbop is offline
Approved Member
 
Join Date: Jan 2011
Location: Australia
Posts: 1,064
Default

Thanks, will have a play! Out of interest how do you know which variables to use?
Reply With Quote
  #3  
Old 08-12-2011, 09:17 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Quote:
Originally Posted by jimbop View Post
Thanks, will have a play! Out of interest how do you know which variables to use?
You can examine the game dlls (in ..SteamApps\common\il-2 sturmovik cliffs of dover\parts\core , ..\bob) with for example Visual Studio:



or .Net Reflector


And then try and error
Reply With Quote
  #4  
Old 08-12-2011, 09:22 AM
jimbop jimbop is offline
Approved Member
 
Join Date: Jan 2011
Location: Australia
Posts: 1,064
Default

Thanks again FG28_Kodiak, great stuff.
Reply With Quote
  #5  
Old 08-12-2011, 10:42 AM
SEE SEE is offline
Approved Member
 
Join Date: Oct 2009
Posts: 1,678
Default

Big thanks Jimbop and FG28......excellent thread. Really useful info here! Going to set up a single mission in FMB using these script ideas and use it for intel gathering....
Reply With Quote
  #6  
Old 08-12-2011, 08:51 AM
335th_GRAthos 335th_GRAthos is offline
Approved Member
 
Join Date: Oct 2007
Posts: 1,240
Default

Awesome information!

Thanks to both of you!

~S~
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:36 PM.


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