Dead by Daylight Wiki
Advertisement

Explaining & Elaborating Basic Attacks From the Code[]

Alright, finally getting around to this. There's a lot of places all over the wiki that have different values & explanations for Basic Attacks, and a lot of community confusion about Basic Attacks as well.
I'm making this for two reasons; one: to detail exactly how Basic Attacks work before editing the wiki page, and two: to clear up the overall confusion.

Starting off, there are actually two phases of an ongoing Basic Attack:
1. The "Open" phase - this is the part of a Basic Attack that's considered a "Lunge Attack".
2. The "Hitting" phase - this is the part of a Basic Attack that's considered a "Quick Attack", however it is also the second phase of a Lunge.

1. The Open Phase -
This phase has a variable time, depending on how long the Attack button is held, but the maximum amount of time that it can last is 0.5 seconds. This is the part of the animation where the Killer is lifting their weapon. During this phase, the Killer's speed ramps up to x1.5, in a cubic curve. This effectively means that the Killer's speed only reaches x1.5 after 0.3 seconds.

2. The Hitting Phase -
This phase always lasts 0.3 seconds. This is the part of the animation where the Killer swipes their weapon across the screen. It always occurs either once the Attack button is no longer being pressed, or once the "Open Phase" has elapsed its maximum duration. This phase starts off with x1.5 of base speed, but decreases back to x1.0 in a cubic curve.

How the Game Determines What is a Lunge -
In the game code, it's set so that if an attack lasts longer than 0.3 seconds, or in other words, if they attack button is held for longer than 0.3 seconds, then the "Quick Attack" becomes a "Lunge Attack", and the first 0.3 seconds are simply considered as part of the "Open Phase". After 0.2 more seconds, it then initiates the "Hitting Phase". which lasts 0.3 seconds.

Then, there are three types of Basic Attack "results":
NOTE: The "Hitting Phase" always has to finish before an attack result can begin.
1. A Successful Attack - occurs if at least 33% of the attack hitbox connects with a survivor's hurtbox.
2. An Obstructed Attack - occurs if the attack collision box connects with an environmental object's collision box.
3. A Missed Attack - occurs if the "Hitting Phase" of a Basic Attack elapses without connecting with anything.

1. A Successful Attack -
This result initiates a 2.7 second cooldown. It starts off by immediately decreasing velocity to x0.5, then cubically to x0.125 after 25% of the animation, then stays at x0.125 until 75% of the animation, then cubically increases back to x0.5 at 100% of the animation, at which point velocity returns to normal, i.e. x1.0.
2. An Obstructed Attack -
This result initiates a 1.5 second cooldown. It starts off by immediately decreasing velocity to x0.5, then cubically to x0.125 after 25% of the animation, then stays at x0.125 until 75% of the animation, then cubically increases back to x0.5 at 100% of the animation, at which point velocity returns to normal, i.e. x1.0.
3. A Missed Attack -
This result initiates a 1.5 second cooldown. It starts off by immediately decreasing velocity to x0.5, then cubically to x0.125 after 25% of the animation, then stays at x0.125 until 75% of the animation, then cubically increases back to x0.5 at 100% of the animation, at which point velocity returns to normal, i.e. x1.0.

NOTE: While the "Obstructed" and "Missed" Attack Results are exactly the same, they are still considered separate results by the game. This is actually why the perk "Unrelenting" only reduces the duration of Missed Attacks, because in the code, it only applies a modifier to Missed Attack results.
NOTE: The speed modifiers for all phases and results are slightly different for 4.4m/s Killers & for Nurse, but the durations are the same. The different speed modifiers aim to match the lunge speed of slower Killers to match that of 4.6m/s Killers, which they do closely enough.
MYERS NOTE: Myers' different Lunge distances are achieved by the game changing the maximum amount of time that his "Open Phase" can last. In tier 1, it's set to 0.2 seconds. In tier 2, it's set to 0.5 seconds (i.e. default). In tier 3, it's set to 0.6 seconds.
NURSE NOTE: When Nurse initiates an attack from a Blink, her "Open Phase" is set to a maximum of 0.3 seconds. It also has a much lower max speed; 6.16m/s.
ACCELERATION NOTE: While the "Momentum Build Up" paragraph is technically correct, since acceleration is 11.25m/s^2, it only takes ~0.4 seconds for a 4.6m/s Killer to go from stand-still to top-speed.
~ MathUnsolver (talk) 18:46, 27 August 2022 (UTC)

Advertisement