Left 4 Dead 2

Left 4 Dead 2

Melee Frenzy (Fast Melee Attack)
168 Comments
kurochama  [author] 21 Jul @ 11:39am 
@Immortallnd , try to play Singleplayer in any map. Then, after your character spawns in the map, exit to main menu. Check the "ems" folder. The "melee frenzy" folder will be there.
Immortallnd 21 Jul @ 11:11am 
I cant find an ems, I don't know if i did anything wrong but im going to try reinstalling
kurochama  [author] 20 Jul @ 10:00pm 
@Immortallnd , check ".../Left 4 Dead 2/left4dead2/ems/" for the cfg file.
Immortallnd 20 Jul @ 6:30pm 
New to the game, I having a hard time figuring out how this mod works ngl, just a bit lost
EVIL_SUPRESOR 15 Jul @ 1:54am 
@Kurochama, In essence, that's how it is, yes - that script somehow calculates what kind of weapon the player is currently holding and sets a different value when receiving damage, simulating damage resistance. But there is a direct change there, and yours is dynamic (with settings and a whole percentage calculation system).

It's just that in your case, as I said, there is a mini-bug when, with 50% protection, a zombie on an expert deals 10 damage to the player, but if the player has 20 or less left, the script does not have time to make the calculation, which is why the player receives the full 20 damage and eventually falls. In the case of the previously described script from another author, such a mini-bug is not observed. I don't understand how he did it, because when viewing the script internally, there are the same "variables" for receiving damage as you have... So I'm sharing the information - maybe this will help you with modding!

Thank you for your attention, author!
kurochama  [author] 14 Jul @ 11:48am 
@ EVIL_SUPRESOR , so, what you meant was something like "flat damage", right? For example, like this:
1. Percentage-based damage resist (auto): main damage - 50%
Normal tank: 25 = 25 * 0.5 = 12.5 (13 damage)
Expert tank:100= 100 & 0.5= 50
2. Flat damage (manual)= Zombietype damage by difficulty
Normal Tank= 10
Expert Tank= 30
Normally it should be possible, but the methods will be much simpler with the "percentage-based damage resist", as it scales the damage resist automatically based on the main damage (it works automatically on any difficulty levels), while the "flat damage" may require to manually set the damage based on each difficulty level.
EVIL_SUPRESOR 14 Jul @ 8:46am 
I apologize for such an incorrect translation, since the wording here is quite tricky. But I will try to explain it this way: I saw a system in the script for the riot shield that also reduces damage, but differently: instead of the stated 65% damage reduction, it set something like a fixed value of damage to the player with this riot shield. Like, logically, 65% damage from a tank should be exactly 35 points, but the script indicates that the damage that the tank will inflict on the player will be equal to 33 points, not 35. And so with all the variables regarding the infected: regular zombies on expert do not inflict 7 damage, as they should according to the logic of 65% protection, but exactly 5 points of damage. Because the creator of the mod set a FULL value of "protection" for a melee item.
kurochama  [author] 14 Jul @ 6:45am 
@EVIL_SUPRESOR , I still can't understand some of what you explained (like the coefficient thing & what kind of damage resist you wanted to explain about protection value). But on the update before updating the "Melee Frenzy Mode", I changed the mechanisms of "Melee Damage Resist" to apply to all damage & tested on a witch on Normal difficulty. I took 50 damage instead of 100 with 50% damage resist. So, if witch that normally can instantly incapacitates a survivor only deals 50 damage, it means that the damage resist works. & yes, the damage mechanisms on the "player_hurt" event function count the original damage first before it's reduced by the damage resist percentage.
EVIL_SUPRESOR 14 Jul @ 4:00am 
It would be easier if your script fixed the incoming damage coefficient (I saw this in a similar mechanic for another author's shield - inside the script I saw that the damage reduction was converted to a value - where the damage resistance is not 65%, but simply the damage coefficient upon receiving is set approximately equal to the protection value).

My job is only to note this feature, but to do something with it is up to you. But I like your modification!
EVIL_SUPRESOR 14 Jul @ 3:59am 
I think I figured out why a tank can one-shot a player, and why other zombies can one-shot him with a melee weapon with +50% damage resistance - the game/script counts incoming damage AFTER it's been counted, hence the problem: at 20 health, the player gets knocked down by regular zombies in one hit, although before that they dealt 10 points of damage. The same applies to the tank: I took mods for testing that reduce the tank's damage by 50%. This results in the tank doing 25 points of damage with your resistance... 25 points of damage until the player's health drops to 50 and below - after which the tank just deals one hit.
The Slayer 19 Jun @ 12:55am 
Okay everything work just fine now!!!
Tks bro for the quick fix
If I see any bugs need fixing I'll tell ya :steamhappy:
Player 18 Jun @ 7:59pm 
Because I am a person who limits himself depending on the game but at the same time likes variety: If adrenaline allows you to melee much faster (as it would happen in real life) then it would give more life to the game than simply meleeing quickly. In addition, you could release different versions of speed and combine your addon with "New" Melee Animations of the user Bob the taco
The Slayer 18 Jun @ 1:40pm 
I'll try it tomorrow
It 3 a.m in my country :v
kurochama  [author] 18 Jun @ 12:42pm 
@The Slayer , yeah, I know what you meant about the missing attacks. I tested on previous versions too, like the firsr version when I updated "Melee Frenzy Mode" missed quite often, & then it became less frequently on the previous version. & on this latest version, the missing attack no longer happened when I tested it with the value from 20 to 40. I haven't tested the value below 20. You can try it.
The Slayer 18 Jun @ 12:26pm 
And the missing attack I talked about only happens when I turned on the new melee frenzy function you added
The Slayer 18 Jun @ 12:24pm 
i set the value at 12 so it should not causing any bug right?
kurochama  [author] 18 Jun @ 9:55am 
@ The Slayer , I just updated a quick fix. I tested 3 melee weapons this time: knife, shovel & fireaxe, with "melee_range 150" & "Melee Attack Speed" set to value from 20 to 40, by Holding attack button in front of saferoom with incoming attack triggered endlessly. So far the melee hit all zombies without missing one. You can give a try too, & let me know if you still find some melee hits missing.
kurochama  [author] 18 Jun @ 9:36am 
@ The Slayer , what's the value on 'Melee Attack Speed"? Last time I tested 20 when testing "melee_range" with machete. Probably I'll need to reduce the melee attack speed on the scripts again to check if that will fix the remaining missing hits.
The Slayer 18 Jun @ 9:22am 
After testing, the melee range work but the dmg missing in some hits when I swing melee @@
kurochama  [author] 18 Jun @ 7:36am 
@The Slayer , I just finished updating. Probably it should be fixed now. I tested with different melee range from 160 to 350 via "melee_range" cvar & the melee range took effects. You can give a try.
The Slayer 18 Jun @ 5:40am 
I just edit the value to 12, everything work fine with the normal melee frenzy (still laggy when hold the attack button though)
On the other hand, the new melee frenzy mode indeed removes the laggy when hold the attack button but some hits didn't do any damage and also the melee range is reversed back to default(70) despite I set it to 150 on my other range melee script
kurochama  [author] 18 Jun @ 5:04am 
@The Slayer , have you set the "Melee Attack Speed" to lower value? Last time I only checked by hitting the wall by setting the value to 20, & it left some hit traces. Probably I'll test more on zombies soon.
The Slayer 18 Jun @ 2:48am 
I confirmed that the axe don't dealt any dmg when attacking 😀
The Slayer 18 Jun @ 2:44am 
Oh and I noticed that, when you hold the attack button, some hits don't cause any dmg
The Slayer 18 Jun @ 2:35am 
Oh I just tested it
It seem that the lag is gone but the attack speed is too high, can I edit it somehow?
kurochama  [author] 18 Jun @ 12:08am 
@ ๋ , normally it should be possible. But why do you want a "nerfed" version instead of full version?

@The Slayer , hello I just wanted to inform you that I updated a new feature, "Melee Frenzy Mode". This controls the mode used for "Melee Attack Speed". The default that made you laggy last time was the default mode. You can try to set it to 1 for the "alternative mode". This "alternative mode" shouldn't cause lag (at least I didn't lag when testing this before uploading). You can try it.
Player 10 Jun @ 12:20pm 
Bro can make meele frenzy only when uses adrenaline?
kurochama  [author] 9 Jun @ 11:06am 
@EVIL_SUPRESOR , you're welcome. Let me know if you find other problems when using this mod.

@The Slayer , then probably for now the only way would be either tapping on each melee attack, or holding attack button only if zombies are in melee range. Probably I'll change the scripts for melee attack speed again when I find more effective ways or solutions to remove the lag when holding attack button.
The Slayer 9 Jun @ 9:56am 
Oh and I forgot to mention
The laggy only happen when I hold the attack button while running
The Slayer 9 Jun @ 9:24am 
Nope, the laggy was still there even when I turn off all of my melee scripts
Strange....I read a cmt below and there is one person who had the same problem like me
Well, I'm still using your mod
Just gonna ignore the problem 👌
EVIL_SUPRESOR 9 Jun @ 8:20am 
@kurochamaw. Thank you for paying attention to us and making changes. Good luck in life and in your modding career!
kurochama  [author] 9 Jun @ 12:05am 
@The Slayer , probably. You can try to check it by using other melee weapons that don't use melee scripts. I never used any melee scripts when testing this mod.
The Slayer 8 Jun @ 8:05pm 
i setup my attack speed at only 15 but I'm also using some melee scripts to modified the attack pattern of some weapon like the knife or the pitchfork hit box, does that causing any trouble?
kurochama  [author] 8 Jun @ 2:37pm 
@The Slayer , about anim being too fast, that's also one reason why I limited "Melee Attack Speed" to only 50. Knife, if set higher than 50 will be bugged as the anim becomes too fast so it even reverts back to the first swing before it can even land a hit. The safe value would be between 30-40. 50 is fine, as long as the melee is not modified via melee script mods.
As for the missing sound effects, that didn't happen to me somehow. I used some lightsaber melee mods too that have lightsaber swing sound, & the sound was played when I held attack button for fast melee attack. I'm not sure about other melee skin mods with sound effects though.
The Slayer 8 Jun @ 1:48pm 
i think it not causing my fps to drop but bcz the attack anim is too fast when hold the attack button so it break the animation
Also I noticed that sometimes the sound effects when I hold the attack button is missing for some reasons, like the melee swing sound for instance
kurochama  [author] 8 Jun @ 12:32pm 
@The Slayer , you can try the new update. I slightly changed the scripts on melee attack speed. This should fix the lag. But if it doesn't, then there's nothing to do except to do the trick like instead of holding attack button/ left click, tap the button/ click instead.
The Slayer 8 Jun @ 10:51am 
hey why it so lag when I'm using melee to attack bro?
kurochama  [author] 8 Jun @ 10:23am 
@EVIL_SUPRESOR , I updated the mod on "Melee Damage Resist" part. This should fix that problem (probably). I tested on witch on Normal difficulty with max value of "Melee Damage Resist" before uploading the update, & she only dealt 50 damage.
kurochama  [author] 8 Jun @ 9:57am 
@EVIL_SUPRESOR , as the damage resist only reduces 50% of damage on the max value, tank on Expert difficulty can bypass this damage resist. Damage resist still works on tank on lower difficulty levels.
EVIL_SUPRESOR 8 Jun @ 7:28am 
I encountered a special problem, most likely it's a bug.

In general... The tank violates the "damage resistance" clause when using melee weapons. And this happens when the zombie gorilla deals damage in the region of 30-50 units of health to the survivor, and sometimes even knocks him out at full health.

Can this be fixed, or is there no hope?

My friends and I really liked the modification! This is a second and third wind at the same time for berserk gaming in the post-apocalypse. This is taking into account that we managed to try out all the innovations of your script, and even in the end set only resistance - we were very, VERY pleased with this mechanic!

Thanks for your efforts, author!
kurochama  [author] 29 May @ 1:57am 
@Kenito , yes, if you host a local server.
Kenito 29 May @ 12:52am 
Does this mod work in multiplayer?? me and my friends are planning to use this mod
kurochama  [author] 6 May @ 6:32am 
@Unusual pizza , check the description. I put some info about that on "Health Buffer Bonus"
Unusual pizza 6 May @ 12:36am 
is it possible to change how much health you regained after killing infected?
kurochama  [author] 23 Apr @ 3:17pm 
@Fred , changes on the cfg file are applied only when reloading guns or on the first/ next chapter.
Fred 23 Apr @ 1:22pm 
does it make any changes by default or is the template for us to play around with?
kurochama  [author] 25 Mar @ 3:34pm 
@Ellis Buckshank , you can try to reset the cfg file by deleting it & then reload your gun. Try to change the value again after the reset. I'll try to check it later when I'm on my laptop.
Cute Devil 25 Mar @ 11:37am 
Hey again, I’ve tried just about everything I can—including the config and button inputs—but I still can’t get the Melee Dash or Shockwave to work. I really love this mod and would love to get it working if there’s anything else I can try. Totally understand if you’re busy, I just didn’t want to give up on it yet
kurochama  [author] 24 Mar @ 10:42pm 
@Ellis Buckshank , you can try to jump & then press E + Attack. "Melee Dash" has longer dash range when used while jumping, but when used on the ground, you'll need to look slightly above.
Cute Devil 24 Mar @ 4:57pm 
yeah i held E and pressed attack, thats why i was confused when it didnt work, is it something to do with melee mods?