Left 4 Dead 2

Left 4 Dead 2

539 ratings
Melee weapon detailed analysis (v 1.5)
By scintillating luminescence
A thorough analysis of the official melee weapons and how to use them effectively

Updated 3/29/15 - Added information to each melee weapon regarding the delay between the melee attack beginning and the first hitray, and also added information about which maps each melee weapon is and is not available on
2
4
2
   
Award
Favorite
Favorited
Unfavorite
How these tests were performed
So you're interested in melee weapons, huh? You've come to the right place. Some of the following will look and sound really crazy, but I assure you, anyone can perform these same tests to verify what I say is true.

Here is the process used to perform this analysis. A combination of a listen server with sv_cheats 1 and melee_show_swing 1 allows you to see the melee rays. host_timescale 0.1 is useful for slowing time down to take better pictures (1/10 speed). nb_blind 1 and nb_player_move 0 (to stop the spitter) are useful for determining damage to Special Infected. sb_stop 1 will freeze the survivor bots, while z_common_limit 0, director_no_specials 1, and director_no_mobs 1 will also give you some peace and quiet to do your testing. god 1 may also be useful in the event you try meleeing boomers/spitters.

In addition, GCFScape was used to see into vpk files and extract the melee weapon scripts. A custom Sourcemod plugin was also used to print out the time between consecutive melee attacks by analyzing the CTerrorMeleeWeapon netprops m_flNextPrimaryAttack and m_flLastAttackTime for cycle time analysis, and for printing out the damage in TraceAttack/OnTakeDamage/PlayerHurt to determine the damage multiplier per hitgroup. The tickrate enabler plugin by ProdigySim was also used for analyzing melee weapon behavior at higher tickrates.
Melee Hit Rays

A melee swing will create hit rays every tick as it sweeps through the swing animation, as shown above. These images were generated at 90 tick to emphasize the sweeping motion. As shown below, the melee rays begin behind the player's eyes. Behind the eyes being the origin explains why crouching or looking down makes melee weapons more effective, since more of the rays will be swinging at larger portions of the infected's hitbox.



All rays are the same length for all weapons; this length is determined by the cvar melee_range, and the default is 70 Hammer units. All weapons also appear to have fairly similar sweep widths, although there does appear to be some minor variation.


.
This image was generated by strafing to the left, jumping, and then swinging the katana. Notice how there are four sets of four rays; each set corresponded to a different server tick. If you aren't moving, then the last ray of one tick will perfectly overlap with the first ray of the next tick, as in the first animated image. If you are moving, as in the screenshot above, then the rays will be offset from each other, which makes it easier to count them.

The melee script files in pak01_dir.pak / scripts / melee describe the direction of the melee sweeps with startdir and enddir. The total number of ticks that generate hitrays seems to correlate with startime and endtime. I believe force_dir is legit and describes the physics force that the melee weapon imparts. Duration is a complete lie.
Hit Ray Angles


The vertical angle of the player's eyes can have a significant impact on the angle between rays in a given tick, and the full width of the melee sweep. See the above 90tick images, where I swing the katana four times in each; on the left, the swings are 0/10/20/30 degrees above the horizontal, while on the right the swings are 60/70/80/90 degrees above the horizontal. Notice how the sweep is about the same size until you get above 60 degrees, at which point it begins to narrow until it has almost no sweep at the top.


.
The velocity of the player's rotation also has an impact on both the angle between rays during a tick and the final width of the melee sweep. In the 90tick screenshot above, I began swinging a katana, and then slowly increased my rate of rotation during the swing animation. You can see that the angle between hitrays starts out small and gets wider as you go counter-clockwise.


.
High tickrates also have a significant impact on melee weapons. The angle between hitrays on a given tick gets smaller, and there are also more ticks per sweep, which means more total rays. Compare these two images of the knife; the left is on a 90tick server and the right is on a default 30tick server.
Hit Ray Collision Testing

