Damage

From Bohemia Interactive Community
Revision as of 11:56, 11 August 2010 by Dwarden (talk | contribs)
Jump to navigation Jump to search

Vehicle settings

armor = 900; //strenght of the object, it is calculated together with object volume size! (bounding sphere calculated in geometry)

approx strength = (0.27/tgtRadius)^2 / armorInConfig

damageResistance = 0.004; // only for AI, to know when to shoot and when not.

changeDammage = (aInfo->hit)^2/target_armor*(0.27/tgtRadius)^2;

armorStructural=2.0; // the higher value the lower structural damage. Number divides each hit that is passed to total damage.

secondaryExplosion=-1; // value<0: calculate from fuel/ammo cargo + tanks and multiply with abs(value) // value>0: use value directly as hit in FuelExplosion

crewVulnerable = true; //if set to true, AI assumes it can hit the true even if their weapons are to weak to damage the vehicle the crew is in.

class Hit*** // definition of total armor percentage strenght for vehicle parts

{armor=0.5;material=51;name="kolo";visual="kolo";passThrough=1;minimalHit=0.01;} 
armor is percentage from maximum durability
name is selection from HITPOINT LOD
passThroug means damage passed to total damage
minimalHit added in arma2 patch, default is 0.01 (1/100 of total vehicle strenght), smaller hit will be ignored

(Arma2 1.04.59668) Engine uses bounding sphere of the hitzone to calculate how big volume of hitzone was hit. Such hitpoint can "consume" only the amount of damage that his volume can cover. Small (point) hitzones are calculated as 1/20 of whole model bounding sphere size.

// place model named ttank in game and this into init
ttank addEventHandler ["handleDamage",{hint format ['DAMAGE_ %1', _this]; _this select 2} ] 
when you hit the vehicle, onscreen tip will give you value of the last hit and hitzone name if present

FIRE GEOMETRY //content of model that defines shape and penetration. Surface materials in models define penetrability (distance in mm how far can "standard" bullet get through). Penetrability is based on bullet impact speed and angle. All components are calculated as homogeneous. In Arma2 it also counts with bullet caliber, that multiplies the trajectory distance through component. Component fully penetrable by bullet but deflecting grenade can be also defined old way with black.pac texture (OFP).

HITPOINT LOD //content of model that defines hitzones. When bullet hits fire geometry, distance to points from this lod is calculated

for weapon settings see Weapons settings