Weapon damage math question.

I decided that it makes the most sense in my project to figure out a basic formula for all weapon damage in the game. Problem is I am not quite sure what the most ideal formula for this would be.

My thinking is that it would go like this

(Rate Of Fire) ?? (Time To Kill “2 seconds”) = (Weapon base damage)

So I am trying a few different things and cannot quite figure out how I can find the base damage of a weapon based on its rate of fire vs a 2 second time to kill. Default unmodified health pool at level 1 is 25 health. A monster or player with no armor and 25 health should take about 2 seconds to kill from full to dead.

Will tip 5 USD in bitcoin for answering this correctly.

This question doesn’t have a single answer. If base enemy has 25 health and should be killed in 2 second then 25/2=12.5 is the amount of health that should be depleted in a second. One solution is base damage of 12.5 with fire rate of 1 per second :slight_smile: the other solution is base damage of 6.25 and fire rate of 2 rounds per second. You see where this is going?
If you know your fire rate in seconds then it’s simply:
Base health / time to kill/ fire rate = minimal base damage
Did you had something more complicated in mind?

Hmm I will see how this goes, I think it might actually be that simple. I then allow a modifier on each weapon to tweak the final setting to keep things interesting. I like this because it provides a good starting baseline rather than just blindly tweaking numbers.

edit: Alright maybe this was a lot easier than I was thinking! I got stuck on it for some reason!

If your fire rate is 0.4 per second it means you have 2.5 seconds between each shot. So to kill something in 2 seconds with such for rate you need to kill them in one shot.

Its setup to be means shots fired per second. So the lower the number means 2.5 shots fired every second.

Even so your math is working out correctly. I just multiply rate of fire against 12.5 and I get a base damage. In this case the SMG will have a base damage of 5 which sounds correct to me.

However, I think this formula also needs to take into account number of shots fired. For example a shotgun that fires 6 pellets.

How would I get damage for each pellet? hmm…

I have one more question on this front. What would exponential growth look like in blueprints? I need to have it so that the damage value increases on a curve based on weapon rate of fire.

A weapon that fires at 0.4 == 5

while a weapon that fires at 1.2 should be much higher than 15 base damage I think it should be nearly double that value.