1C Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official 1C Company forum > 1C 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 1C: Maddox Games.

Reply
 
Thread Tools Display Modes
  #21  
Old 08-12-2011, 10:17 AM
FG28_Kodiak FG28_Kodiak is offline
Senior 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
  #22  
Old 08-12-2011, 10:22 AM
jimbop jimbop is offline
Senior Member
 
Join Date: Jan 2011
Location: Australia
Posts: 1,064
Default

Thanks again FG28_Kodiak, great stuff.
Reply With Quote
  #23  
Old 08-12-2011, 11:42 AM
SEE SEE is offline
Senior 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
  #24  
Old 09-01-2011, 11:44 AM
topgum's Avatar
topgum topgum is offline
Approved Member
 
Join Date: Sep 2010
Posts: 75
Default

Quote:
Originally Posted by jimbop View Post
This is how you can get a real-time damage report on enemy aircraft in single player. First, acknowledgements to FG28_Kodiak in this thread, post 15. I'm reposting because I don't think this got the coverage it deserved and also to include a few specific instructions for those who haven't used script before. Also, there are some screenshots!

I find this really useful in learning how to target enemy aircraft since you get immediate information which is much more detailed than seeing a bit of aircraft fall off. I find it interesting how much lead you can pour into a bomber from their six without any damage whatever whereas a single shot in just the right place has dramatic effect.

Instructions:

1. Open a single mission in FMB. You can use either of the attached examples at the bottom of this post if you haven’t made your own.

2. Click Edit, Script and then click on the Script tab.

3. Paste FG28_Kodiak’s code in the window and save:

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);
    	
    	if (DamageFrom.Player != null )
    	{
    	    GamePlay.gpLogServer (null, "{0} hits {1} : {2} \n", new object [] {DamageFrom.Player, shortName, WhatDamaged});//Test
      }
    	
    }
}
That's it, just save the mission and play. When you fire successfully on an aircraft (not just enemy) you will see a damage report as in this screenshot (click to enlarge):


on Flickr

And as you can see you still get the usual status messages, in this case after the enemy has crashed:


on Flickr

The mission which these screenshots were taken from is attached (Dornier_Hunt_1, a very simple training mission I use). FG28_Kodiak's original mission (OnAircarftDamaged1) is also attached. You can open either of these in FMB and see the script as described above. To fly them you should extract the two files to your Documents\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Single folder. You can then find it in the Single Missions menu.

Attachment 6868

Attachment 6869

Enjoy and thanks again to FG28_Kodiak!
hi jimbop,
I tried the trainingsmissions also after having no effect by pasting the script in FMB - but nothing?????? What are I am doing wrong, is there something to activate in the console or in the displaying-in-game-windows?
thnx a lot
__________________
"the fun is allways in the sun!"


Mysn P501 NB - Win7/64 - I7-2760@2,6Ghz - 8 GigRAM - Gtx485m@2Gig - Res 1920x1080 / 1400x1050 projected
TIR5, Thrustmaster16000, Rudderpedals & Quadrant by Saitek, Belkin n52te-gamepad, modified CyborgUSB-elevatortrim
Reply With Quote
  #25  
Old 09-01-2011, 12:03 PM
Gourmand Gourmand is offline
Senior Member
 
Join Date: Jun 2010
Posts: 208
Default

http://r2.repka.su/ a server log the details of dommage too...
question... how scripting for multi?
onaircraftdamaged() do not work in multi... :/
Reply With Quote
  #26  
Old 09-01-2011, 12:15 PM
jimbop jimbop is offline
Senior Member
 
Join Date: Jan 2011
Location: Australia
Posts: 1,064
Default

Quote:
Originally Posted by topgum View Post
hi jimbop,
I tried the trainingsmissions also after having no effect by pasting the script in FMB - but nothing?????? What are I am doing wrong, is there something to activate in the console or in the displaying-in-game-windows?
thnx a lot
By training mission do you mean one of the SPs I uploaded? You might have changed your information windows if you see no damage reports. I think you can reset them.
Reply With Quote
  #27  
Old 09-01-2011, 12:43 PM
Ataros Ataros is offline
Senior Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,438
Default

Quote:
Originally Posted by Gourmand View Post
http://r2.repka.su/ a server log the details of dommage too...
question... how scripting for multi?
onaircraftdamaged() do not work in multi... :/
It is scripted in this mission http://forum.1cpublishing.eu/showthread.php?t=24954
Open the scripts to see how it is done.
Reply With Quote
  #28  
Old 09-02-2011, 05:57 PM
topgum's Avatar
topgum topgum is offline
Approved Member
 
Join Date: Sep 2010
Posts: 75
Default

Yes, jimbop, i meant the files which you uploaded. I checked it once more by creating a 2nd info-window and both are showing my one damages, but not the hits on the oponents
thank you all for replies!

Quote:
Originally Posted by jimbop View Post
By training mission do you mean one of the SPs I uploaded? You might have changed your information windows if you see no damage reports. I think you can reset them.
__________________
"the fun is allways in the sun!"


Mysn P501 NB - Win7/64 - I7-2760@2,6Ghz - 8 GigRAM - Gtx485m@2Gig - Res 1920x1080 / 1400x1050 projected
TIR5, Thrustmaster16000, Rudderpedals & Quadrant by Saitek, Belkin n52te-gamepad, modified CyborgUSB-elevatortrim
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 07:15 AM.

Based on a design by: Miner Skinz.com

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © 2007 1C Company. All rights reserved.