Talk:Durasteel Assault Rifle

From Starbounder - Starbound Wiki
Jump to: navigation, search

Energy per Shot

The value for energy/shot currently stated on the wiki page is 31.5.

The value displayed in the game is 3.5, which, I think, makes more sense, considering that the value for damage/shot is 2.9.

You're right that the energy rating shown here is energy use per second of sustained fire, not energy per shot. You should take the weapon stats on this wiki with a grain of salt. They're not always correct. If you want to know the stats for weapons, the only canonical source is the code itself. According to the vanilla code, the durasteelassaultrifle has a fireTime of 0.11 seconds (or ~9.1 shots per second) and a baseDPS of 10.5. To get bare weapon DPS, you multiply the baseDPS by the level modifier (level 4 weapon = 2.5), which gives you 2.8875 damage per shot, which the game display rounds to 2.9. This would be the damage per shot if you wore no armor and had no other buffs. Assuming you have no other special buffs and wear tier 6 accelerator armor (optimized for energy, with a damage bonus of 3.0) your actual expected damage per shot should be about 8.7. Stats for energy per shot are simpler. Just multiply energyUsage (given in energy per second of sustained fire) by fireTime to get energy per shot, which is 3.465, rounded in the display to 3.5. But wait, there's more. Due to a bug that I documented here[1], the actual rate of fire for guns is capped at about 6.7 rounds per second, which means that guns like the Durasteel Assault Rifle are not capable of delivering their stated DPS. As far as I can tell, this bug is in C++ code, which means that modders can't fix it directly. The best I was able to do was to create a mod[2] that changes all machine pistols and assault rifles to have a maximum number of shots per second at 6.7. Not sexy, but it does allow all guns in the game to deliver their stated DPS and energy per shot correctly. Rl.starbound (talk) 23:01, 5 June 2022 (UTC)