-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
realistic gun maintenance #34240
realistic gun maintenance #34240
Conversation
Co-Authored-By: BevapDin <[email protected]>
Sounds nice. But what if you can implement it into the Gunsmith Repair Kit? Beside the gun fixing function,you can put in the gun cleaning function so that this problem won't get any more complicated,but also help the player to have an easy access to gun cleaning instead of running around to find component |
Also,can i suggest that since you said dirty gun always jammed,we can tag the gun you get from zombies as "Dirty" and need cleaning? This will encourage the player to clean their guns,thus get some usage out of this. |
I think it already works like that. The gun gets cleaned as soon as the fouling malfunction is removed, reducing dirt to 0. This can be done with the kits AND the pipe cleaner, which appears to be fairly easy to craft. I think your bigger problem will be finding enough ammo to foul the gun (unless you use black powder). IRL gun enthusiasts go through thousands of rounds sometimes and the gun works despite not being cleaned. This PR is close, but not quite as forgiving as that. Still likely won't be a problem with normal ammo until you're going to mags and mags of it clearing a city. |
In real world USA you're unlikely to find heavily fouled guns. Gun owners typically either overclean their guns or you have a n00b who forgets to oil his new gun. You're more likely to get a slightly damaged gun from it being dropped (NATO guns appear to be vulnerable to dropping) than a dirty gun, so I think the current implementation + my PR would represent the real world quite well. There are many firearms owners, including experienced shooters, won't clean their firearms until a few thousand rounds. |
Co-Authored-By: Jianxiang Wang (王健翔) <[email protected]>
So which category of crafting are we talking about to craft the pipe cleaner? Weapon? Or ammo? If that so,then which level? From what type of book you can get the recipe out of? What i meant was make it easy for us gun-noob by set all of it into a single kit instead of a kit and a pipe cleaner since it will be easier to find . besides,you can only found guns on zombie cops and zombie soldier and such,and it would be nice to think they clean their guns regularly after turned into a zombie. |
You can find the info here: I made neither the pipe cleaner nor the kit. The pipe cleaner just cleans the gun. The kit can clean the gun AND repair it. Most of the guns you will find will be in gun shops, not dead zeds. Dead zeds don't need to clean their guns. They don't even use their guns. A dead zed's gun will have whatever condition and dirt it had when the cop turned into a zed, which I suspect would be "good" and "clean," minus whatever abuse the zed accidentally applied to the gun. Fouling accumulation is impossible without firing the gun, so the only issue the gun might have is a mechanical (condition) issue resulting from the zed stumbling onto the gun and pinning it against the ground. This is already properly implemented. |
So the recipe is new eh? Wait,wire? I thought we need like a long tube or something,not a wire? |
I guess. I didn't make it. |
I'd say, after this pr, there should be a chance that zombie guns are fouled. Regardless of their cleanliness before, they're now being dragged through dirt, vomited, and oozed on. It doesn't need to be a guarantee but maybe the (filthy) tag on a monster should confer a 50% chance its gun is fouled too. |
Makes sense. Let me see if I can find a good way of adding that as a feature. Or maybe leave it to a future PR. Either way won't be too unbalanced in the short-term since guns will still fall down damaged like they used to. |
Anyone know what this is/how to fix it? Seems to be the only problem: |
At least we are getting the jammed gun into use. Don't have to be frequent,but at least let the zombie's gun jammed every now and then like Far Cry 2 so that the player have to move their ass to find guns instead of just sitting around with the wander horde mode on,waiting for guns |
Oh and if the gun is dirty, how about adding a really high chances of malfunctioning while shooting? This will force the player to go clean the gun or drop it,and it would be nice. Sounds annoying,but really awesome if you really give it a thought |
Zombie guns don't jam. Zombies don't carry guns and don't use them. Waiting for hordes to come in with guns is no more viable now than it was before. This PR does not really affect that. |
Guns already do jam when they are dirty with this PR. That was the central point of the PR. |
Co-Authored-By: Jianxiang Wang (王健翔) <[email protected]>
Co-Authored-By: Jianxiang Wang (王健翔) <[email protected]>
…taclysm-DDA into better_gun_maint
Co-Authored-By: BevapDin <[email protected]>
Co-Authored-By: Jianxiang Wang (王健翔) <[email protected]>
Co-Authored-By: Jianxiang Wang (王健翔) <[email protected]>
Rail-runner's suggestion on removing UPS_CHARGES check in deciding to fail to cycle or not. Appears to have worked with the minigun. Added check to see if non-fouling parameter was in the current ammo effects. Purpose was to get rid of fouling in guns like the rail rifle, which don't even use gunpowder. These fouled without this change, but now seem to be working properly.
Don't some zombies carry their guns in holsters like zombie military pilots? Should there a way to increase the chance to recover a clean gun off such zombies? |
There is. Look at zombie cop json for the example. By default the drop dirt range is all over the place, but you can put in a custom range for specific drops, like the zombie cop. |
it.faults.insert( fault_gun_blackpowder ); | ||
if( !curammo_effects.count( "NON-FOULING" ) ) { | ||
if( curammo_effects.count( "BLACKPOWDER" ) ) { | ||
if( ( it.ammo_data()->ammo->recoil < firing->min_cycle_recoil ) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was intentional that this failed to cycle on every shot when the ammunition was blackpowder.
We need some more evidence for which guns can cycle with blackpowder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just an optical illusion on GitHub's change analyzer, Kevin. All I did was add:
if( !curammo_effects.count( "NON-FOULING" ) ) {
to that big section dealing with blackpowder stuff, but because it applies to the entire section, the entire section was indented. So GitHub thinks I deleted that whole section and then added it back, but in reality all I did was insert that one line more or less and the astyle indented it.
The purpose of that line, btw, is to allow people to add a NON-FOULING parameter to non-gunpowder ammo (like the rails for the rail rifle) to avoid fouling of guns like the rail rifle, which makes no sense since it uses electromagnetism/electricity and NOT gunpowder as propellant.
Speaking of which, I think I need to do the same for the nail guns/air-based weapons to prevent fouling in these non-GP guns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BP ammo should still cause a malfunction, btw, unless something broke.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked and BP still causes stovepiping, so I didn't remove that functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea my bad, sorry.
adds ability to mark a gun, in addition to ammo, as non-fouling.
I don't see any way in game to clean/remove fouling. |
I think you can do it by mending the gun from the item action menu? ( |
Mend menu. Note you won't see "faulty" if you just have dirtying, as dirtying in and of itself is not a "fault" per se, just accumulated dirt. |
Also curious if anyone has any input re: what should and should not get "fouled." Obviously any item can start out foul due to, as someone suggested, zeds barfing/bleeding on it, dragging it through the mud, etc... Obviously guns would always foul due to use of gunpowder. Air guns currently are set to not foul, though technically they do, albeit I'm not sure it will ever be enough to matter: Bows/xbows also accumulate dirt/oils from use: Bows/xbows I believe should foul presently if they are is_gun. Any input would be helpful as we tweak this in future PRs. |
Summary
SUMMARY: Balance "Adjusts fouling and misfire mechanics"
Purpose of change
make misfires/weapon malfunctions more realistic and less chance-based
Describe the solution
Creates fouling mechanics for guns. Fouling occurs much more quickly from firing blackpowder, whereas fouling from normal rounds requires a LOT of work to foul the gun. There's no longer blackpowder "clogging" - the gun just eventually becomes incredibly unreliable due to fouling accumulation. Gun can no longer be damaged randomly just from firing - this does not happen IRL. A "misfire" is generally just a dud IRL - no way for it to cause damage to the gun. You can click a snap cap as long as you like; real manuals for guns even say so. A gun CAN get damaged if it is so dirty that it causes pressure to build up to very high levels inside the weapon, sometimes leading to damage, but this is unlikely except at the highest levels of fouling.
Describe alternatives you've considered
Considered adding more realistic cleaning mechanisms - cleaning with solvents first, then applying oil, but was worried it would turn off devs for requiring too many steps. Right now the pipe cleaner is assumed to perform both of those functions abstractly.
Additional context