Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase 57 recoil to reasonable amount #77168

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Maleclypse
Copy link
Member

Summary

None

Purpose of change

Adjust 57 recoil. While the recoil on a P90 is incredibly low it's not so low that subsonic rounds have difficulty cycling the action. Currently in game subsonic rounds cannot cycle the action.

Describe the solution

Increase recoil on base rounds. I didn't find anything suggesting our recoils are set on anything other than vibes so I thought about the recoil from different guns I've shot and assumed the recoil on the 30.06 is correct. Then adjusted 57 rounds upward a small amount that seemed fair.

Describe alternatives you've considered

Testing

Additional context

@RedMisao
Copy link
Contributor

For what I've seen, the recoil value of ammo seems based on the proyectile's muzzle energy in J, the same number where the damage is square-rooted from.
Although, I don't know where the gun's min_cycle_recoil is obtained from. For pistols and smgs, it's usually set at 450, which seems arbitrary to me but then again most of them use 9mm.

@Maleclypse
Copy link
Member Author

For what I've seen, the recoil value of ammo seems based on the proyectile's muzzle energy in J, the same number where the damage is square-rooted from.

Although, I don't know where the gun's min_cycle_recoil is obtained from. For pistols and smgs, it's usually set at 450, which seems arbitrary to me but then again most of them use 9mm.

If you have better numbers you think I should use I fully support any changes you suggest. :)

@github-actions github-actions bot added the [JSON] Changes (can be) made in JSON label Oct 19, 2024
@RedMisao
Copy link
Contributor

RedMisao commented Oct 19, 2024