After the first ray from a melee strike connects, it will deal damage, and then mark the target as Already Hit. Subsequent rays from that swing which collide with a target marked Already Hit will do zero damage. This is true even if the melee swing proceeds to strike a different hitgroup, as in the 90tick animation above. Despite hitting two separate legs, the strike to the second leg did zero damage. (as noted below, L4D1 specials can survive multiple melee strikes to the legs) Additionally, Survivors also benefit from the Already Hit detection.

Also noteworthy is that the damage dealt is determined by the first hitgroup to be struck - this is in stark contrast to a bullet, which will do damage according to the highest-value hitgroup that the bullet passes through. However, the only enemy whose hitgroups really matter for melee weapons are chargers; you want to aim for the head, because it gets the 4x bonus that can help you level the charge. Unfortunately, due to the first-hitgroup-wins rule, if you hit the left shoulder first, you will only do 1x damage, even if a subsequent hit ray passes through the charger's face.



In the 30tick images above, I created a special situation to test how many enemies a single hitray could kill. I stopped all bots with nb_stop 1 so that they wouldn't even separate from each other, and then I stacked 11 hunters in the same area. Like a Bose-Einstein Condensate made of Hunters, haha.

In the image on the left, I took a swing at the BEC Hunters' heads. This image is the worst case - only one hitray struck their heads, with the other rays falling to either side of the head hitbox. In addition, the ray that hit the head was a single ray and it did not overlap with any other rays. As a result, only one Hunter was killed. This demonstrates that a single hitray kills at maximum one enemy. You can also see that melee weapons on higher tickrate servers become much more effective because the gap between hitrays is significantly smaller.

In the image on the right, I crouched and took another swing at those BEC Hunters. Sadly, the hitboxes rotated out of place, so this image doesn't look as good as it could. But it still demonstrates that subsequent hitrays can kill other enemies standing in the same area. Note that five hunters died - 0 on the first tick, 3 on the second tick, 2 on the third tick, and 0 on the fourth tick. Note that the last ray of the second tick and the first ray of the third tick overlap because we are standing still, which is why we only see four red hitrays while killing five hunters.

This demonstrates that it is far more effective to aim for the body than the head, as it maximizes the chances that your valuable melee hit rays will not fall in between attackers' heads. Additionally, looking straight ahead while crouching is better than looking down while standing, because Pythagoras can show us how the maximum distance from the player can only be achieved with an angle of zero. Another way to look at it would be to project the melee rays flat onto the ground - looking straight will result in melee rays that can hit targets further away than looking down.
Damage
The damage done to survivors varies by melee weapon (5 or 7 on expert, consistent with the values in the scripts divided by 10) and difficulty (following the typical friendly fire damage multipliers). Survivor damage is the only time different melee weapons do varying amounts of damage. Every melee weapon consistently does the same damage to a given non-Survivor, regardless of weapon, difficulty, and probably gamemode (I only really tested coop, take that last one with a grain of salt)

I *think* anything that's not a CCombatCharacter (not infected, not survivor) take 175 damage from a melee strike. For example, destructible props like doors. I'm not 100% sure, I didn't print out how much damage props were taking.

Melee hits do 100% of (max/current?) health to commons and uncommons (including Jimmy Gibbs and his 3000 health, excluding riot cops from the front). The witch, while technically a common, is also a Boss Infected, so she has her own rules - she loses 25% of max health per swing. Tne Tank loses 5% of max health per swing. These percentages are constant regardless of how much health the Infected have.

The Charger has a lot of caveats. Melee does 65% of max health to a charger, subject to hitgroup multipliers (4x head, 1.25x right arm, 1x everywhere else). AI Chargers also gain a 1/3x "idiot multiplier" while charging. That is, damage from all sources is divided by 3 while the AI charger charges at you. I theorize that the developers added this for AI chargers and not human chargers because the AI charges from a mile away and gets mowed down easily without such a buff. There are two implications from all this

  1. The only way to kill a full health charger in one melee blow is with a headshot, since the right arm 125% * 65% = 81.25%, but head 400% * 65% = 260%.
  2. It is literally impossible to level a full health AI charger that is charging at you. 260% / 3 = 86.67%. Any AI charger that was leveled was either a) chipped before the melee swing, b) actually controlled by a human, or c) killed by Tabun's AI Consistency plugin.

In contrast, the remaining specials lose a nominal 100% of current health, subject to hitgroup multipliers. Unfortunately, L4D1 specials have 0.75x hitgroups for legs. Using current health means the Hunter, Smoker, and Boomer can survive about five melee strikes to the legs, since the melee weapon does less damage with each swing. Spitter and Jockey have no 0.75x hitgroup, so they always lose a minimum 1x current health (i.e. instant kill). For reference, the Spitter and Jockey have the same hitgroup layout as the Charger - 4x head, 1.25x right arm, 1x everywhere else.
Shoving


The shove has hitrays much like the melee weapon. They begin on the player's right and span to the left. Unlike most melee weapons, there is no combo, and it always goes right to left. The hitrays begin scanning immediately after the shove key is registered by the server, and it proceeds to scan for the next 200 ms, with a total nominal cycle time of 700 ms. This creates about 34.29 rays per second on a 30 tick server. Finally, shoving is exactly the same for all weapons, melee or otherwise.

In the second image above, you can see a shove superimposed on a melee attack. Note how the shove is slightly wider than the melee attack, it has a greater range, and the difference in range is greatest at the periphery.

The following is speculation. There is a cvar, melee_collateral_shove_count, whose default is 16. My theory is that once a melee ray has struck a common infected, it cannot kill any more commons. Instead, any commons that would have been within range will be shoved away, up to this cvar max. I haven't proven this yet though.
Combos
Melee weapons have a series of swing animations called combos. The combo always begins with the first swing, and counts up once on each swing. The maximum combo size correlates with the number of primaryattacks in the melee scripts. The current combo will reset after the last attack, or after some time has expired without a primary attack. This timeout is determined by the cvar melee_combo_reset_time, whose default is 1.2 seconds.

A shove will also reset the animation to 1 - or perhaps it just lets the combo timeout, I'm not quite sure, because shoves are 700ms and the fastest melee swing is 575ms. Resetting the animation to the first hit in the combo by interleaving shoves with primary attacks is useful if the first swing has superior properties to the other swings, like the baseball_bat and cricket_bat and maybe even the frying_pan. For some weapons, interleaved shoves may help purely because the shove is faster than a melee attack. For other weapons you should never interleave shoves.
Individual Weapon Analyses
What follows is an analysis of all the official melee weapons, in order from worst to best (in my opinion, with supporting evidence). The general format is

Describe the swings: direction, raycount (ticks), cycle time, force, ray start delay
List maps where the weapon is available

Brief description, including average cycle time, average rays per second, survivor damage, tongue cutting, swing orientation, whether interleaving shoves is beneficial, and the occasional oddball property.

Then I will show screenshots of the melee rays for each weapon. The first set of shots will show the strafe-jump for each weapon's swing, so you can clearly see the rays. Then I will show what the swings look like while standing still. Finally, I will show the first-person perspective of the full combo.
Crowbar
First swing : Right to left, 12 rays (3 ticks), 966 ms cycle time, force vector 10 -5 5, start delay 150 ms
Second swing: Left to right, 12 rays (3 ticks), 900 ms cycle time, force vector 10 5 5, start delay 130 ms

Available: Dead Center, Dark Carnival, Hard Rain, The Passing, The Sacrifice, No Mercy, Crash Course, Death Toll, Dead Air, Blood Harvest
Unavailable: Swamp Fever, The Parish, Cold Stream

The crowbar is by far the weakest melee weapon. The cycle times are the longest on average (933 ms). It also has fewest rays on average. The abysmal cycle time and ray count combine such that a steady combo will only generate about 12.86 rays per second, just over half what most melee weapons can produce. The only "advantages" the crowbar has are 5 survivor damage, the ability to cut tongues, and all animations being horizontal. Due to the 900ms cycle time for the second swing, it may be better to interleave shoves, even though this results in only 7 rays per second, and even though the first animation is slower.



Frying Pan
First swing : Right to left, 20 rays (5 ticks), 800 ms cycle time, force vector 50 -30 0, start delay 150 ms
Second swing: Left to right, 20 rays (5 ticks), 1000/1033 ms cycle time, force vector 50 -30 0, start delay 100 ms

Available: Swamp Fever, Hard Rain, The Parish, Death Toll, Blood Harvest
Unavailable: Dead Center, Dark Carnival, The Passing, The Sacrifice, No Mercy, Crash Course, Dead Air, Cold Stream

IMO, the frying pan is the second worst, mostly due to the having the longest single attack animation of all melee (average cycle time 900 ms). Note that the second swing appears to occasionally take an extra frame; while not statistically rigorous, out of 56 second swings, 20 of them took an extra frame. Its combo generates a roughly standard 22.02 rays per second. It does 7 survivor damage, it cannot cut tongues, and all animations are horizontal. It also appears to have the highest force of all melee weapons. Due to the atrocious 1011 ms average second swing cycle time, it is recommended to interleave shoves, which will still generate 13.33 rays per second (still more than the crowbar combo!!)

Oh yeah. It sounds terrible.



Electric Guitar
First swing : Right to left, 20-24 rays (5-6 ticks), 925 ms cycle time, force vector 0 -15 0, start delay 100 ms
Second swing: Left to right, 20-24 rays (5-6 ticks), 925 ms cycle time, force vector 0 15 0, start delay 100 ms

Available: Dark Carnival, The Parish, Dead Air
Unavailable: Dead Center, Swamp Fever, Hard Rain, The Passing, The Sacrifice, No Mercy, Crash Course, Death Toll, Blood Harvest, Cold Stream

This one is only slightly better than the frying pan. Its average cycle lime is longer (925ms), but it is predictable, consistent, and it sometimes attacks for an extra frame (I have no idea why the frame count is variable). It generates 23.78 rays per second, does 7 survivor damage, cannot cut tongues, and are all horizontal. Due to the long cycle time, it may be better to interleave shoves, with 13.54 rays per second. And it also sounds awful.



Tonfa (aka Nightstick)
First swing : Upper-right to lower-left, 8 rays (2 ticks), 725 ms cycle time, force vector 20 7 0, start delay 160 ms
Second swing: Left to right, 20 rays (5 ticks), 600 ms cycle time, force vector 12 7 0, start delay 33 ms

Available: The Parish, No Mercy, Crash Course, Death Toll, Cold Stream
Unavailable: Dead Center, Dark Carnival, Swamp Fever, Hard Rain, The Passing, The Sacrifice, Dead Air, Blood Harvest

Some people like the tonfa. It has the fastest average cycle time, 662 ms. But the first swing is not horizontal, and it has the shortest frame count of any melee weapon. Despite being the fastest, the small frame count on the first swing results in the second worst rays per second, 21.13. It only does 5 survivor damage, and does not cut tongues.

Funny story, though...the melee script implies that it should be able to cut tongues (128 | 4 == DMG_CLUB | DMG_SLASH), but I don't think the key-value pair parser understands bitwise |, and so the tonfa does not do DMG_SLASH (and probably doesn't do DMG_CLUB either). Whatever you do DO NOT SHOVE, the second swing of the tonfa is the good one; interleaved shoves would generate a paltry 5.61 rays per second.



Baseball Bat
First swing : Right to left, 24-28 rays (6-7 ticks), 857 ms cycle time, force vector 15 -40 0, start delay 100 ms
Second swing: Upper-left to lower-right, 21-25 rays (5-6 ticks), 857 ms cycle time, force vector 15 40 -10, start delay 33 ms
Third swing : Upper-right to lower-left, 21-25 rays (5-6 ticks), 857 ms cycle time, force vector 15 -40 -10, start delay 33 ms

Available: All maps

