It’s hard to balance without using ratios and it is easy to overpower a weapon. My point is giving experience realistic yet enjoyable. I am sharing this to give an idea to make it easier to make modular weapons.

Recoil & Firerate

Recoil only goes up when the weapon is fired. while shooting there is an amount of time where weapon loads and shoot. in this time gravity pulls weapon to down. As the fire rate of the weapon higher, this time is getting shorter.

https://www.youtube.com/watch?v=FXzn27vFb5Q the creator of this weapon used it as an advantage to balance recoil. also, every time weapon shoots, it heats up the weapon. firing + current recoil / time. and firing + current heat / time. (or something like this) So if we add an attachment to increase firerate we just sacrificed heat and controlling without exploiting anything.

Weight.

If we have a heavier weapon, it’ll affect our mobility. Mobility is movementSpeed && stamina / overall weight. As the weapon heavier the effect of recoil is lower. Also how many attachment weapon will have affects the weight. determining the weight of every item by their volume * material while creating them would make things easier. Weight also affects ads speed. So ads speed / weight. The height of the barrel also may affect the heating speed. I am not sure other parts affects this.

Heat.

Heat balances the how long you can fire with a gun. And reliability. So there no more firing and running around with dragonfang. firerate and caliber of the ammunition used affects this. when weapon heated up, it’ll randomly start jamming.

Damage.

Dps is affected by velocity and firerate. different ammunition have different velocities. if we say velocity is the amount of gunpowder of ammunition and mass of the bullet. So deagle will not be equal to grizzlly. The properties of ammunitions will be predetermined. Also the bullets lose damage as it travels further. So we can say, gunpowder * mass = damage. But the complication is a pistol has more damage in close range. So it needs to be drawn as a graph.

so we can say (gunpowder / time) * mass = velocity(damage) (ugh I am not sure if its the best formula)

velocity also affects recoil. so velocity * recoil.

Range.

the range factors in real life is so much complicated to implement to a game. So the simplies way to implement is barrel length * gunpowder / mass = range. If only the rotation of the wind affects the bullet so we also use the wind for sniping. barrel length indirectly affects ads speed. The longer barrel is heavier barrel which is affects the it.

I hope it is understandable.