Project Zomboid

Project Zomboid

Brutal Handwork
dhert  [developer] Feb 17, 2023 @ 2:38am
Report Bugs here
A list of current bugs and limitations of this mod are below. I am calling the limitations "bugs" because they will be fixed.
  • RANGED WEAPONS DO NOT CURRENTLY WORK IN YOUR OFFHAND! THIS WILL COME IN A LATER UPDATE! ONLY MELEE WEAPONS FOR NOW!
  • PVP IS COMPLETELY UNTESTED, BUT TECHNICALLY SHOULD WORK. YOU WILL ONLY HIT ANOTHER PLAYER IF NO ZOMBIES ARE IN RANGE. PVP WILL BE DEFINITIVELY/TESTED ADDED LATER!
  • The offhand/unarmed attack is a TimedAction, but really this is only used to sync the state of the animation; timing and other stuff is all done based on the calculated attack speed, etc. This has left one issue: the Turning Animation. Turning in Project Zomboid kinda sucks, as it overrides the animation state and will delay TimedActions. I have worked around this by briefly locking your character's facing direction (talking 2-3 frames, so not even noticeable) so that the attack animation has time to start before allowing the turn again. This is not perfect and the turn can still kinda happen, so do note that attempting to turn and do the offhand attack may cause the offhand attack to start a bit later than expected.
  • Offhand damage is sometimes incorrect. The vanilla functions are used to perform the Hit action, and the primary weapon is hardcoded to be used in some functions. I work around this now by changing a multiplier by the inverse it would receive for the primary weapon and apply corrections to the secondary, but this does not yield 100% accurate results. The only solution that worked after weeks of testing was to completely rewrite the damage calculations myself. I have done this, but found I could not get target hit reactions to sync in multiplayer; so for now the code is unsued. I have some major plans to incorporate this, but need more time to work out a solution for the target syncing.
    In the next update, I will first release a SINGLEPLAYER only version of this damage function.
  • Offhand attacks use the vanilla Hit function, and for whatever reason the hit reaction doesn't seem to work as expected for offhand attacks. Zombies don't seem to fall down as consistently, but it still does happen; they do stagger from the hit and all no problem still. My functions correct this, but they do not sync in multiplayer at this time.
  • Offhand/Unarmed attacks currently do not trigger Critical Hits, and sometimes Rear Damage for some reason (blame the built-in Hit function). My functions correct this, so will be fixed later.
  • Offhand attacks sometimes hit a different enemy than expected. The target is determined based on the weapon's attack range and arc, and found objects are sorted by distance; the closest object is then hit. This does mean that you may hit a target that is closer to you but to your left or right instead of what is highlighted. I am working to fix this.
  • Offhand attacks do not trigger a "Down" attack, and will instead do the primary weapons "Down" attack or stomp on the enemy.
  • Sometimes when you spam press the offhand attack, your character will flap their arms as a "shove" instead of attacking. This attack could do a lot of damage for some reason. I have tried to mitigate this as much as possible, but it still can happen.
  • When using on a Dedicated Server, there is sometimes an error when unarmed attacking. I have found no rhyme or reason for this: it sometimes happens when you hit a Zombie, but the next/other hits on the same zombie work fine. It seems to be due to the server not instancing the weapon properly on hit sometimes. The error is harmless and everything seems to still work, but does generate noise in the log. Sorry about that.
  • Raising your fists does not sync in multiplayer, but attacks do. This will require a change in Fancy Handwork, coming soon.
Any bugs should also be reported here with logs; please do not simply say "X doesn't work" without giving more information or your comment will just be deleted. These comments do nothing to help, and unless it is very easy to reproduce, will not lead to me being able to replicate or fix it. Help me, help you.
Last edited by dhert; Feb 17, 2023 @ 2:45am
< >
Showing 31-45 of 132 comments
PepperCat Feb 20, 2023 @ 6:10am 
I have been testing this with a nightstick and a knife. Not always, but ocassionally when fighting and switching with what I want to use to attack I get this lua error (I repeat, not always). Hope it helps you

STACK TRACE
-----------------------------------------
function: addToHitList -- file: BrutalAttack.lua line # 511 | MOD: Brutal Handwork
function: FindAndAttackTargets -- file: BrutalAttack.lua line # 583 | MOD: Brutal Handwork
function: animEvent -- file: BH_MeleeAttackTimedAction.lua line # 87 | MOD: Brutal Handwork