The bat is where we start getting good. It has some disadvantages...the average cycle time is meh, 857 ms, and the second/third swings are not horizontal. But it has the second-highest ray count on its first swing. Sometimes, each swing will last for an extra frame, and this leads it to have the second-highest rays per second, 28.01. It does 7 survivor damage, and does not cut tongues. It also has the second highest force. Due to the diagonal second/third swings, I recommend interleaving shoves, which would still result in a healthy 16.70 rays per second.





Cricket Bat
First swing : Right to left, 24-28 rays (6-7 ticks), 857 ms cycle time, force vector 15 -40 0, start delay 100 ms
Second swing: Upper-left to lower-right, 21-25 rays (5-6 ticks), 857 ms cycle time, force vector 15 40 -10, start delay 33 ms
Third swing : Upper-right to lower-left, 21-25 rays (5-6 ticks), 857 ms cycle time, force vector 15 -40 -10, start delay 33 ms

Available: Dead Center, Swamp Fever, The Sacrifice, Crash Course, Dead Air
Unavailable: Dark Carnival, Hard Rain, The Parish, The Passing, No Mercy, Death Toll, Blood Harvest, Cold Stream

The cricket bat is a literal copy/paste of the baseball_bat in every way except one - it only does 5 survivor damage.





Fireaxe
First swing : Right to left, 20-24 rays (5-6 ticks), 925 ms cycle time, force vector 5 -5 10, start delay 100 ms
Second swing: Left to right, 20-24 rays (5-6 ticks), 925 ms cycle time, force vector 5 5 10, start delay 100 ms

Available: Dead Center, Dark Carnival, Swamp Fever, Hard Rain, The Passing, The Sacrifice, No Mercy, Crash Course, Blood Harvest, Cold Stream
Unavailable: The Parish, Death Toll, Dead Air

The fireaxe is slower than the bats (925 ms average cycle time). It also has slightly fewer rays. These combine to create a fairly average 23.78 rays per second. But it does two things better than the bats - both attacks are horizontal, and it can cut smoker tongues. It does 7 damage to survivors. Due to the cycle time, it may be better to interleave shoves, with 13.54 rays per second. But at least it doesn't sound like the guitar (although it does make Rochelle sound like Coach?)



Golfclub
First swing : Right to left, 12-16 rays (3-4 ticks), 725-828 ms cycle time, force vector 4 -10 0, start delay 100 ms
Second swing: Left to right, 20-24 rays (5-6 ticks), 725-828 ms cycle time, force vector 4 10 -10, start delay 33 ms

Available: The Passing
Unavailable: Everywhere else

The golfclub is...a little glitchy. In addition to the occasional extra frame, it also has a variable cycle time. One might think that the longer cycle time would correlate with the extra rays - and one would be wrong. I saw 12 rays with 725 ms, I saw 12 rays with 828 ms, I saw 16 rays with 725 ms, and I saw 16 rays with 828 ms. This results in an average 776ms cycle time, which is reasonably fast, yet still only 23.18 rays per second, which is mediocre. It does 7 damage to survivors, does not cut tongues, and has all horizontal swings. I do not recommend interleaving shoves because the second swing always generates more rays, and the cycle time is comparable to a shove anyway, so you would end up with only 9.48 rays per second (still better than the crowbar..). However, due to the irregular and unpredictable 828ms swings, you may still want to interleave shoves.



Katana
First swing : Right to left, 12-16 rays (3-4 ticks), 725-828 ms cycle time, force vector 4 -10 0, start delay 100 ms
Second swing: Left to right, 20-24 rays (5-6 ticks), 725-828 ms cycle time, force vector 4 10 -10, start delay 33 ms

Available: Dead Center, Dark Carnival, Hard Rain, The Passing, The Sacrifice, No Mercy, Dead Air, Cold Stream
Unavailable: Swamp Fever, The Parish, Crash Course, Death Toll, Blood Harvest

The katana is identical to the golfclub in every way, except that the katana can cut smoker tongues.

I also did 507 swings to investigate the attack timing. Of first swings, 50.2% were 725ms and 49.8% were 828ms. Of second swings, 48.8% were 725ms and 51.2% were 828 ms. I would say those are statistically equal.



