Melee combat¶
A left click swings whatever the survivor holds, a shove knocks zombies down, and a stomp finishes a zombie on the ground. Nine melee weapons ship, bare fists included, each a Data Asset. No blow goes through a wall.
In the game¶
The swing and the blow¶
The click starts the swing, and the blow lands 0.18 s later, roughly mid-swing, so the zombie folds after the bat reaches it. The cooldown still starts on the click, so the attack rate does not change. A hit rolls stagger and criticals and pushes the zombie back.
| Weapon | Asset | Swing |
|---|---|---|
| Bare fists | DA_Weapon_Fists |
one of two punches |
| Baseball bat | DA_Weapon_BaseballBat |
both hands |
| Nailed bat | DA_Weapon_NailedBat |
both hands |
| Nail board | DA_Weapon_NailBoard |
both hands |
| Kitchen knife | DA_Weapon_KitchenKnife |
a stab |
| Taped knife | DA_Weapon_TapedKnife |
a stab |
| Crowbar | DA_Weapon_Crowbar |
a blow from above |
| Sledgehammer | DA_Weapon_Sledgehammer |
both hands |
| Two-handed axe | DA_Weapon_Axe |
both hands; it also fells trees on the large map |
Animations explains how the swing is picked.
Needs and skills¶
A tired, hungry survivor hits softer. The worse their needs, the weaker the blow, and a survivor in the worst state loses up to 60 % of their damage.
The exact formula
The blow is multiplied by 1 - severity × MeleeNeedsPenalty, where the severity is the same
aggregate that drives the screen vignette. At the default of 0.6, a survivor in the worst state
loses up to 60 % of their damage. At 0, needs stop touching combat.
The skills Blunt Weapons and Edged Weapons raise damage up to x1.5, critical chance up to +15 % and swing speed up to x1.3, only with a weapon of that skill in hand. Bare fists read no weapon skill.
Nothing goes through a wall¶
Every melee action keeps only the targets it has a clear line to. The line runs between the two characters, clears a low picket fence and stops at a wall, a closed door or a tall fence. Other zombies never block it.
The rule covers the swing and its extra hits, the shove, the point-blank shove, the stomp and the target outline. Zombies follow it too, and never attack or bite through a wall.
Your own meshes
A mesh of your own that should stop a blow must block the Visibility channel, as the shipped walls, doors and built pieces do.
Bare hands, the shove and the stomp¶
Fists are a weapon definition like any other: 5 damage and 120 uu reach, which is twenty hits on a 100-point zombie. Without a weapon, shove and stomp instead.
Press Space while aiming to shove the zombies in front of you, with a chance to knock them down. Then a left click on a zombie that is still down, within 170 uu, stomps it for 50. With no weapon, a shove that knocks a 100-point zombie down and two stomps kill it. A zombie on its feet is never stomped, and one click stomps one zombie.
The assets¶
Each melee weapon is a PDA_WeaponDef in Content/ZombieSurvival/DataAssets/Weapons/Childs/. It
also names the mesh held in hand and the swing and impact sounds. The weapon shows in the
survivor's right hand, on the WeaponSocket of the body (SK_Character_Male or
SK_Character_Female).
| Asset | Property | Default | What it does |
|---|---|---|---|
DA_Weapon_* |
Damage, AttacksPerSecond, Range |
per weapon | damage, attack rate and reach in uu |
DA_Weapon_* |
StaggerChance, KnockbackForce, CritChance, CritMultiplier |
per weapon | stagger, push back and criticals |
DA_Weapon_* |
SkillTag |
Skill.BluntWeapons or Skill.EdgedWeapons, none on bare fists |
the skill the weapon trains and reads |
DA_Weapon_* |
MeleeZoneWeights, HeldTransform |
per weapon | which zone of the zombie a blow tends to land on, and where the held mesh sits |
Blueprints/Player/BP_Survivor |
AttackImpactDelay |
0.18 s | delay between the click and the blow |
BP_Survivor |
MeleeNeedsPenalty |
0.6 | the share of damage poor needs can remove; 0 turns it off |
BP_Survivor, Blueprints/AI/BP_Zombie |
MeleeLineHeight |
40 uu | height of the clear-line trace above the capsule centres |
BP_Survivor |
StompDamage |
50 | damage of a stomp |
BP_Survivor |
StompRange |
170 uu | how close a downed zombie must be |
BP_Survivor |
StompCooldown |
0.8 s | time between two stomps |
DataAssets/Weapons/Childs/DA_Weapon_Fists |
Damage, Range |
5, 120 uu | bare hands |
DA_Weapon_Sledgehammer |
Damage |
80 | the heavy blunt weapon, also the demolition tool |
The shove's range, force, knockdown chance, downed time and cooldown are Settings on BP_Survivor
too.
Change it¶
- To tune a weapon, edit its
DA_Weapon_*: damage, rate, reach, stagger, knockback, criticals, zone weights, sounds. - To add a melee weapon, follow Add a melee weapon.
- To tune the swing timing, the needs penalty, the stomp and the shove, open the Class Defaults of
BP_Survivor, as What is not a Data Asset shows. - To align a held mesh, set
HeldTransformon the weapon, never in a graph. - To make a melee action of your own follow the wall rule, call
IsMeleeLineClearinBlueprints/Core/BFL_ZSCombat. It traces the Visibility channel between the two characters.