Basically adds the ability for non shotgun weapons to use falloff.
This could be used for custom weapons, custom ammo or rebalances.
No this does not add falloff to any existing weapon by itself.
Code:
Weapontweakdata:
self.weaponid.falloff_min_dmg = x
-- x = damage at end of falloff range uses internal payday math so 45 in-game damage is represented here as 4.5self.weaponid.falloff_begin = x
self.weaponid.falloff_end = x
-- x = distance in centimeters, so 2000 = 20m-- default is 20m/40m does not work like shotgun falloffs where total falloff range is damage_near + damage_far here, falloff_end is the actual end distance where you're doing 0 damage
Weaponfactorytweakdata:
self.parts.weaponpart.custom_stats = {falloff_begin_mult = x, falloff_end_mult = x, falloff_min_dmg_penalty = y}
-- x = multiplier on non-shotgun falloff-- see above for specific info on how non-shotgun falloff distances work-- y = damage amount that this part subtracts from falloff_min_dmg, represented with in-game damage (so 45 is actually 45 in-game damage this time)-- weapons with no defined falloff_min_dmg just subtract from the actual damage remember, positive value here reduces final damage