Stormworks: Build and Rescue

Stormworks: Build and Rescue

26 ratings
Cannon Reloading Time (SW:Search and Destroy)
By snuppy
Quick info on the different cannons in the game.
It has come to my attention that my method for measuring firerate and reload time may be mildly imprecise, I might redo these tests at some point
2
   
Award
Favorite
Favorited
Unfavorite
Breech-Loaded Cannon Reload Time
Smallest possible time from unloaded state to loaded state.
  • Battle Cannon: 3.08 Seconds.
  • Artillery Cannon: 7.85 Seconds.
  • Bertha Cannon: 19.10 Seconds.
Autocannon and MG Bullets Per Sec
How many bullets each autocannon+mg can fire every second.
  • Rotary Autocannon shoots:
    30.302405889818027992150464778302
    bullets per second.

  • Light Autocannon shoots:
    7.5851401642880678463481190976232
    bullets per second.

  • Heavy Autocannon shoots:
    2.0167657772595137900393551673774
    bullets per second.

  • Machine gun shoots:
    15.305853815626909405263499456948
    bullets per second.
FYI
Bullets Per Sec -> Sec Per Bullet
The function to convert from bullets per second to seconds per bullet is 1/x or x^-1, with x being the amount of bullets fired per second. (You may use these two functions interchangeably in this case, as they return the same.)

Example of this in use:
We have two Light Auto Cannons (LACs) on our vehicle. We want them together to fire at as low of an interval as possible. If we only start firing one of the two LACs initially, and wait exactly halfway until the first LAC is going to fire again before starting to fire the second LAC, we will achieve the lowest possible time between each bullet fired from the two LACs combined.

As is stated earlier in this guide, the LAC shoots ≈7.585 bullets per second, so we input 7.585^-1 into a calculator, and the calculator returns ≈0.132. (note that in some calculators you may have to do (7.585)^(-1) to make the calculator understand your request)
We now know that there is 0.132 seconds between the firing of each bullet from a singular LAC, so we divide it by 2 or multiply by 0.5. The calculator returns 0.066, this is halfway between the firing of one bullet and another, from a single LAC. Some methods require we know this time in ticks, so rq using x*60 we find that 0.066 seconds is 3.96 ticks.

Now that we know the numbers we need, we can pick a method to implement this delay, I'll name some of the main ways which come to mind.
  • Using inherent logic block tick delay
Afaik every logic block has a tick of delay from information enters it to information can leave it, we can use that to achieve a desired delay.

Make a 1x2 microcontroller, add two on/off nodes, set one of them to output. Now add a logic block that does effectively nothing for every tick of delay you need, between the input and output in the micro. (for example an OR gate with no second input)
In our case as we know, we want ≈4 ticks of delay, so you'll want to place 4 OR gates going into each other in a line with no second input, that way there are 4 ticks of delay.
Plug your fire input directly into one LAC and into the micro, with the micro's output going into the second LAC.
https://steamuserimages-a.akamaihd.net/ugc/1818903965572349199/9F47AD3859B957759150A57F9F049B59FCCB6EB7/?imw=256&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false
  • Using capacitors while accounting for inherent logic block tick delay
This method does not really work on a timescale as small as the twin LAC case, but I'll explain it anyway.

Make a 1x2 microcontroller, add two on/off nodes, set one of them to output. Add a capacitor between your input and output, set it's "Discharge Time" to 0, and it's "Charge Time" to as close as possible to the seconds per bullet on your gun of choice divided by 2.
To be super precise we should also remove one tick in seconds, as the delay block itself adds a tick of delay. One tick is ≈0.01667 seconds, subtract this from the Charge Time you use.
https://steamuserimages-a.akamaihd.net/ugc/1818903965572349175/29866F7E21D0FFF0FCA8338FA426134218142989/?imw=256&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false
  • Using timers while accounting for inherent logic block tick delay
Make a 1x2 microcontroller, add two on/off nodes, set one of them to output. Add a timer block and constant number. Set the timer block to "ticks", plug the constant number into the timer, plug the input into the timer, plug the timer into the output. Set the constant number to as close as possible to the ticks per bullet on your gun of choice, divided by 2.
To be super precise we should remove one tick, as the timer block itself adds a tick of delay.
In the twin LAC case, that means setting your constant number to 3, as we want ≈4 ticks of delay.
https://steamuserimages-a.akamaihd.net/ugc/1818903965572349193/A7E65019B7E5772E64AC90B359B9A113FE4B5C13/?imw=256&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false
  • Using a Lua timer
By getting creative, you can make a Lua program which simulates a timer or delay, and write and read your bool to and from it.
Alternatively you can just use a workshop one like this one: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2141294085
Make your Lua program wait as close as possible to the ticks per bullet, on your gun of choice, divided by 2.
Again to be super precise we should remove three ticks, as the composite write block, Lua block, and composite read block together adds 3 ticks of delay.
https://steamuserimages-a.akamaihd.net/ugc/1818903965572349185/1E98355F989B61BD3C5F56706E1F149AB525CF68/?imw=256&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false
15 Comments
Game 20 Apr @ 12:02am 
In regards for measuring machine gun fire rate:
Use recording software and count framerate as well as how many frames it takes between each shot. Average frames per shot across a sample to get an accurate fire rate estimation. You can also trim a few short clips (such as 3 seconds of firing) and slow them down, counting the shots total in that 3 seconds. I'm not sure how open Stormworks is to reading files, but you may be able to find the fire rate definition itself to see how fast the weapon's defined fire rate is through an xml or similar.
L00111111 20 Jun, 2023 @ 6:53pm 
posting this to basically bookmark this
snuppy  [author] 20 Jan, 2023 @ 4:34pm 
Calculate what?
Have 26 Oct, 2022 @ 12:12pm 
can i calculate this on a computer if so how and in what calculator?
justanotherguy_y 21 Aug, 2022 @ 1:05pm 
:D
justanotherguy_y 21 Aug, 2022 @ 1:05pm 
Bertha's need AP shells
snuppy  [author] 25 May, 2022 @ 8:01pm 
uhh images borked for some reason, no clue why
snuppy  [author] 15 Mar, 2022 @ 1:23pm 
I really appreciate it! I'm not sure how I'd measure the machine gun firerate again, do you have any ideas? I did something with the time it took to empty and the amount of rounds
DamianBeBallin 26 Jan, 2022 @ 1:56am 
this is great! could you please update this sometime soon? I feel like the machine gun fire rate is innacurate currently. but keep up the good work, I love guides like this with technical information. it really helps us technical players
snuppy  [author] 4 Dec, 2021 @ 3:40pm 
@boat boy Glad I could help! :se: