Project Zomboid

Project Zomboid

Not enough ratings
More Realistic Gun Jams
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.866 MB
11 Mar @ 5:39pm
28 Mar @ 2:54am
2 Change Notes ( view )

Subscribe to download
More Realistic Gun Jams

Description
Modifies the JamGunChance section to feel more realistic.

- Guns don't start jamming until a certain percentage (20%) of the overall ConditionMax is lost.
- Gun jam chance is based on the overall percentage of ConditionMax lost. Higher base ConditionMax results in more resistance to jamming.
- Jam chance starts off extremely low so it should never be obvious to Players when a gun is able to start jamming.
- Jam chance increases exponentially the closer the weapon gets to zero Condition.

As this mod only overwrites the onShoot component, it is compatible with any other mod that does not specifically do this.
Gunfighter and Brita's both overwrite the whole base lua file which makes this mod compatible with them both.

I have seen other Gun Jam mods out there but their code doesn't do what I wanted so I made my own mod.
If more configuration is required, I can create other variants of this mod.

Icon courtesy of Flaticon:
https://www.flaticon.com/free-icons/firearm

Workshop ID: 3442874485
Mod ID: sr_morerealisticgunjams
8 Comments
Gojita 26 Sep @ 6:34pm 
@Ser Ripsen: Got this error everytime I start up my dedicated server. I just noticed now.
Gojita 26 Sep @ 6:34pm 
function: zzSR_ReloadWeaponAction_onShoot.lua -- file: zzSR_ReloadWeaponAction_onShoot.lua line # 60 | MOD: More Realistic Gun Jams [B41]

ERROR: General , 1758936670784> 736,017,545> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: onShoot of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1758936670785> 736,017,545> DebugLogStream.printException> Stack trace:
Gojita 26 Sep @ 6:33pm 
java.lang.RuntimeException: attempted index: onShoot of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1782)
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76)
at se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117)
at zombie.Lua.LuaManager.RunLuaInternal(LuaManager.java:564)
Gojita 26 Sep @ 6:33pm 
at zombie.Lua.LuaManager.RunLua(LuaManager.java:510)
at zombie.Lua.LuaManager.RunLua(LuaManager.java:496)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:342)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:264)
at zombie.network.GameServer.doMinimumInit(GameServer.java:1417)
at zombie.network.GameServer.main(GameServer.java:688)
LOG : General , 1758936670789> 736,017,550> -----------------------------------------
STACK TRACE
Gojita 26 Sep @ 6:33pm 
-----------------------------------------
function: zzSR_ReloadWeaponAction_onShoot.lua -- file: zzSR_ReloadWeaponAction_onShoot.lua line # 60 | MOD: More Realistic Gun Jams [B41]

Sep 27, 2025 8:31:10 AM zombie.Lua.LuaManager RunLuaInternal
SEVERE: java.lang.RuntimeException
Sep 27, 2025 8:31:10 AM zombie.Lua.LuaManager RunLuaInternal
SEVERE: java.lang.RuntimeException:
Sep 27, 2025 8:31:10 AM zombie.Lua.LuaManager RunLuaInternal
SEVERE: at zzSR_ReloadWeaponAction_onShoot.lua:60
Ser Ripsen  [author] 25 Sep @ 5:16pm 
@Gojita
Based on the description they do the same thing, I haven't reviewed the actual code. Theirs has some support for Mod Options which mine does not.
Gojita 8 Sep @ 11:40pm 
I'm currently using this: https://steamproxy.com/sharedfiles/filedetails/?id=2980114616

Is there any noticable differences?
Construct 14 Mar @ 10:26pm 
Amazing mod thanks