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

fail to feed for non-standard mags #74696

Merged
merged 18 commits into from
Aug 24, 2024

Conversation

GuardianDll
Copy link
Member

@GuardianDll GuardianDll commented Jun 20, 2024

Summary

None

Purpose of change

Big mags are not reliable. This attempts to represent it

Describe the solution

Gun gets a jam chance depending on it's damage level:
0.00018% for undamaged gun, 3% for 1 damage (|\), 15% for 2 damage (|.), 45% for 3 damage (\.), and 80% for 4 damage (XX)
If presented, magazine get'sa a jam chance depending on it's damage level:
0.000288% for undamaged magazine, 5% for 1 damage (|\), 24% for 2 damage (|.), 96% for 3 damage (\.), and 250% for 4 damage (XX)
Then this two values are summed, multiplied by 1.8, and this value is used as a chance for a gun to get jam
Jams are faults that has category gun_mechanical_simple, and specifically represent one that can be fixed, on average, in 10 seconds or less;
If gun has such jam, the player won't be able to aim a gun anymore, and could either fix it from mending menu, or try to fix it on the fly, just smashing f again, and rolling their skill against odds

Testing

image

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions labels Jun 20, 2024
@GuardianDll GuardianDll marked this pull request as draft June 20, 2024 21:11
@CleverRaven CleverRaven deleted a comment from github-actions bot Jun 20, 2024
@Hyperseeker
Copy link
Contributor

Hyperseeker commented Jun 21, 2024

In 2015, the US Army tested multiple magazines (disguised under designators, as opposed to their commercial names) for the M4/M16 platform. The test has since been made public. The tables in the document describe how often have failures (including magazine failures) been encountered during testing, with the following descriptions elaborating on the nature of those failures.

It appears as though the indications of failure rates are roughly per 1200 round fired out of a given magazine, which should give you a good sense of how frequently these standard-capacity magazines can fail. You're probably looking for class I/EFF failures, which "could be cleared by the weapon operator within 10 sec". From there, you may be able to extrapolate failure-to-feed from a higher-capacity magazine, which "have a tendency to jam". I was unable to find any similar studies for higher-capacity magazines.

The only other component I can see for a failure-to-feed is an unusual lower receiver... maybe? Very low skill could mean the magazine wouldn't be seated properly, and that's its own kettle of fish.

As for the failure mechanism... why not make it a gun fault? You'd need to clear it before being able to fire the gun again, which would necessarily mean re-aiming.

EDIT: the Army did the test, not the Marines. The latter did, instead, authorize the best-tested magazine model (the PMag by Magpul, aka "vendor Foxtrot") for use with their troops.

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

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • <npc_name> have had <context_val:hp_before> hp, now has <context_val:hp_after> hp.
  • debug item damager (advanced)
  • debug item damager (simple)

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

Hints for adding a new word to the dictionary
  • If the word is normally in all lowercase, such as the noun word or the verb does, add it in its lower-case form; if the word is a proper noun, such as the surname George, add it in its initial-caps form; if the word is an acronym or has special letter case, such as the acronym CDDA or the unit mW, add it by preserving the case of all the letters. A word in the dictionary will also match its initial-caps form (if the word is in all lowercase) and all-uppercase form, so a word should be added to the dictionary in its normal letter case even if used in a different letter case in a sentence.
  • For a word to be added to the dictionary, it should either be a real, properly-spelled modern American English word, a foreign loan word (including romanized foreign names), or a foreign or made-up word that is used consistently and commonly enough in the game. Intentional misspelling (including eye dialect) of a word should not be added unless it has become a common terminology in the game, because while someone may have a legitimate use for it, another person may spell it that way accidentally.

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 26, 2024
@github-actions github-actions bot added the Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves label Aug 15, 2024
@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Aug 18, 2024
@GuardianDll GuardianDll marked this pull request as ready for review August 18, 2024 16:41
@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [Markdown] Markdown issues and PRs labels Aug 18, 2024
GuardianDll and others added 2 commits August 18, 2024 19:05
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Aug 18, 2024
src/ranged.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Aug 20, 2024
@Maleclypse Maleclypse merged commit 292302f into CleverRaven:master Aug 24, 2024
27 checks passed
@GuardianDll GuardianDll deleted the fail_to_feed_mag branch August 24, 2024 14:19
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 BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants