Project Zomboid

Project Zomboid

Multi Hit Limiter
65 Comments
Construct 3 Mar @ 1:00pm 
@sowilo Is this getting updated for b42? sorry if my comment is annoying, but the game is basically unplayable for me without this mod
Harkyun 9 Jan @ 8:35pm 
Please update this
Sheogorath 1 Jan @ 8:50pm 
Please update this mod bro:memento:
Xyrkzes 20 Dec, 2024 @ 8:58pm 
I really hope this mod gets updated because infinite multihit is too strong but fighting more than 2 zombies at once is atrocious without it.
Strelok 15 Aug, 2024 @ 2:51pm 
This mod is necessary to make multi hit more realistic.
cznorton2 31 Jul, 2024 @ 6:01pm 
will this mod get updated
Javaugh 26 Feb, 2024 @ 11:38pm 
Tried it, it works. Remember to enable vanilla setting for multihit on.
aquelarrefox 23 Jan, 2024 @ 12:28pm 
i think a good configuration is set 3 in skill requereriments, turn off spears and a whitelist for vanilla:
Base.GuitarAcoustic,Base.BarBell,Base.BaseballBat,Base.Broom,Base.CanoePadel,Base.CanoePadelX2,Base.GuitarElectricBassBlack,Base.GuitarElectricBassBlue,Base.GuitarElectricBassRed,Base.GuitarElectricBlack,Base.GuitarElectricBlue,Base.GuitarElectricRed,Base.GardenHoe,Base.Golfclub,Base.HockeyStick,Base.IceHockeyStick,Base.Keytar,Base.LaCrosseStick,Base.LeafRake,Base.Plank,Base.Poolcue,Base.Rake,Base.Saxophone,Base.Shovel,Base.Shovel2,Base.SnowShovel,Base.BaseballBatNails,Base.PlankNail,Base.LeadPipe,Base.MetalBar,Base.MetalPipe,Base.PickAxeHandle,Base.PickAxeHandleSpiked,Base.Banjo
is it comma separed in the list like i wrote?
✪ Tax 20 Jan, 2024 @ 4:04am 
Two questions:
1. Does the "range requiered" refer to the minimum range needed to multi-hit-shove, or the maximum range at which a zombies can be multi-hit/shoved?
In other words, with the 1.21 setting, can I multi-X zeds who are basically reaching for my neck already?

2. What setting do I turn on/off to enable multi-shove only and no multihit? I don't see it in the preview menu
nyhr213 19 Jan, 2024 @ 10:58pm 
Hello, @Sowilo can you please add me? I'd like to talk about making the mods compatible, but more importantly about the java fix
guankerry 19 Jan, 2024 @ 5:17am 
Tried it, doesn't work.
aquelarrefox 18 Jan, 2024 @ 9:37am 
Could you add somekind od moodle restriction like panic or pain to disable the multihit?
aquelarrefox 4 Jan, 2024 @ 4:20am 
when you unchek one type of weapon of the list: it doesnt do multihit or doesnt use the requeriment to be used as multihit?
aquelarrefox 29 Dec, 2023 @ 2:28pm 
is it working? im inetersting in skill and streght requeriment
force A tratt 29 Nov, 2023 @ 10:11am 
this mod doesnt work, it doesnt care what settings you change
Fantas 15 Nov, 2023 @ 6:53am 
tried for hours, still cant make the mod work
where is the settings?????
𐂃𐂃 14 Nov, 2023 @ 11:53pm 
I use this in multiplayer and it doesn't work.
Fantas 14 Nov, 2023 @ 11:29pm 
where do i find the settings to this mod? im hosting server and i cant find it
Sowilo  [author] 2 Nov, 2023 @ 7:07am 
Not tested the update in MP yet, but I don't see why it wouldn't work. Java mod shouldn't be trouble for server owners (other than if you run a public server and want to try to make people install it...), the only unfair advantage is in not using it, since unfortunately Java mods are client side; this means properly limiting shove is opt-in and requires making sure friends install it.

Basically it provides a way to actually mod the shoving dummy item on players and makes attacks actually respect those changes, since before whenever you shoved, the max targets was a flat pre-defined number that didn't even check the item itself. So it actually works now with it installed.

Any problems with the new update let me know, not sure I have much time for support again but I'll make sure to check here for at least a few days in case there's any issues I didn't find testing by myself.
Sowilo  [author] 2 Nov, 2023 @ 7:01am 
Been playing some Zomboid again after being busy with other stuff for a while (apologies for the resulting lack of modding support), and I've attempted to provide a fix for tweaks to shoving not working properly (requires a tiny Java mod), along with some general improvements to the code checking player items. stats, and etc.