I checked where the field was added and related commits (#31485, which is in turn the continuation of #30985 - specifically this post, and #45062 which is the PR adjusting the values accordingly).
Seems that the gun's min_cycle_recoil value was set from 90% of the ammo's recoil for guns that should not cycle with blackpowder, or 75% for the value only if it's known they can cycle with blackpowder ammo (†). This was a deliberate choice according to Kevin's request in #31485.
(†) This is why blackpowder values are set at 76% of the base ammo, rounded down. See the balance doc.

Now, for where the ammo gets its recoil. Skipping some commit history, it was reworked in #18362, quoting "scaled roughly equal to kinetic energy (J)".
Using wikipedia for reference:

  • 9mm should have a recoil of 350 (FMJ) - 500 (+P+), it has 500 ingame
  • 556 M855A1 should have a recoil of ~1800, it has 1650 ingame
  • 762x51 M80 should have a recoil of ~2500, it has 3000 ingame
  • 762R should have a recoil of ~3600, it has 2650 ingame
  • 545 7N6 should have a recoil of ~1300, it has 1400 ingame

In most cases the ingame recoil is higher than the IRL energy values, except for 556. I'm citing 762R because I personally use it for reference, and it's an outlier, in case anyone knows better.
So, 57 ammo should have a recoil of ~500 (or slightly higher?). But doing so makes the P90 cycle with blackpowder ammo, which I don't know if it's the case IRL. The same applies for the other weapons using 57. Which... may be out of scope for this PR.

PD: I will update the documentation accordingly. min_cycle_recoil has been a mystery for gun modders.
Edit: Blackpowder ammo is recoil is 76%, not 77%. I got confused.

@github-actions github-actions bot added astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Oct 19, 2024
Update 57.json
@Maleclypse
Copy link
Member Author

@Karol1223 I don't know if this would interest you but figured I'd show the above numbers to you

@Karol1223
Copy link
Contributor

...were you trying to ping Holli or... Why am I pinged on a gun PR, I am so confused.

@Maleclypse
Copy link
Member Author

...were you trying to ping Holli or... Why am I pinged on a gun PR, I am so confused.

Because it provides an info source for doing a massive audit. And when I think of massive audits to correct bad information I think of Karol.

@taatu
Copy link
Contributor

taatu commented Oct 20, 2024

The biggest error in this PR may be that SS190 is not subsonic. It's the standard round. SB193 has even lower recoil and is the actual subsonic round, as the description of the item says. (and the id of "57mm_ss" likely hints at)

Also from brief testing I could not reproduce SS190 failing to cycle, while SB193 does. This is consistent with all 5.7 guns having min_cycle_recoil of 81 which is 10% lower than SS190's recoil but 60% higher than the subsonic one's. If there is a bug it may not be related to recoil directly.

weapon mods with overwrite_min_cycle_recoil could change the value, but the only one applicable to 5.7 is the robofac gun barrel change and that also sets it to 81

The code for checking against min_cycle_recoil does not make any distinction on "being just a bit above the minimum", and anything that passes the "it.ammo_data()->ammo->recoil < it.min_cycle_recoil()" test should not fail on that front.

Now here's some of my digging trying to determine a good value for the recoil:
5.7 rounds have had their recoil value as "roughly equivalent" to .22 LR since the initial commit in 2010;

AMMO("5.7x28mm",	 3, 500,AT_57,		c_dkgray,	STEEL,
	 3,  2, 14, 15, 11, 12,  6, 100, "\
The 5.7x28mm round is a proprietary round developed by FN Hestal for use in\n\
their P90 SMG.  While it is a very small round, comparable in power to .22,\n\
it features incredibly armor-piercing capabilities and very low recoil.");

the value here being 6, at the time half of standard 9mm and equal to .22LR. This seems to be based on the mistaken idea that .22 LR and 5.7 are roughly equally powerful, (5.7 has around 50% more momentum and 3 times the kinetic energy) and the common claim that "5.7 has recoil similar to .22 [LR]"

Wikipedia cites 3 sources claiming 5.7 has "30 percent less recoil than the 9×19mm cartridge", namely

https://web.archive.org/web/20100122045316/http://www.handgunsmag.com/ammunition/hg_militarytoday_200811/
https://web.archive.org/web/20080515044827/http://www.global-defence.com/2002/weap-herstal.html
https://web.archive.org/web/20111002213431/http://www.ontargetmagazine.com/content/defensive-handguns-0

and of the subsonic as "having slightly less recoil than the standard round at 1.3kgm/s" (actually 33% less, per FN: https://web.archive.org/web/20021212233833/http://www.fnmfg.com/lawenf/ss190/ss190.htm )

edit: ^ is a result of measuring recoil in terms of momentum

@Maleclypse
Copy link
Member Author

Maleclypse commented Oct 20, 2024

The biggest error in this PR may be that SS190 is not subsonic. It's the standard round. SB193 has even lower recoil and is the actual subsonic round, as the description of the item says. (and the id of "57mm_ss" likely hints at)

This PR doesn't touch the subsonic please read the json.

Now here's some of my digging trying to determine a good value for the recoil:
5.7 rounds have had their recoil value as "roughly equivalent" to .22 LR since the initial commit in 2010;

AMMO("5.7x28mm", 3, 500,AT_57, c_dkgray, STEEL,
3, 2, 14, 15, 11, 12, 6, 100, "
The 5.7x28mm round is a proprietary round developed by FN Hestal for use in\n
their P90 SMG. While it is a very small round, comparable in power to .22,\n
it features incredibly armor-piercing capabilities and very low recoil.");

the value here being 6, at the time half of standard 9mm and equal to .22LR. This seems to be based on the mistaken idea that >.22 LR and 5.7 are roughly equally powerful, (5.7 has around 50% more momentum and 3 times the kinetic energy) and the >common claim that "5.7 has recoil similar to .22 [LR]"

Wikipedia cites 3 sources claiming 5.7 has "30 percent less recoil than the 9×19mm cartridge", namely

https://web.archive.org/web/20100122045316/http://www.handgunsmag.com/ammunition/hg_militarytoday_200811/
https://web.archive.org/web/20080515044827/http://www.global-defence.com/2002/weap-herstal.html
https://web.archive.org/web/20111002213431/http://www.ontargetmagazine.com/content/defensive-handguns-0

and of the subsonic as "having slightly less recoil than the standard round at 1.3kgm/s" (actually 33% less, per FN: https://>web.archive.org/web/20021212233833/http://www.fnmfg.com/lawenf/ss190/ss190.htm )

Please suggest an actual number in our recoil numbers for this and then while you are here make a suggestion for how much less the subsonic rounds should be. The 515 number I've changed the base round to is drawn from wikipedia energy listed for that specific round SS190.

31 gr (2.0 g) SS190 AP FMJ | 716 m/s (2,350 ft/s) | 515 J (380 ft⋅lbf) -- | -- | -- 31 gr (2.0 g) SS190 [AP](https://en.wikipedia.org/wiki/Armor_piercing_round) [FMJ](https://en.wikipedia.org/wiki/Full_metal_jacket_bullet) 716 m/s (2,350 ft/s) 515 J (380 ft⋅lbf)

I've currently left the subsonic round at -40 recoil because that will keep it in the new cycling range.

@taatu
Copy link
Contributor

taatu commented Oct 21, 2024

This PR doesn't touch the subsonic please read the json.

Ah, I missed that the subsonic round has a relative recoil change. (turns out the hitchhiker's guide's "raw json" is not actually the same as the raw json)

Please suggest an actual number in our recoil numbers for this and then while you are here make a suggestion for how much less the subsonic rounds should be. The 515 number I've changed the base round to is drawn from wikipedia energy listed for that specific round SS190.

looking at the old FN page (https://web.archive.org/web/20021212233833/http://www.fnmfg.com/lawenf/ss190/ss190.htm)
the subsonic round has a kinetic energy of 162 joules, then giving the correct value as 162 recoil.

@Maleclypse
Copy link
Member Author

looking at the old FN page (https://web.archive.org/web/20021212233833/http://www.fnmfg.com/lawenf/ss190/ss190.htm) the subsonic round has a kinetic energy of 162 joules, then giving the correct value as 162 recoil.

I'm not seeing that on here but I am seeing this

Recoil impulse: | 1.95 kgm/s | 1.95 kgm/s | 1.3 kgm/s

The recoil impulse shows 2/3rds of the standard which if the standard round is 515 recoil in our system would make this round 340 which is still going to be around 110 recoil less than what our standard measurement requires us to put the cycling at. So at the moment until someone else comes along and audits bullet energy I'm going to leave the guesstimate of -40 recoil on the subsonic rounds. To go any further would require me to start editing things I have no desire to get into editing.

@taatu
Copy link
Contributor

taatu commented Oct 21, 2024

kgm/s is "kilogram-force" eg. it's in terms of momentum. Currently as you said recoil is in terms of kinetic energy (half mass times velocity squared), (which happens to be physically wrong.) The subsonic round here would then be doubly wrong both realistically and even with the current system.

the "min_cycle_recoil standard" was set by Rail-Runner in the PRs RedMisao mentioned, and there they give a specific exception for the 4.6mm and 5.7mm rounds: (incidentally, 4.6mm also still has that wrong 90 recoil despite around 500J of kinetic energy)

As exceptions due to their small size (and reliance on high projectile speed that can't be provided by blackpowder), 4.6x30mm and 5.7x28mm loads have 46% and 56% recoil/damage coefficients, respectively.

which results in 5.7 black powder having only 288 recoil after this PR. And the subsonic round deals less damage than the black powder round. So maybe there is no reason not to set min_cycle_recoil to say 330

though this does come down to fairly arbitrary decisions as there's no way to be consistent with all the conflicting rules of thumb

@github-actions github-actions bot added the Map / Mapgen Overmap, Mapgen, Map extras, Map display label Oct 24, 2024
data/json/items/gun/57.json Outdated Show resolved Hide resolved
data/json/items/gun/57.json Outdated Show resolved Hide resolved
data/json/items/gun/57.json Outdated Show resolved Hide resolved
data/json/items/gun/57.json Outdated Show resolved Hide resolved
data/json/mapgen/house/house_detatched1.json Outdated Show resolved Hide resolved
data/json/mapgen/house/house_detatched1.json Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants