Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#3377231 - 08/29/11 09:45 AM How to show details of enemy plane damage  
Joined: Mar 2011
Posts: 82
jimbop Offline
Junior Member
jimbop  Offline
Junior Member

Joined: Mar 2011
Posts: 82
Australia
I haven't been too active on this site but this might be worth sharing for anyone who doesn't visit the banana forum: http://forum.1cpublishing.eu/showthread.php?t=25337. Only useful on single player (unless incorporated into the server side) but you can use this simple script to get real-time damage reports on any aircraft you damage. Very interesting to see what havoc your custom loadout is wreaking!


Custom magnetic stick, control box and pedals | EVGA GTX480 superclock | i7 2600k @ 4.5 | GA-P67A-UD4-B3 | 8GB DDR3 1666 Corsair Vengeance | Antec 1200W TruePower | Windows 7 64-bit | FT clip + modded Logitech Fusion
Inline advert (2nd and 3rd post)

#3377243 - 08/29/11 11:01 AM Re: How to show details of enemy plane damage [Re: jimbop]  
Joined: Feb 2001
Posts: 1,680
ATAG_Snapper Offline
Member
ATAG_Snapper  Offline
Member

Joined: Feb 2001
Posts: 1,680
Kitchener, Ontario, Canada
Thanks for posting this, Jimbop. My gunnery needs a lot of work and this is just the ticket!


-------------------------------------------------------------------------------------------------

HP Omen Laptop 15, AMD Ryzen 5 5600H 16 GB DDR4 RAM, NVIDIA GeForce RTX 3060 Laptop GPU 6 GB VRAM Win 11 64 bit, Nvidia GeForce Driver ver 512.95, TrackIR 5, Gear Falcon Trim Box, Gear Falcon Throttle Quadrant, TM16000 joystick, TM Warthog HOTAS, CH Quadrant, Saitek Pro Combat rudder pedals
#3377724 - 08/30/11 12:15 AM Re: How to show details of enemy plane damage [Re: jimbop]  
Joined: Jan 2011
Posts: 283
Tell Offline
Member
Tell  Offline
Member

Joined: Jan 2011
Posts: 283
First of all I am unable to paste the script into FMB script module from notepad. If I right click I get option to "compile". Second, I am not about to register at 1C just to get the sample .zip files. Third, I entered the script into FMB manually and when I compiled it I got several errors. If someone can make the .zip files available within SimHQ I'd be glad to try again.

#3377736 - 08/30/11 12:30 AM Re: How to show details of enemy plane damage [Re: Tell]  
Joined: Jan 2009
Posts: 4,737
FearlessFrog Offline
Senior Member
FearlessFrog  Offline
Senior Member

Joined: Jan 2009
Posts: 4,737
Tell, it's some c-sharp code, so you need to make a new file called the same name as the mission you want to play but with the file suffix '.cs' on the end. Also place it in the same directory as your .mis file. Paste this text into the empty file, say 'mission1.mis', save it and play 'mission1'.



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
}

}
}


I hope that helps, else search here for Frogbar where I showed something similar.

#3377743 - 08/30/11 12:51 AM Re: How to show details of enemy plane damage [Re: jimbop]  
Joined: Mar 2011
Posts: 82
jimbop Offline
Junior Member
jimbop  Offline
Junior Member

Joined: Mar 2011
Posts: 82
Australia
You don't need a separate file, pasting into the script window in FMB works fine. Here is an example SP mission with the script in place:

http://www.mediafire.com/?fuhv3lmokung65t


Custom magnetic stick, control box and pedals | EVGA GTX480 superclock | i7 2600k @ 4.5 | GA-P67A-UD4-B3 | 8GB DDR3 1666 Corsair Vengeance | Antec 1200W TruePower | Windows 7 64-bit | FT clip + modded Logitech Fusion
#3377748 - 08/30/11 12:59 AM Re: How to show details of enemy plane damage [Re: jimbop]  
Joined: Jan 2009
Posts: 4,737
FearlessFrog Offline
Senior Member
FearlessFrog  Offline
Senior Member

Joined: Jan 2009
Posts: 4,737
I've not really played with the FMB like that as I normally compile add-ons outside it - great that you can do that too.

#3378565 - 08/31/11 03:29 AM Re: How to show details of enemy plane damage [Re: jimbop]  
Joined: Jan 2011
Posts: 283
Tell Offline
Member
Tell  Offline
Member

Joined: Jan 2011
Posts: 283
Thanks for Dornier.mis. I had to select "show console output" in window to see the damage log.

#3378567 - 08/31/11 03:31 AM Re: How to show details of enemy plane damage [Re: FearlessFrog]  
Joined: Jan 2011
Posts: 283
Tell Offline
Member
Tell  Offline
Member

Joined: Jan 2011
Posts: 283
The script works. Thanks for the tutorial!

#3378593 - 08/31/11 04:18 AM Re: How to show details of enemy plane damage [Re: jimbop]  
Joined: Mar 2011
Posts: 82
jimbop Offline
Junior Member
jimbop  Offline
Junior Member

Joined: Mar 2011
Posts: 82
Australia
No problem. It's interesting to see the differences in damage models for each aircraft. I get the feeling the Dorniers are not quite as thorough as the Heinkels, for instance.


Custom magnetic stick, control box and pedals | EVGA GTX480 superclock | i7 2600k @ 4.5 | GA-P67A-UD4-B3 | 8GB DDR3 1666 Corsair Vengeance | Antec 1200W TruePower | Windows 7 64-bit | FT clip + modded Logitech Fusion
#3383676 - 09/06/11 03:16 PM Re: How to show details of enemy plane damage [Re: jimbop]  
Joined: Jan 2011
Posts: 283
Tell Offline
Member
Tell  Offline
Member

Joined: Jan 2011
Posts: 283
Would be nice to be able to see %'s fuel remaining, flap position and engine damage texts.


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
10 years after 3/8/2014
by NoFlyBoy. 03/17/24 10:25 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0