Open Taosenai opened 11 years ago
I've written the basis of a weapon overheating system according to the specification you've written, minus one or two features (https://github.com/cambam47/tmr/tree/master/tmr_overheating). The balance might be slightly off, and I haven't yet taken a look at GUI warnings, but the base code is in place and working as intended.
The only difference in how it's implemented from the solution you proposed above is that it removes the remaining ammo from the players magazine to force them to reload, as opposed to just requiring them to fire again. I couldn't find a suitable animation for the unjamming, so I figured a forced reload would suffice.
I can make a PR once you've looked it over, but I'm not familiar with how third-party edits work in regards to PRs, so I'm holding off on that until you've highlighted any issues.
EDIT: Haven't yet made the testing mission yet either, given that the mechanics are still in the testing phase.
Thanks for this, I'll take a look very soon!
Relevant PR: #25
I never get how heat relates to jamming. The only real risk(and a serious one) I'm aware of is cook off. It may also affect accuracy somewhat, that's why sniper rifles normally have thickened barrels. Another thing to bear in mind is that if you're planning on implementing jamming simulation, there are more than just a few factors affecting the chance of jamming. Limited modelling of one or two of them may not improve overall realism.
Just some ignorant suggestion from someone who has zero hands on experience with real firearms. And thank you for your mod Taosenai.
ISSUE
Rapid fire and full-auto fire does not generate heat in the weapon. Heat would improve gameplay by discouraging extensive and unrealistic use of full auto, increase the use of bursts by machinegunners, and add another decision for the player to make.
High heat should cause jams which must be corrected. It should also increase weapon dispersion.
PROPOSED SOLUTION
Add barrel 'weight' (thin, mid, heavy) for all weapons capable of full auto fire. Calculate heat increase and loss as the weapon is fired. Bleed off heat based on current atmospheric temperature.
This can all be done in a fired event handler without having a monitor loop. Simply track the time when the weapon was last fired and then calculate how much the barrel has cooled in the elapsed time when the next shot is fired.
Jams should be cleared by simply clicking to fire again. This will play an animation, clear the jam, and make the weapon ready. No additional keys.
Pop-up Icons should alert the player when the barrel is overheating. (Yellow, then red.)
Maybe: Caseless weapons reaching extreme heat should randomly cookoff? Did they fix this issue in the future?
A barrel change system is unnecessary and would only add tedium and complexity without adding gameplay.