I've noticed that the weapons in Battlefront do a lot of damage at close quarters, but the damage reduces with distance. Is there a formula for this? And if so, is it the same for all weapons?
Symthic has all you need to know about what needs to be calculated in regards to figuring out the damage of the blasters.
There is a formula posted on the Symthic Forums, which I have confirmed, that will calculate the damage based off of the blasters max/min damage, max/min range, and firing range. The formula itself will exceed the max/min blaster damage, although that is handle within the game itself
Damage = MaxDmg - (Range - StartFalloff) / (EndFalloff - StartFalloff) * (MaxDmg-MinDmg)
Range = 19m
Damage = 45 - (19 - 10) / (50 - 10) * (45 - 34)
Damage = 42.525
Range = 16m
Damage = 45 - (16 - 10) / (50 - 10) * (45 - 34)
Damage = 35.1
Range = 29m
Damage = 25 - (29 - 25) / (40 - 25) * (25 - 5)
Damage = 19.667
Range = 38m
Damage = 25 - (38 - 25) / (40 - 25) * (25 - 5)
Damage = 7.667