fail to feed for non-standard mags
Summary
None
Purpose of change
Big mags are not reliable. This attempts to represent it
Describe the solution
At this moment fail to feed is just a flat x/1000 chance to not shoot, same as any another jams TODO
- [ ] Document the field and how the formula behave
- [ ] (very not sure in my skills) make jams something bigger than just "shoot twice"? FTL require at least tapping and pulling the rack again, so spend some time and reset aim?
Current changes
Added fields for gun and for mag to affect fail to feed rate, 0.00027 and 0.00053 respectively, which in total gives 0.0008 (or 0.08, or 1/1200 ) chance for fail to feed the round, as Hyperseeker suggested
Current formula for the chance is:
one in [(mag_ftf_chance + gun_ftf_chance) * 2^((gun_damage * 1.75) + (mag_damage * 2))], which surely works, but i do not like it, because i underestimated the game damage system (the highest amount of damage item can have is 4, not 5), which means the XX completely dead gun has only 10% chance for the gun to jam, and 20% for a completely busted mag (using default 30 stanag mag).
You can play with formula here, might have some better numbers; i think making the magazine influence 2/3 of all odds would be reasonable https://www.desmos.com/calculator/cawa8vuzeq
Describe alternatives you've considered
Not doing it?
Testing
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.
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
wordor the verbdoes, add it in its lower-case form; if the word is a proper noun, such as the surnameGeorge, add it in its initial-caps form; if the word is an acronym or has special letter case, such as the acronymCDDAor the unitmW, 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.