Damage

From Bohemia Interactive Community
Revision as of 14:59, 11 August 2010 by .kju (talk | contribs) (Improved structure and fixed a few spelling mistakes.)
Jump to navigation Jump to search

Vehicle settings

armor = 900; //strength 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 crew even if their weapons are too weak to damage the vehicle the crew is in.

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

{
 armor = 0.5;//percentage from maximum durability
 material = 51;
 name = "kolo";//selection from HITPOINT LOD
 visual = "kolo";
 passThrough = 1;//means damage passed to total damage
 minimalHit = 0.01;//added in arma2 patch, default is 0.01 (1/100 of total vehicle strength), 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.

Weapon settings

See Weapons settings.