ERROR: General , 1676901721292> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: isZombie of non-table: zombie.iso.objects.IsoFallingClothing@2799293d at KahluaThread.tableget line:1689.
ERROR: General , 1676901721293> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: isZombie of non-table: zombie.iso.objects.IsoFallingClothing@2799293d
dhert  [developer] Feb 20, 2023 @ 9:10am 
@PepperCat - Hello! Thanks for letter me know about this one, how very odd the Object being checked there doesn't have that function....
Does this happen more when a zombie is currently dying and still in range (i.e. they're dead but still falling down), or possibly when a hit actually kills the zombie? Or just in general, this can randomly happen? Thanks again!
Radiant Feb 20, 2023 @ 9:30am 
Got a thing. When you carry something in your primary hand (large backpack in my case), then attack from your second hand (hunting knife in my case) will not register. I am not sure if it's this mod's problem because I have, like, 10 pages of them, but still it may be a bug
Last edited by Radiant; Feb 20, 2023 @ 9:37am
Radiant Feb 20, 2023 @ 9:51am 
I guess I found it...?

STACK TRACE ----------------------------------------- function: FindAndAttackTargets -- file: BrutalAttack.lua line # 621 | MOD: Brutal Handwork function: animEvent -- file: BH_MeleeAttackTimedAction.lua line # 87 | MOD: Brutal Handwork ERROR: General , 1676914325236> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in FindAndAttackTargets at KahluaUtil.fail line:82. ERROR: General , 1676914325236> DebugLogStream.printException> Stack trace: java.lang.RuntimeException: Object tried to call nil in FindAndAttackTargets at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:973) 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.pcallvoid(KahluaThread.java:1861) at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:48) at zombie.characters.CharacterTimedActions.LuaTimedActionNew.OnAnimEvent(LuaTimedActionNew.java:152) at zombie.characters.IsoPlayer.OnAnimEvent(IsoPlayer.java:9409) at zombie.core.skinnedmodel.advancedanimation.AdvancedAnimator.OnAnimEvent(AdvancedAnimator.java:264) at zombie.core.skinnedmodel.advancedanimation.AnimLayer.invokeAnimEvent(AnimLayer.java:211) at zombie.core.skinnedmodel.advancedanimation.AnimLayer.updateInternal(AnimLayer.java:419) at zombie.GameProfiler.invokeAndMeasure(GameProfiler.java:166) at zombie.core.skinnedmodel.advancedanimation.AnimLayer.Update(AnimLayer.java:323) at zombie.core.skinnedmodel.advancedanimation.AdvancedAnimator$SubLayerSlot.update(AdvancedAnimator.java:665) at zombie.core.skinnedmodel.advancedanimation.AdvancedAnimator.updateInternal(AdvancedAnimator.java:403) at zombie.GameProfiler.invokeAndMeasure(GameProfiler.java:166) at zombie.core.skinnedmodel.advancedanimation.AdvancedAnimator.update(AdvancedAnimator.java:368) at zombie.characters.IsoGameCharacter.postUpdateInternal(IsoGameCharacter.java:12087) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.characters.IsoGameCharacter.postupdate(IsoGameCharacter.java:12063) at zombie.characters.IsoPlayer.postupdateInternal(IsoPlayer.java:3740) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.characters.IsoPlayer.postupdate(IsoPlayer.java:3733) at zombie.MovingObjectUpdateSchedulerUpdateBucket.postupdate(MovingObjectUpdateSchedulerUpdateBucket.java:97) at zombie.MovingObjectUpdateScheduler.postupdate(MovingObjectUpdateScheduler.java:168) at zombie.CollisionManager.resolveContactsInternal(CollisionManager.java:411) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.CollisionManager.ResolveContacts(CollisionManager.java:236) at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:3502) at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83) at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230) at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26) at zombie.util.Lambda.capture(Lambda.java:130) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81) at zombie.iso.IsoWorld.update(IsoWorld.java:3427) at zombie.gameStates.IngameState.updateInternal(IngameState.java:1617) at zombie.gameStates.IngameState.update(IngameState.java:1333) at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101) at zombie.GameWindow.logic(GameWindow.java:298) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.GameWindow.frameStep(GameWindow.java:765) at zombie.GameWindow.run_ez(GameWindow.java:681) at zombie.GameWindow.mainThread(GameWindow.java:495) at java.base/java.lang.Thread.run(Unknown Source) LOG : General , 1676914325239> ----------------------------------------- STACK TRACE
Last edited by Radiant; Feb 20, 2023 @ 9:55am
dhert  [developer] Feb 20, 2023 @ 10:13am 
@Cynte - Yea, this is my bad. I wanted to patch-out an exploit and didn't do it right. Unfortunately, I am too far along into my next update to simply release a fix for this now; but for sure in the next release. Sorry in the meantime.
PepperCat Feb 20, 2023 @ 5:27pm 
Originally posted by dhert:
@PepperCat - Hello! Thanks for letter me know about this one, how very odd the Object being checked there doesn't have that function....
Does this happen more when a zombie is currently dying and still in range (i.e. they're dead but still falling down), or possibly when a hit actually kills the zombie? Or just in general, this can randomly happen? Thanks again!

It happened twice now while fighting against one zombie with primary hand axe and secondary knife. I was atacking axe-knife-axe-knife, both times I attacked with the knife while the zombie was stuned because of the axe, the error appeared.
Last edited by PepperCat; Feb 20, 2023 @ 5:43pm
dhert  [developer] Feb 20, 2023 @ 6:24pm 
@PepperCat - Thanks for taking an extra look. Will definitely try and keep an eye out. Hopefully, this won't be an issue when I change how I do targeting a bit.
Fernando Feb 20, 2023 @ 8:26pm 
I've noticed an issue regarding firearms and unarmed attacks: when you equip a firearm and holster it back, it seems like the punches somewhat inherit the range of the firearm, making them behave like these weird telekinetic blasts that you can use to pummel zombies from afar with.
At first I thought this was some weird behavior caused by incompatibility with some other mod, but I've tested it on a fresh run with only this mod (alongside Fancy Handwork, of course) and Cheat Menu: Rebirth (which I used to spawn firearms) enabled and the same thing happened.
dhert  [developer] Feb 20, 2023 @ 10:11pm 
@Fernando - Thanks for testing this. This is an issue with the vanilla function I am using to hit WorldObjects, in that the range from your previously equipped weapon's stats are still being used. I am writing these functions myself for the next release, so should be fixed then.
always folding Feb 21, 2023 @ 12:59am 
Can attack with secondary weapon and unarmed works. However, when dual wielding weapons, it doesn't alternate between both hands even while holding the modifier button.

Any help?
Radiant Feb 21, 2023 @ 7:25am 
I got another two things. All of this was found out while using a hunting knife in secondary hand. Primary hand is empty

1: You can't perform a finishing attack (can't hit lying zombie) with your weapon - only stomps.
2: If you have two zombies going to you in one line on close distance, your attack may ignore the closest zombie. Instead it will hit the second zombie, the one who's going behind the first
Last edited by Radiant; Feb 21, 2023 @ 7:27am
Raving Moth Feb 21, 2023 @ 3:27pm 
Im getting errors whenever im trying to use a melee, it happens when i try to shove or hit while something is in my right hand. The same happens with the left

function: attackHook -- file: zBrutalHandwork.lua line # 56 | MOD: Brutal Handwork
function: forceAttack -- file: zBrutalHandwork.lua line # 156 | MOD: Brutal Handwork
function: onMouseClick -- file: zBrutalHandwork.lua line # 192 | MOD: Brutal Handwork.
[21-02-23 20:22:25.626] LOG : General , 1677021745626> -----------------------------------------
STACK TRACE
-----------------------------------------
function: attackHook -- file: zBrutalHandwork.lua line # 56 | MOD: Brutal Handwork
function: forceAttack -- file: zBrutalHandwork.lua line # 156 | MOD: Brutal Handwork
function: onMouseClick -- file: zBrutalHandwork.lua line # 192 | MOD: Brutal Handwork.
[21-02-23 20:22:25.627] ERROR: General , 1677021745627> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in attackHook at KahluaUtil.fail line:82..
[21-02-23 20:22:25.627] ERROR: General , 1677021745627> DebugLogStream.printException> Stack trace:.
[21-02-23 20:22:25.628] LOG : General , 1677021745628> -----------------------------------------
STACK TRACE

i dont know if any of the mods i have are incompatible, i could try with a clean install tho
dhert  [developer] Feb 21, 2023 @ 3:36pm 
@big francy vert - The player will only alternate attacks when dual-wielding if the Sandbox option is enabled.

@Cynte - I currently do not have the downward attack ported to the left hand, so it defaults to the stomp. This is something on my "to do" list
For the targeting, I am aware of this and will be working on a better targeting method. It seems to work well enough in small situations, but when large groups it can definitely be a problem.

@Jorgegay - The error you received is due to an outdated version of Fancy Handwork. An update for that mod went out right before this released, and this mod requires that update. I would recommend that you unsub/resub to both this and Fancy Handwork.
always folding Feb 21, 2023 @ 11:54pm 
@dhert I do play in Sandbox and all 3 boxes are ticked in the Sandbox options.
threedogs5 Feb 22, 2023 @ 9:39am 
for some reason when I use the modifier it locks my character in place, I can't move, attack, turn, ect, and I have to reload my save. does anyone have an idea of whats going on?
< >
Showing 31-45 of 132 comments
Per page: 1530 50