Machete
First swing : Right to left, 12 rays (3 ticks), 725 ms cycle time, force vector 5 -5 3, start delay 100 ms
Second swing: Left to right, 21 rays (5 ticks), 714 ms cycle time, force vector 10 -7 2, start delay 33 ms
Third swing : Right to left, 12 rays (3 ticks), 575 ms cycle time, force vector 10 -7 2, start delay 100 ms

Available: Swamp Fever, The Parish, Death Toll, Blood Harvest, Cold Stream
Unavailable: Dead Center, Dark Carnival, Hard Rain, The Passing, The Sacrifice, No Mercy, Crash Course, Dead Air

The machete has an interesting set of tradeoffs. It has the fastest individual swing and the second fastest average cycle time (671ms, just barely slower than the tonfa). In contrast, it generates some of the fewest rays (only the tonfa generates less). This results in a fairly standard 22.34 rays per second. It only does 5 survivor damage, it cuts smoker tongues, and all swings are horizontal. I do not recommend interleaving shoves, because the second swing has more rays and the third swing is faster than a shove (in other words, the first swing is the worst); interleaving shoves would only make 8.42 rays per second.





Knife
First swing : Left to right, 32 rays (8 ticks), 700/733 ms cycle time, force vector 8 -4 0, start delay 66 ms

Available: All maps (Germany only)
Unavailable: All maps (outside Germany)

The knife is clearly the best melee weapon. While it is the third fastest, that's only 1-2 ticks slower than the tonfa and machete. It has the occasional extra frame of cycle time, like the frying pan's second swing. But it has the most rays of any melee. The fast speed and high ray count lead to an absolutely broken 44.69 rays per second! That is twice what most weapons are and nearly 4x the crowbar. It only does 5 survivor damage, cuts smoker tongues, and has one consistent horizontal swing (although it is left to right, unlike the other first swings). It is a terrible idea to interleave shoves with the knife, since a shove takes just as much time as a knife swing, and there is no combo count to reset. Despite this, interleaved shoves would still generate 22.86 rays per second, which is on par with most weapons that aren't interleaving shoves.

Note that the knife is not normally available to most players. There is a hard-coded check against the string "knife" in the engine, and you either need the German version of L4D2 that has CS weapons (and low gore) to have access...or you can get a vpk that renames the knife to bypass the check in the engine, or you can get a Sourcemod extension that patches the knife check out.



89 Comments
Старый рыцарь 5 Sep @ 2:01am 
No, the guide is biased: tonfa is the best weapon after updating the knife, then comes the machete and katana, tonfa allows you to destroy the horde and leave the environment without damage due to speed, machete is worse, katana is even slower and has a broken hitbox, cutting off the tongues of smokers is almost useless, because they are easier to shoot, except in exceptional cases.
Pwnage Peanut 2 Aug @ 8:42pm 
Update your guide
󠀡󠀡 8 Nov, 2023 @ 1:53pm 
I hope I dont sound stupid but I don't understand how the goldclub is better than the fireaxe
xigacuba 7 Oct, 2023 @ 11:21pm 
bruh so the knife got fixed
Babb56 3 Oct, 2023 @ 10:08am 
how did you get 2000+ fps???
bigjoe 2 Oct, 2023 @ 8:41pm 
Good news: The knife was fixed in August. It's finally good again. :health::steamhappy:
Hackerman 20 Sep, 2023 @ 1:28pm 
so... blunt weapons are basically the same thing as sharp weapons but worse? or am I missing something about blunt weapons?
Dentist 31 Aug, 2023 @ 6:23pm 
@Pluvillion well that comment aged well, eh?
XxEeNnXxEeIi 9 Jul, 2023 @ 8:07am 
Example, If damage = 1, Knife got 8 tick, so the total damage is 8?
XxEeNnXxEeIi 9 Jul, 2023 @ 8:07am 
Can you please tell me, How can I calculate the maximum damage for each melee weapon,
If we have set melee damage is 1, how much max damage for each melee can do?