Damage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - ";[ ]+ " to "; ")
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Vehicle settings =
= Vehicle settings =


'''armor''' = 900; ''//strenght of the object, it is calculated together with object volume size! (bounding sphere calculated in geometry)''
'''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
  approx strength = (0.27/tgtRadius)^2 / armorInConfig
Line 8: Line 8:
  changeDammage = (aInfo->hit)^2/target_armor*(0.27/tgtRadius)^2;
  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.
'''armorStructural''' = 2.0; // the higher value the lower structural damage. Number divides each hit that is passed to total damage.


'''secondaryExplosion'''=-1;
'''secondaryExplosion''' = -1;
// value<0: calculate from fuel/ammo cargo + tanks and multiply with abs(value)
// value<0: calculate from fuel/ammo cargo + tanks and multiply with abs(value)
// value>0: use value directly as hit in FuelExplosion
// 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.
'''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 strenght for vehicle parts''
'''class Hit***''' ''// definition of total armor percentage strength for vehicle parts''
  '''{armor=0.5;material=51;name="kolo";visual="kolo";passThrough=1;minimalHit=0.01;}'''
  {
'''armor''' is percentage from maximum durability
  armor = 0.5;//percentage from maximum durability
'''name''' is selection from HITPOINT LOD
  material = 51;
'''passThroug''' means damage passed to total damage
  name = "kolo";//selection from HITPOINT LOD
'''minimalHit''' added in arma2 patch, default is 0.01 (1/100 of total vehicle strenght), smaller hit will be ignored
  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.   
(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.   
Line 28: Line 31:
  when you hit the vehicle, onscreen tip will give you value of the last hit and hitzone name if present
  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).''
== Fire geometry ==


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


for weapon settings see [[Weapons settings]]
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.


[[Category:ArmA 2: Editing]]
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]].
 
= Infantry =
 
By [[User_talk:Q1184|Q1184]]:
 
Findings on indirectHit damage, tested on humans:
 
Dist <= indirectHitRange: damage = indirectHit * explosive
 
Dist > indirectHitRange: damage (x) ~= indirectHit * explosive * exp (-2.9 * x / indirectHitRange)
 
(where x is distance from the border of indirectHitRange zone, so full Dist = x + indirectHitRange)
 
damage here is damage caused to individual selections, as opposed to overall body damage. this damage then becomes moderated by overall armor and selection armor (setup in class Hitpoints).
 
resulting
selection damage = damage / (armor * selectionArmor)
 
Distances to individual selections are used in this calculation, so ammo with low indirectHitRange might cause different damages to the selections.
 
 
Then it all is turned into overall damage, probable formula is:
 
damage = (d1+d2+d3+d4) / (4 * armorStructural)//4 is the number hitPoints classes of the current class?
 
where d1-d4 = selection damages (head-body-hands-legs)
 
{{GameCategory|arma2|Editing}}
{{GameCategory|arma1|Addon Configuration}}

Latest revision as of 00:52, 8 August 2021

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.

Infantry

By Q1184:

Findings on indirectHit damage, tested on humans:

Dist <= indirectHitRange: damage = indirectHit * explosive
Dist > indirectHitRange: damage (x) ~= indirectHit * explosive * exp (-2.9 * x / indirectHitRange)

(where x is distance from the border of indirectHitRange zone, so full Dist = x + indirectHitRange)

damage here is damage caused to individual selections, as opposed to overall body damage. this damage then becomes moderated by overall armor and selection armor (setup in class Hitpoints).

resulting

selection damage = damage / (armor * selectionArmor)

Distances to individual selections are used in this calculation, so ammo with low indirectHitRange might cause different damages to the selections.


Then it all is turned into overall damage, probable formula is:

damage = (d1+d2+d3+d4) / (4 * armorStructural)//4 is the number hitPoints classes of the current class?

where d1-d4 = selection damages (head-body-hands-legs)