Damage: Difference between revisions
(Added link to VBS wiki page with further details) |
Lou Montana (talk | contribs) m (Text replacement - ";[ ]+ " to "; ") |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
'''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 | ||
Line 73: | Line 73: | ||
where d1-d4 = selection damages (head-body-hands-legs) | 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)