Jump to content
7erra

Calculate ROF from config

Recommended Posts

Hello ArmA community,

 

I was working on a dialog with information about different weapons. Now I've encountered a problem with the fire rate in the config because I can't get to a good formula. What I found so far:

  1. This document: https://docs.google.com/spreadsheets/d/1w2LK46k9qXPlFOB7d_-N3AI_WAbvCMUY7RYqGBqkVMI/edit?rm=full#gid=4. It contains the fire rate of all weapons
  2. The fire rate is bound to the frame rate
  3. The config entry is reloadTime = 0.x (eg. configfile >> "CfgWeapons" >> "arifle_Katiba_F" >> "Single" >> "reloadTime": 0.075)
  4. This BIKI entry description: "Delay (in seconds) between each individual shot."
  5. This description: "Rate of fire is limited in game. Maximum bullets fired per frame is 1, so in 20FPS (rate 0.05) it is 1200 bullets per minute. [...]

 

Hopefully someone can help me,

 

Terra

 

Share this post


Link to post
Share on other sites

The firing rate is 60 / reloadtime  . For your Katiba it is 800 rpm. The FPS only limits if it is too high. If you have 40FPS you can't fire more than 2400 rpm.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the answer. Why is it limited though? To prevent hackers from fiddling with thr ROF or even out the chances between low spec gamers and NASA employees?

Share this post


Link to post
Share on other sites

I don't know their reason, but can think of multiple minor reasons:

1. The game loop. Every frame the game runs through and update the physics and the graphics, check key inputs. So they only check whether you are shooting FPS times per second. They could do a more advanced shooting model to help with that, but that would complicate the code, and for what? With 15 fps, barely playable, you can still fire at 900 rpm.

2. Performance. If you have bad FPS, then it is because there is too much stuff going on. Putting more than one bullet in the air per frame just means you computer has to deal with even more stuff. Restricting it could help with that.

3. Would you even notice? If you fire more than 1 bullets per frame, some frame will create 2 new bullets at the same time, which is something only shotguns should do.

 

I think if it is any of these reasons, it is either 1 or 3.

Share this post


Link to post
Share on other sites

More consistent also with real world. Even in 2035. There is an optimal ratio between ammo count in full mag and RoF, if you don't want to be out of ammo on a short press of the trigger. The question is more sensible for high-rate canon, some of them supposed to be anti-missile barrier (not yet experimented in Arma).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×