In my testing in debug mode it seems to work entirely as intended now. I tested with a non-multi hit weapon and a cap of 2 on shoving as well as with a multi hit weapon and no multi hit on shoving, both worked as expected. Besides working properly at all, shove should now respect fitness/strength requirements too.
󠁳⁧⁧ ‡ 1 Oct, 2023 @ 6:34am 
I'm having an issue where I still multi hit even though I don't meet the requirements I set to be able to. I moved this mod to the bottom of my load order and I'm not sure what mods I could have that could be affecting this? I have Firearms B41 and Fancy/Brutal handwork but thats all I can really think of at the moment. Any ideas?
Hunchback.Supreme 22 Sep, 2023 @ 8:23pm 
Would it be possible to make it so only the sledgehammer has multi hit?
Grunil Master 25 Aug, 2023 @ 12:02pm 
Perfect idea, and what missing to the game for certain weapon.
Bostson 23 Aug, 2023 @ 11:43am 
please, add a weight and attack speed requirement, and max number of zombies hit

I would like only slow, heavy weapons to multi hit, and only hit 2
HighClarity 18 Aug, 2023 @ 5:42pm 
Dividing damage among zombies hit would be perfecto!
Quilboar 5 Aug, 2023 @ 12:48am 
@jazzboat_ agreed, rare critical
Nick a Rat 9 Jul, 2023 @ 4:16pm 
Where do I go to modifie the multi-hit for my server? I cant seem to find it
ScootyDoo11 5 Jul, 2023 @ 2:43pm 
Any way to possibly divide the damage dealt by the number of targets? I can't imagine the third zombie in the swing would recieve the full force of it, so I think it would be simpler to just make it half for 2 and 1/3 for 3.
Kyrox 28 Jun, 2023 @ 2:23am 
Any chance at looking at compatibility for Gun Stock Attack? It allows you to use your firearm to attack zombies. No matter t he settings, if multihit is enabled, it just multihits everything.
BNUUY | jazzboat_ 10 Jun, 2023 @ 9:03am 
is there anyway that there could be only a chance to multi-hit?
Bussy Butcher 9 Jun, 2023 @ 2:38pm 
This mod is exactly what I was looking for and more. Bravo!
Lucaine 9 Jun, 2023 @ 1:57am 
Same problem as below, I run a dedicated server, and no matter what settings I change, it just doesn't work.
Arthuring 8 Jun, 2023 @ 6:31pm 
doesn't work on dedicated servers, it just ignore sandbox configurations and everything hits 3 zombies regardless
50sac 2 Jun, 2023 @ 6:10am 
Works perfectly, just the mod I was looking for - should definitely be a part of the base game imo. Good job!
diamond booger 31 May, 2023 @ 10:50pm 
I moved this mod near the top of my load order and I'm no longer experiencing this behaviour, I guess it's just an issue with the way PZ loads a large list of mods
diamond booger 31 May, 2023 @ 12:38pm 
So on the first time I start zomboid and load my save the settings I have set are going to default, once I exit to main menu and reload it's fine until I close the zomboid exe.

The other mods I have with custom sandbox settings are properly loading but the multi hit settings are set to default 100% of the time on my first launch of the game so I have to load my save twice on the first launch to get things working essentially.
Yub3l 29 May, 2023 @ 8:56pm 
I just wanted to take a moment to say, without any negative things attached at the end: I am so grateful for this mod. It has been an issue between me and my girlfriend for a while now, she wanted multi-hit and I didn't want it as it is without this mod, and this mod solves a months old disagreement. So, from the bottom of my heart, thank you so much for this mod I was so happy when I found this!
Sowilo  [author] 28 May, 2023 @ 6:54pm 
Happy to hear that, and I hope it will be too, always an honour as a modder if something you do becomes vanilla after all!

I looked into it quite a bit and did some testing, in case there was a non-obvious way to fix the problem. My first guess is there might be some kind of hidden Base.Hands item actually on the player somewhere affecting it, but no dice on that. My second thought was to try temporarily adjusting the max hit count of a weapon when you shove with it, but no luck on that either; it doesn't take effect in time to do anything.

