Difference between revisions of "ObjectTemplate.MinDamage"

From Pilot_51's Wiki
Jump to navigation Jump to search
m (Reverted edits by GragMichaell (talk) to last revision by Pilot 51)
 
(No difference)

Latest revision as of 18:23, 12 January 2012

MDT description

A number of hand weapons, namely the medics' submachineguns, the Breda and Bren, the shotgun, and the pistols, have their damage drop off with range. Call this drop-off factor the DistanceMod. For all other weapons this term is always 1.0, i.e. the range does not affect the result. The important factors here are in the objects/handweapons/Common/Weapons.con file. Here is a typical entry, for the shotgun:

 ObjectTemplate.MinDamage 0.5
 ObjectTemplate.DistToStartLoseDamage 40
 ObjectTemplate.DistToMinDamage 80

The DistToStartLoseDamage specifies the distance (in meters) at which the damage of the projectile will start to decrease. The MinDamage value is the lowest ratio possible for damage. The DistToMinDamage is the distance beyond which the projectile does its minimum amount of damage. In other words, if a shotgun pellet hits at closer than 40 meters, the DistanceMod is 1.0, beyond 80 meters the DistanceMod is 0.5, between these two the DistanceMod drops linearly from 1.0 to 0.5. Submachineguns start to lose damage at 50 meters and drop to 0.5 at 100 meters. The pistols start to drop at 20 meters and drop to 0.5 at 40 meters. When the distance is between DistToStartLoseDamage and DistToMinDamage, the equation is this:

 DistanceMod = MinDamage + (1-MinDamage) * (DistToMinDamage - distance) / (DistToMinDamage - DistToStartLoseDamage) 

So for a shotgun pellet hitting at, say, 50 meters, the value would be:

 DistanceMod = 0.5 + (1-0.5) * (80 - 50) / (80 - 40) = 0.875


Source and more details

Additional Description