The Damage Profile

The Damage Profile, or DP file, is used by CFS2 to define and assess aircraft damage and to assign a variety of ordnance types for an aircraft model. The last half of a DP file contains weapon specifications sections, which include gunstations, hardpoints and payloads.

To give you an idea of its importance, here's how CFS2 uses the information in the DP file.

Suppose you're in a dogfight with an enemy aircraft. He's perfectly lined up in your gunsight and you pull the trigger.

A lot of things start to happen almost simultaneously.

  • The sound file specified for your weapon type in the gunstation entry is sent to your speakers
  • A gun flash effect appears at the muzzle of each weapon firing.
  • Bullets emanate from the muzzle at a rate specified in the gunstation entry.
  • Your ammo supply will be depleted according to the firing rate and the time you hold down the trigger.
  • Your aircraft's weight is reduced by the amount of ammo fired.
  • Tracer rounds are visible at the rate specified in the gunstation entry.
  • CFS2 tracks the bullet trajectories, adjusting them for gravity, and tests to see if a bullet passes through any object or hits the ground.
  • If no object is hit, CFS2 continues to track the bullets for the time alive parameter in the gunstation entry
  • If some of your bullets cross the position of your target, let's say intercepting the right wing damage box of the enemy plane, more action comes into play.
  • CFS2 examines the boxmap of the DP file for the target aircraft and learns which systems are mapped to that box.
  • CFS2 makes a quick lottery based on the hit probabilities for each system in the damage box to decide which system will take the hit.
  • The strength of the damaged system is depleted according to the damage potential of your weapon as specified in the gunstations entry.
  • Based on the special effects settings in the target airplane's DP file, CFS2 displays the visual effects of your shooting skill ... flashes, smoke puffs, debris flying, etc..
  • CFS2 displays a message on your screen saying, "You hit ---"
  • CFS2 continues to track the bullet through the rest of its trajectory.

The DP file, e.g. myairplane.dp, is a plain ASCII text file, which means you can edit the information using any text file editor such as Microsoft's WordPad. It may seem like quite a challenge to modify a DP file, but the more you do it the easier it gets.

An easy way to start this process is to copy the damage profile from a similar aircraft and paste it into your model's directory. Rename the DP file to match that of your model and you're ready to go.

NOTE
Whenever CFS2 encounters an aircraft that does not have a DP file, it will use default.dp, which resides in the AIRCRAFT folder. If you download a plane made for FS98, for example, and copy it to CFS2, it will fly with the default.dp. It will let you fly your model, but it can also cause trouble since the default DP file may not accurately reflect your aircraft.

About the only things you can edit in an "imported" DP file are the [STRINGS], [EFFECTS] and [PAYLOADS] sections, but it gives you a head start on developing the DP file for your own model.

After you edit a DP file, you'll want to test it out. Save the edited file, then open CFS2 and select either "Free Flight" or "Quick Combat." Select your aircraft model and click "Fly Now."

Testing usually involves checking gun flashes to see if they are where they should be, that breaking parts actually break and that ordnance releases from the aircraft when triggered.

If more editing is needed (it usually is), exit "Free Flight" or "Quick Combat" by pressing the "Esc" key. Return to your editor, make your changes, and save the edited DP file. Return to CFS2 and continue testing.

NOTE
Each time you fly your aircraft ... or any aircraft ... CFS2 automatically creates a .cdp file - Cached Damage Profile - e.g. myairplane.cdp in the same directory as the DP file. The CDP file is used to make the game perform more efficiently.

If a CDP file exists in the aircraft folder, CFS2 will use it instead of the DP file. After making changes to a damage profile, always delete the CDP file for that aircraft before flying the model. That way, the newly created CDP file will reflect your changes.

The DP file is comprised of several sections, each of which is used to define either a passive (defensive) or active (offensive) function. These sections are ...

[STRINGS]
...
[BOXES]
...
[BOXMAPS]
...
[EFFECTS]
...
[GUNSTATIONS]
...
[GUNS.n]
...
[HARDPOINTS]
...
[PAYLOADS]
...
[PAYLOADS.n]
...
[EXTRAS]
...

NOTE
Position coordinates in the damage profile are measured in meters.

If you designed your aircraft using feet, be sure to convert your coordinates to meters before entering coordinate data in the damage profile.

If you are editing an existing .dp file, remember the coordinate data is in meters.

1 meter = 3.281 feet
1 foot = 0.3048 meters

X axis: Pitch axis ... horizontal sideways ... (+) right, (-) left.
Y axis: Yaw axis ... vertical, up and down ... (+) up, (-) down.
Z axis: Roll axis ... horizontal fore and aft ... (+) fwd, (-) aft.

System strings

The [STRINGS] section assigns names, or "text strings" to each damage box, system and payload number. The strings can contain any words you like. This is the string displayed on your screen when the system takes damage.

This section is normally found at the bottom of the DP file, but may be placed anywhere. Placing it at the top of your DP file makes it easier to define and locate the names for various systems, boxes and payloads for your aircraft.

There are three types of [STRINGS] you can define:

"box_name.n"    "system_name.n"    "payload_name.n"

where,
   "box_name.n" is used to name damage boxes,
   "system_name.n" is used to name aircraft systems, and
   "payload_name.n" is used to name aircraft ordnance.

Each "name" is consecutively numbered from ".0" through as many names as you want to include. Here are some typical examples for each string type ...

[STRINGS]
"box_name.0"=Nose
"box_name.1"=Forward Fuselage
"box_name.2"=Cockpit
etc. ....

If you set up 12 damage boxes for your aircraft, you'll need to define "box_name.0" through "box_name.11."

"system_name.0"=Prop Hub/Engine Gearbox
"system_name.1"=Engine Cylinders
"system_name.2"=Engine Accessory Gearbox
etc. ....

If you set up 45 aircraft systems for your aircraft, you'll need to define "system_name.0" through "system_name.44."

"payload_name.0"=Guns Only
"payload_name.1"=Guns Only Long Range
"payload_name.2"=Bombs Heavy
etc. ....

If you set up 10 weapon packages, or loadouts, for your aircraft, you'll need to give names to "payload_name.0" through "payload_name.9."

The name you give a weapon package appears in CFS2 in the Loadout pull-down menu under "Player Aircraft." Beneath the selected loadout, CFS2 displays the type and number of weapons carried in that package.

Now that you have a rough idea of what the damage file is used for, let's get down to the details, beginning with a closer look at the Damage Box.