The heart of CFS2's remarkable damage modeling system is the damage box, a 3Dimensional volume within which damage can occur.
Damage boxes do not have to mirror the actual shape of your aircraft and have nothing to do with the flight characteristics of your aircraft, only how damage is assessed when a projectile (bullet) passes through the box.
The number of damage boxes for a model is normally lower than the number of systems, but you can create as many damage boxes as you like ... even put boxes inside other boxes. Several systems can be mapped to one damage box and one system can be mapped to several damage boxes.
Confused? Imagine a large cardboard box labeled "Nose Structure" ("box_name.0"). Now, toss a number of smaller boxes inside, each one labeled as a particular aircraft system; engine ("box_name.1"), gearbox ("box_name.2"), oil tank ("box_name.3"), fuel control ("box_name.4"), etc..
If you grasp this simple example, you understand the concept of the damage box.
For the purpose of damage assessment, CFS2 treats your aircraft as a cluster of damage boxes, each one containing one or more aircraft systems. Each aircraft system is assigned a certain damage tolerance and probability of being damaged.
During the simulation, CFS2 tracks every bullet fired by you or an enemy aircraft, always checking to see if a bullet trajectory passes through any viewable object. If an enemy bullet happens to pass through a damage box, several things happen.
CFS2 tags that damage box as having been hit once and examines the DP file to see which aircraft systems are mapped to it. It then and analyzes the strike probability for each system in the damage box to decide which system (if any) will take the hit.
CFS2 keeps track of the amount of damage suffered by every system on the aircraft and degrades the affected systems' strength with every bullet strike. It also checks the model's DP file to see if any special effects are to be activated (explosion, fire, smoke, etc.) depending on the amount of sustained damage.
Finally, every time an aircraft system is hit, CFS2 displays the message "(enemy aircraft) hit your (aircraft system)" or "You hit (enemy aircraft) (aircraft system)" on the screen to let you know the results.
CFS2 tracks every bullet fired by anyone through its entire trajectory.|
Realistically, bullets should gradually slow down in flight, be stopped on impact, or deflected, but they're not. It's possible for a bullet to pass through several damage boxes and damage multiple aircraft systems. It can even hit more than one plane!
One lucky shot could turn your aircraft into a fireball, while 20 rounds could just as easily miss every important system without effect.
The [BOXES] section of the damage profile is used to define an unlimited number of damage boxes.
In its most general form, a box entry looks like this ...
box.number=%box_name.number%,X1,Y1,Z1,X2,Y2,Z2 [,bullet_index1] [bullet_index2] ... [,bullet_indexN]
"box_name.number" is the name you defined in the [STRINGS] section.
box.number=name,X1,Y1,Z1,X2,Y2,Z2 [,bullet_index1] [bullet_index2] ... [,bullet_indexN]
"name" is any name you choose to identify the damage box.
Here's a typical example ...
box.1=Forward Fuselage,-0.56,-0.32,-1.74,0.56,1.39,1.05,37,38,39,41, 40,42,43,44,57,58,59,60,61,62,63,64
The parameters (separated by commas) are ...
Box number, used to reference the damage box from within the DP file. Box numbers begin with "0" and continue in order for as many damage boxes as you need to define.
Box name (for user convenience only).
If you use the placeholder, "%box_name.number%" here, CFS2 will replace it with the name you defined under [STRINGS] for this box number. For example, using the string definitions above, CFS2 will automatically replace the string %box_name.0% with the string Nose.
X1, Y1, Z1 coordinates (meters) are always the lower left aft corner of the box and define one end of the diagonal across the damage box. They are measured from the aircraft origin (0,0,0).
X2, Y2, Z2 coordinates (meters) always the upper right forward corner of the box and define the opposite end of the diagonal across the damage box. They are measured from the aircraft origin (0,0,0).
[,bullet_index1] [,bullet_index2] ... [,bullet_indexN] Optional. These are the index values that designate which bullet holes will be tracked for this model.
The integers [,bullet_index1] [,bullet_index2] ... [,bullet_indexN] are optional, but you need them if you're going to display bullet holes. There are 120 index values ranging from 1 to 120.
The order of the integers for a given damage box doesn't matter, but the value range is important, since they relate to specific aircraft systems.
Once you finish creating the damage boxes for your model, you've defined where the aircraft may be hit.
Now we'll take a look at the [SYSTEMS] section of the damage profile to define which aircraft structures, systems and components will be affected by combat damage.