It adds four new TDF tags, dynDamageExp, dynDamageMin, dynDamageInverted and dynDamageRange.
dynDamageExp=0 / >0
Exponent of the damage formula, 0 disables dynamic damage.
Defaults to 0. 1 means linear scaling.
edit:
dynDamageMin = 0 / >0
Minimum damage value. Disabled when set to 0.
ex: firstDamageValue = 500, dynDamageMin = 100, modifier will be 1/5
dynDamageInverted = 0 / 1
Inverts the curve (or line).
edit:
dynDamageRange = 0 / >0
If set it will use this value instead of the range value from the weapon in the calculation.
Formulas:
Damage = (1 - (1 / WeaponRange * TraveledDistance)^Exp * OrigDamage
Damage = OrigDamage - (1 - (1 / WeaponRange * TraveledDistance)^Exp * OrigDamage (inverted)
Graph:

(clicky for a bigger picture)
x = distance, y = damage.
Red's the inverted one. This is with an exponent of 2.
Patch:
http://rattle.from-hell.net/spring/patc ... atch.patch
If there are any issues such as ugly code tell me. There are some problems left in when using an inverted curve. When a weapon is fired from maximum range it should do ~100% damage. Instead it was doing only ~77%. No idea why...