So sadly not possible right now as far as I can tell. I'll dig through the decompiled game code in Java sometime just to be 100% sure, but I'm not expecting any solution. If it becomes possible in the future like in Build 42, I'll take another look then.
diamond booger 28 May, 2023 @ 6:40pm 
Gotcha! Thanks for investigating, if it's a game limitation that's fine, hopefully something like your mod gets incorporated in the base game in a future update because having multi-hit be customizable is amazing.
Sowilo  [author] 28 May, 2023 @ 6:05pm 
Hmm, I can think of one other reason that could be happening actually, so just in case, I'll check out a couple more things in debug mode first before I resign to "not possible".
Sowilo  [author] 28 May, 2023 @ 5:54pm 
I can confirm it works the way you're describing.

From what I can tell, it looks like when using a weapon the game always uses its multi hit max hit count for shoving while ignoring that parameter on the Base.BareHands item, which appears to only be used when a weapon is not equipped. As a result, I believe disabling multi-shoves while keeping multi hit on a weapon is unfortunately not possible.

It is a bug, but unfortunately I don't think it's possible for it to be fixed through normal modding. I will add a note in the description.
Sowilo  [author] 28 May, 2023 @ 5:32pm 
Got what you're saying now. I'll give a a quick test to see if I can reproduce the issue myself.

For the skill requirement, I would not have expected weapon skill to affect shoving myself since to me it's something weapon independent, but I can see why you might expect otherwise. Right now, shoving shouldn't behave any differently no matter what weapon is being used (could possibly add a sandbox setting to make it weapon skill dependent if someone requests it), so what's happening is definitely a bug.
diamond booger 28 May, 2023 @ 5:12pm 
So with 1) I have a 2H weapon and unarmed shove is off, while i have the 2H equipped it shoves as though the unarmed skill has multi hit enabled. When I unequip the weapon then the shove behaves as though multi hit is disabled.

Also this was happening with the 2H weapon having a requirement I didn't meet, so I shouldn't have been able to multi shove at all

Thanks for the update! I'll test it and report back after I've played with it for a bit :
I will try putting the barefists on blacklist as well
Sowilo  [author] 28 May, 2023 @ 4:55pm 
(cont. from Steam comment character limit)

If you want to disable multi hit for shoving, assuming you haven't, I suggest adding Base.BareHands to the blacklist to see if it helps. Since there is no unarmed skill, note that skill level isn't checked for unarmed "weapons" like shoving. Note also that minimum range and the new two-hand requirement are checked for the shove dummy item too (it counts as one hand with range 1.1), which I realise may be confusing.

If it's still behaving in an unexpected way after the update, let me know, and explain what you expect to happen if possible too.
Sowilo  [author] 28 May, 2023 @ 4:54pm 
@diamond booger Thanks a lot for the report. Although I only saw this comment just after updating now, I coincidentally may have made some changes that might have fixed issue 2, and may potentially help with 1 too.

To be clear with 1), if I understand correctly, it multi-shoves even though it's disabled for unarmed when you wouldn't expect it to, except for some reason it occasionally works as expected and single shoves when you unequip the weapon?
diamond booger 28 May, 2023 @ 3:46pm 
I've played more and I noticed two things which may have confused me the first time.

The settings I chose are to make multi hit disabled until skill 3 and I untick unarmed.

1) When using a 2handed weapon, crowbar/baseball bat is what I use when shoving with the weapon equipped it multi-shoves. But when the weapon is put away and I shove it single shoves. It also multi shoves even though my 2h skill is not at 3

2) Very rarely when I load my save it seems to initialize to default settings instead of my settings and I have to quit to main menu and reload the save
Sowilo  [author] 28 May, 2023 @ 3:28pm 
@diamong booger Just in case it helps you or anyone else, Change Sandbox Settings should be compatible with this, but the settings for multihit are initialised when you load the world. So if you change the sandbox settings with the mod, I recommend immediately quitting and reloading to ensure they take effect. This applies not only to the sandbox settings of this mod, but for a lot of other mods and potentially some vanilla ones too; it's always best to exit and reload after adjusting them.
sourskittlezzz 28 May, 2023 @ 3:21pm 
I've seen the video you got the thumbnail from.
diamond booger 26 May, 2023 @ 11:47am 
ok so I was using Change Sandbox options by Star midgame and that's why I had issues

Made a new save with same mod list and no issue, disregard my last post sorry
diamond booger 25 May, 2023 @ 9:19pm 
playing on single player and when I untick unarmed shovingl still gets multihit, I also tried to put Base.BareHands in the blacklist and it didnt have an effect.

the other settings are working for me though